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
Paths
| Differential D42994
Only throw -fPIC when building a shared library ClosedPublic Authored by asmith on Feb 6 2018, 4:08 PM.
Details 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
Diff Detail Event TimelineComment Actions In the future when you upload diffs can you include context? (i.e. git diff -U999999). It's nice to be able to see the surrounding code when I'm looking at a diff. Is there ever a case where you would want to build a shared library without -fPIC? I'm wondering if we should just update the common Makefile.rules and if DYLIB_NAME is set (or something else indicating that this is a shared library), then we put the logic about -fPIC in that common file. Then people wouldn't have to remember to get this right in the future. Comment Actions
Adding -fPIC by default sounds like a great idea. Building a shared library without it will probably break compilation, but if some test still wants to try it, it can be turned off with -fno-PIC.
asmith marked an inline comment as done. asmith retitled this revision from Stop passing -fPIC to lldb tests on Windows to Only throw -fPIC when building a shared library.Feb 8 2018, 1:07 PM Comment Actions This lgtm. If this causes some tests that were previously skipped or xfailed to start passing, you can unskip / unxfail them at the same time.
This revision is now accepted and ready to land.Feb 8 2018, 1:54 PM stella.stamenova added inline comments.
Revision Contents
Diff 133354 packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
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/c/tls_globals/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
packages/Python/lldbsuite/test/make/Makefile.rules
packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Weird, does that comma syntax even do anything or was that just a bug?