1 // Check that we don't try to forward -Xclang or -mlinker-version to GCC.
2 // PR12920 -- Check also we may not forward W_Group options to GCC.
4 // RUN: %clang -target powerpc-unknown-unknown \
6 // RUN: -Wall -Wdocumentation \
7 // RUN: -Xclang foo-bar \
8 // RUN: -march=x86-64 \
9 // RUN: -mlinker-version=10 -### 2> %t
10 // RUN: FileCheck < %t %s
14 // CHECK: "-Wall" "-Wdocumentation"
15 // CHECK: "-o" "{{[^"]+}}.o"
18 // CHECK: gcc{{[^"]*}}"
19 // CHECK-NOT: "-mlinker-version=10"
20 // CHECK-NOT: "-Xclang"
21 // CHECK-NOT: "foo-bar"
23 // CHECK-NOT: "-Wdocumentation"
25 // CHECK-NOT: "-mlinker-version=10"
26 // CHECK-NOT: "-Xclang"
27 // CHECK-NOT: "foo-bar"
29 // CHECK-NOT: "-Wdocumentation"
30 // CHECK: "-o" "a.out"
32 // Check that we're not forwarding -g options to the assembler
33 // RUN: %clang -g -target x86_64-unknown-linux-gnu -no-integrated-as -c %s -### 2>&1 \
34 // RUN: | FileCheck --check-prefix=CHECK-ASM %s
36 // CHECK-ASM-NOT: "-g"
38 // Check that we're not forwarding -mno-unaligned-access.
39 // RUN: %clang -target aarch64-none-elf -mno-unaligned-access %s -### 2>&1 \
40 // RUN: | FileCheck --check-prefix=CHECK-ARM %s
41 // CHECK-ARM: gcc{{[^"]*}}"
42 // CHECK-ARM-NOT: -mno-unaligned-access