[Lldb-commits] [lldb] 54422d2 - Revert "[lldb] Pass -fPIC flag even when DYLIB_ONLY is set"
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 1 05:49:29 PDT 2020
Author: Raphael Isemann
Date: 2020-06-01T14:41:08+02:00
New Revision: 54422d21700cfb532c80b22662f7b79d741b21ba
URL: https://github.com/llvm/llvm-project/commit/54422d21700cfb532c80b22662f7b79d741b21ba
DIFF: https://github.com/llvm/llvm-project/commit/54422d21700cfb532c80b22662f7b79d741b21ba.diff
LOG: Revert "[lldb] Pass -fPIC flag even when DYLIB_ONLY is set"
This reverts commit fd0ab3b3eb88de3fe4792c34b50084595e22d68d.
The fix here is incorrect and the actual fault was an incorrect test Makefile.
To give some more background:
The original test for D80798 compiled three source files into either one
executable or one executable + 2 shared libraries, each being one different
test setup. If both the monolithic executable and the shared libraries
where compiled in the same directory, then Make would overwrite the .o files
of one test setup with the other. This caused that while -fPIC was passed
correctly to the test setup with the shared libraries, the compiler invocations
for the monolithic executable would later overwrite these object files (and
as only the test setup with the shared library used -fPIC, it appeared as if
the shared library object files didn't receive the -fPIC flag).
Thanks to Pavel for figuring this out.
Added:
Modified:
lldb/packages/Python/lldbsuite/test/make/Makefile.rules
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 5e3f47884990..ea0fa748bc36 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -657,14 +657,9 @@ endif
$(DYLIB_OBJECTS) : CFLAGS += -DCOMPILING_LLDB_TEST_DLL
ifneq "$(OS)" "Windows_NT"
-ifeq "$(DYLIB_ONLY)" ""
-CFLAGS += -fPIC
-CXXFLAGS += -fPIC
-else
$(DYLIB_OBJECTS) : CFLAGS += -fPIC
$(DYLIB_OBJECTS) : CXXFLAGS += -fPIC
endif
-endif
$(DYLIB_FILENAME) : $(DYLIB_OBJECTS)
ifeq "$(OS)" "Darwin"
More information about the lldb-commits
mailing list