[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / dragonfly.c
blob33c4e4c77eac5ec4bef7ef8d2900d5429329271d
1 // RUN: %clang --target=x86_64-pc-dragonfly --sysroot= -### %s 2>&1 | FileCheck %s
3 // CHECK: "-cc1" "-triple" "x86_64-pc-dragonfly"
4 // CHECK: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/usr/libexec/ld-elf.so.{{.*}}" "--hash-style=gnu" "--enable-new-dtags" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "-L{{.*}}/../lib" "-L/usr/lib" "-L/usr/lib/gcc80" "{{.*}}.o" "-rpath" "{{.*}}gcc80{{.*}}" "-lc" "-lgcc" "{{.*}}crtend.o" "{{.*}}crtn.o"
6 // Check x86_64-unknown-dragonfly, X86_64
7 // RUN: %clang -### %s 2>&1 --target=x86_64-unknown-dragonfly \
8 // RUN: --sysroot=%S/Inputs/basic_dragonfly_tree \
9 // RUN: | FileCheck --check-prefix=CHECK-LD-X86_64 %s
10 // CHECK-LD-X86_64: "-cc1" "-triple" "x86_64-unknown-dragonfly"
11 // CHECK-LD-X86_64-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
12 // CHECK-LD-X86_64: "{{.*}}ld{{(.exe)?}}"
13 // CHECK-LD-X86_64-SAME: "[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crt1.o"
14 // CHECK-LD-X86_64-SAME: "[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crti.o"
15 // CHECK-LD-X86_64-SAME: "[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}gcc80{{/|\\\\}}crtbegin.o"
16 // CHECK-LD-X86_64-SAME: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib" "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}gcc80"
17 // CHECK-LD-X86_64-SAME: "-rpath" "/usr/lib/gcc80" "-lc" "-lgcc" "--as-needed" "-lgcc_pic" "--no-as-needed"
18 // CHECK-LD-X86_64-SAME: "[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}gcc80{{/|\\\\}}crtend.o"
19 // CHECK-LD-X86_64-SAME: "[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}crtn.o"
21 // -r suppresses -dynamic-linker, default -l and crt*.o like -nostdlib.
22 // RUN: %clang -### %s --target=x86_64-pc-dragonfly -r \
23 // RUN: 2>&1 | FileCheck %s --check-prefix=RELOCATABLE
24 // RELOCATABLE: "-r"
25 // RELOCATABLE-NOT: "-dynamic-linker"
26 // RELOCATABLE-NOT: "-l
27 // RELOCATABLE-NOT: {{.*}}crt{{[^./]+}}.o
29 // Check that the new linker flags are passed to DragonFly
30 // RUN: %clang --target=x86_64-unknown-dragonfly -s -t -### %s 2>&1 \
31 // RUN: | FileCheck --check-prefix=CHECK-LD-FLAGS %s
32 // CHECK-LD-FLAGS: ld{{.*}}" "{{.*}}" "-s" "-t"