1 // RUN: %clang -### %s -target aarch64-none-elf \
2 // RUN:   --coverage -e _start -fuse-ld=lld --ld-path=ld -nostartfiles \
3 // RUN:   -nostdlib -r -rdynamic -specs=nosys.specs -static -static-pie \
4 // RUN:   2>&1 | FileCheck --check-prefix=FORWARD %s
5 // FORWARD: gcc{{[^"]*}}" "--coverage" "-fuse-ld=lld" "--ld-path=ld" "-nostartfiles" "-nostdlib" "-rdynamic" "-specs=nosys.specs" "-static" "-static-pie" "-o" "a.out" "{{.*}}.o" "-e" "_start" "-r"
6 
7 // Check that we don't try to forward -Xclang or -mlinker-version to GCC.
8 // PR12920 -- Check also we may not forward W_Group options to GCC.
9 //
10 // RUN: %clang -target powerpc-unknown-unknown \
11 // RUN:   %s \
12 // RUN:   -Wall -Wdocumentation \
13 // RUN:   -Xclang foo-bar \
14 // RUN:   -pie -march=x86-64 \
15 // RUN:   -mlinker-version=10 -### 2> %t
16 // RUN: FileCheck < %t %s
17 //
18 // clang -cc1
19 // CHECK: clang
20 // CHECK: "-Wall" "-Wdocumentation"
21 // CHECK: "-o" "{{[^"]+}}.o"
22 //
23 // gcc as ld.
24 // CHECK: gcc{{[^"]*}}" "-pie"
25 // CHECK-NOT: "-mlinker-version=10"
26 // CHECK-NOT: "-Xclang"
27 // CHECK-NOT: "foo-bar"
28 // CHECK-NOT: "-Wall"
29 // CHECK-NOT: "-Wdocumentation"
30 // CHECK-NOT: -march
31 // CHECK-NOT: "-mlinker-version=10"
32 // CHECK-NOT: "-Xclang"
33 // CHECK-NOT: "foo-bar"
34 // CHECK-NOT: "-Wall"
35 // CHECK-NOT: "-Wdocumentation"
36 // CHECK: "-o" "a.out"
37 
38 // Check that we're not forwarding -g options to the assembler
39 // RUN: %clang -g -target x86_64-unknown-linux-gnu -no-integrated-as -c %s -### 2>&1 \
40 // RUN:   | FileCheck --check-prefix=CHECK-ASM %s
41 // CHECK-ASM: as
42 // CHECK-ASM-NOT: "-g"
43