1 // RUN: %clang -### %s -target x86-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"
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.
10 // RUN: not %clang --target=powerpc-unknown-unknown \
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
20 // CHECK: "-Wall" "-Wdocumentation"
21 // CHECK: "-o" "{{[^"]+}}.o"
24 // CHECK: gcc{{[^"]*}}" "-pie"
25 // CHECK-NOT: "-mlinker-version=10"
26 // CHECK-NOT: "-Xclang"
27 // CHECK-NOT: "foo-bar"
29 // CHECK-NOT: "-Wdocumentation"
31 // CHECK-NOT: "-mlinker-version=10"
32 // CHECK-NOT: "-Xclang"
33 // CHECK-NOT: "foo-bar"
35 // CHECK-NOT: "-Wdocumentation"
36 // CHECK: "-o" "a.out"