]> granicus.if.org Git - clang/commit
Driver: switch Windows to static RelocModel
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 27 Dec 2016 02:20:35 +0000 (02:20 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 27 Dec 2016 02:20:35 +0000 (02:20 +0000)
commitda27c15a537ad31bcd6b1eb678d055eed0df4f18
tree3ed0ff3ff59c870565d74411c6695ca3dd87fca9
parent9b190af2494f800f779e524a4c28335b13718c62
Driver: switch Windows to static RelocModel

Windows uses PE/COFF which is inherently position independent.  The use
of the PIC model is unnecessary.  In fact, we would generate invalid
code using the ELF PIC model when PIC was enabled previously.  Now that
we no longer accept -fPIC and -fpoc, this switches the internal
representation to the static model to permit us to make PIC modules
invalid when targeting Windows.  This should not change the code
generation, only the internal state management.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290569 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/MSVCToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
test/Driver/pic.c