diff options
author | Aaron Smith <aaron.smith@microsoft.com> | 2018-02-08 23:10:29 +0000 |
---|---|---|
committer | Aaron Smith <aaron.smith@microsoft.com> | 2018-02-08 23:10:29 +0000 |
commit | 30d7309f6d529f06c5a7674654adb15f20deaa19 (patch) | |
tree | bf083af18e650cc45f4c81610aec4b5d000adb62 /lldb/packages/Python/lldbsuite/test/make/Makefile.rules | |
parent | 87e1c4c8de6d30509dfeac4bbc2ac95748bd7461 (diff) | |
download | bcm5719-llvm-30d7309f6d529f06c5a7674654adb15f20deaa19.tar.gz bcm5719-llvm-30d7309f6d529f06c5a7674654adb15f20deaa19.zip |
Only throw -fPIC when building a shared library
Summary:
Update makefiles to specify -fPIC in Makefile.rules and only throw -fPIC when building a shared library. This change is necessary to allow building the lldb tests on Windows where -fPIC is not a valid option.
Update a few places to Python 3.x syntax
Reviewers: zturner, lldb-commits
Reviewed By: zturner
Subscribers: stella.stamenova, labath, llvm-commits
Differential Revision: https://reviews.llvm.org/D42994
llvm-svn: 324671
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/make/Makefile.rules')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index 196c8fbcb84..6b9cc9c7e02 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -544,6 +544,11 @@ endif #---------------------------------------------------------------------- $(DYLIB_OBJECTS) : CFLAGS += -DCOMPILING_LLDB_TEST_DLL +ifneq "$(OS)" "Windows_NT" +$(DYLIB_OBJECTS) : CFLAGS += -fPIC +$(DYLIB_OBJECTS) : CXXFLAGS += -fPIC +endif + $(DYLIB_FILENAME) : $(DYLIB_OBJECTS) ifeq "$(OS)" "Darwin" $(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -install_name "$(DYLIB_EXECUTABLE_PATH)/$(DYLIB_FILENAME)" -dynamiclib -o "$(DYLIB_FILENAME)" |