diff options
| author | James Y Knight <jyknight@google.com> | 2015-08-19 15:12:02 +0000 |
|---|---|---|
| committer | James Y Knight <jyknight@google.com> | 2015-08-19 15:12:02 +0000 |
| commit | 5bdf7ab0cf40522e89098bd21c6b00ac3895965a (patch) | |
| tree | 14b2119e93fb14c41b2e0724fb9ea70987685c59 /clang/test | |
| parent | 61009142b873d30dbd42c8bbfb1a5b1752c24269 (diff) | |
| download | bcm5719-llvm-5bdf7ab0cf40522e89098bd21c6b00ac3895965a.tar.gz bcm5719-llvm-5bdf7ab0cf40522e89098bd21c6b00ac3895965a.zip | |
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
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/integrated-as.s | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Driver/integrated-as.s b/clang/test/Driver/integrated-as.s index 181f790a1f9..a2cd574efe6 100644 --- a/clang/test/Driver/integrated-as.s +++ b/clang/test/Driver/integrated-as.s @@ -5,9 +5,6 @@ // RUN: %clang -### -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s // OPT_L: msave-temp-labels -// RUN: %clang -### -target x86_64-linux-gnu -c -integrated-as %s -fsanitize=address 2>&1 %s | FileCheck --check-prefix=SANITIZE %s -// SANITIZE: argument unused during compilation: '-fsanitize=address' - // Test that -I params in -Wa, and -Xassembler args are passed to integrated assembler // RUN: %clang -### -c -integrated-as %s -Wa,-I,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE1 %s // WA_INCLUDE1: cc1as @@ -46,3 +43,6 @@ // RUN: %clang -### -x assembler -c -integrated-as %s -I myincludedir 2>&1 | FileCheck --check-prefix=INCLUDEPATH %s // INCLUDEPATH: "-I" "myincludedir" + +// RUN: %clang -### -x assembler -c -fPIC -integrated-as %s 2>&1 | FileCheck --check-prefix=PIC %s +// PIC: "-mrelocation-model" "pic" |

