asmith created this revision.
asmith added reviewers: zturner, lldb-commits.
Herald added a subscriber: llvm-commits.
Update some unit tests that are passing -fPIC on Windows which is not a valid
compiler option. This is another step in making the LLDB unit tests run on
Windows.
Repository:
rL LLVM
https://reviews.llvm.org/D42994
Files:
packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
packages/Python/lldbsuite/test/lldbtest.py
Index: packages/Python/lldbsuite/test/lldbtest.py
===================================================================
--- packages/Python/lldbsuite/test/lldbtest.py
+++ packages/Python/lldbsuite/test/lldbtest.py
@@ -1478,10 +1478,10 @@
d = {
'DYLIB_CXX_SOURCES': sources,
'DYLIB_NAME': lib_name,
- 'CFLAGS_EXTRAS': "%s -I%s -fPIC" % (stdflag,
- os.path.join(
- os.environ["LLDB_SRC"],
- "include")),
+ 'CFLAGS_EXTRAS': "%s -I%s " % (stdflag,
+ os.path.join(
+ os.environ["LLDB_SRC"],
+ "include")),
'LD_EXTRAS': "-shared -l%s\liblldb.lib" % self.os.environ["LLDB_IMPLIB_DIR"]}
if self.TraceOn():
print(
Index: packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
===================================================================
--- packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
+++ packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
@@ -4,6 +4,8 @@
DYLIB_CXX_SOURCES := b.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
+ifneq "$(OS)" "Windows_NT"
+ CXXFLAGS += -fPIC
+endif
include $(LEVEL)/Makefile.rules
Index: packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
===================================================================
--- packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
+++ packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
@@ -4,6 +4,8 @@
DYLIB_CXX_SOURCES := a.cpp
DYLIB_ONLY := YES
-CXXFLAGS += -fPIC
+ifneq "$(OS)" "Windows_NT"
+ CXXFLAGS += -fPIC
+endif
include $(LEVEL)/Makefile.rules
Index: packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
===================================================================
--- packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
+++ packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
@@ -3,7 +3,10 @@
DYLIB_NAME := foo
DYLIB_C_SOURCES := foo.c
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fPIC
+
+ifneq "$(OS)" "Windows_NT"
+ CFLAGS_EXTRAS += -fPIC
+endif
SPLIT_DEBUG_SYMBOLS = YES
Index: packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
===================================================================
--- packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
+++ packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
@@ -3,6 +3,9 @@
DYLIB_NAME := foo
DYLIB_C_SOURCES := foo.c
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fPIC
+
+ifneq "$(OS)" "Windows_NT"
+ CFLAGS_EXTRAS += -fPIC
+endif
include $(LEVEL)/Makefile.rules
Index: packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
===================================================================
--- packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
+++ packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
@@ -6,7 +6,9 @@
include $(LEVEL)/Makefile.rules
-CFLAGS_EXTRAS += -fPIC
+ifneq "$(OS)" "Windows_NT"
+ CFLAGS_EXTRAS += -fPIC
+endif
TwoConstant.o: TwoConstant.c
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
Index: packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
===================================================================
--- packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
+++ packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
@@ -6,7 +6,9 @@
include $(LEVEL)/Makefile.rules
-CFLAGS_EXTRAS += -fPIC
+ifneq "$(OS)" "Windows_NT"
+ CFLAGS_EXTRAS += -fPIC
+endif
OneConstant.o: OneConstant.c
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
Index: packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
===================================================================
--- packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
+++ packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
@@ -3,6 +3,9 @@
DYLIB_NAME := foo
DYLIB_CXX_SOURCES := foo.cpp
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -fPIC
+
+ifneq "$(OS)" "Windows_NT"
+ CFLAGS_EXTRAS += -fPIC
+endif
include $(LEVEL)/Makefile.rules
Index: packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
===================================================================
--- packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
+++ packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
@@ -3,6 +3,9 @@
DYLIB_NAME := foo
DYLIB_CXX_SOURCES := foo.cpp
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS := -fPIC
+
+ifneq "$(OS)" "Windows_NT"
+ CFLAGS_EXTRAS := -fPIC
+endif
include $(LEVEL)/Makefile.rules
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits