diff options
| author | Greg Clayton <gclayton@apple.com> | 2012-01-10 00:00:15 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2012-01-10 00:00:15 +0000 |
| commit | d50d23808bf28cb58ee12c5f9685eb1765dd79c6 (patch) | |
| tree | e22959c26110066786e0c9d0f2604f2d67a7cd44 | |
| parent | aecb12b5c648912efa2f8591c8bedb77b7e6a712 (diff) | |
| download | bcm5719-llvm-d50d23808bf28cb58ee12c5f9685eb1765dd79c6.tar.gz bcm5719-llvm-d50d23808bf28cb58ee12c5f9685eb1765dd79c6.zip | |
Update makefile rules to support C++ files in shared libraries and fix how
the linker driver is found.
llvm-svn: 147814
| -rw-r--r-- | lldb/test/make/Makefile.rules | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/test/make/Makefile.rules b/lldb/test/make/Makefile.rules index 1388c9afa1b..2f6e40ffae8 100644 --- a/lldb/test/make/Makefile.rules +++ b/lldb/test/make/Makefile.rules @@ -69,7 +69,7 @@ endif cxx_compiler = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))) # Function that returns the C++ linker, given $(CC) as arg. -cxx_linker = $(if $(findstring clang,$(1)), $(subst clang,g++,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,g++,$(1)), $(subst gcc,g++,$(1)))) +cxx_linker = $(if $(findstring clang,$(1)), $(subst clang,clang++,$(1)), $(if $(findstring llvm-gcc,$(1)), $(subst llvm-gcc,llvm-g++,$(1)), $(subst gcc,g++,$(1)))) #---------------------------------------------------------------------- # dylib settings @@ -78,6 +78,11 @@ ifneq "$(strip $(DYLIB_C_SOURCES))" "" DYLIB_OBJECTS +=$(strip $(DYLIB_C_SOURCES:.c=.o)) endif +ifneq "$(strip $(DYLIB_CXX_SOURCES))" "" + DYLIB_OBJECTS +=$(strip $(DYLIB_CXX_SOURCES:.cpp=.o)) + CXX = $(call cxx_compiler,$(CC)) + LD = $(call cxx_linker,$(CC)) +endif #---------------------------------------------------------------------- # Check if we have any C source files |

