Properly pass through the PIC mode to the integrated assembler when
authorJames Y Knight <jyknight@google.com>
Wed, 19 Aug 2015 15:12:02 +0000 (15:12 +0000)
committerJames Y Knight <jyknight@google.com>
Wed, 19 Aug 2015 15:12:02 +0000 (15:12 +0000)
commit5bdf7ab0cf40522e89098bd21c6b00ac3895965a
tree14b2119e93fb14c41b2e0724fb9ea70987685c59
parent61009142b873d30dbd42c8bbfb1a5b1752c24269
Properly pass through the PIC mode to the integrated assembler when
doing assembly-only, and unify the Driver's PIC argument parsing.

On a few architectures, parsing of assembly files annoyingly depends
on whether PIC is enabled or not. This was handled for external 'as'
already (passing -KPIC), but was missed for calls to the standalone
internal assembler.

The integrated-as.s test needed to be modified to not expect
-fsanitize=address to be unused, as now fsanitize *IS* used for
assembly, since -fsanitize=memory can sometimes imply -fPIE, which the
assembler needs to know (gack!!).

Differential Revision: http://reviews.llvm.org/D11845

llvm-svn: 245447
clang/include/clang/Driver/CC1Options.td
clang/lib/Driver/Tools.cpp
clang/test/Driver/integrated-as.s