[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / sysroot.c
blob85da2499090af117cc3b2c9980fee900ad9bc5db
1 // Check that --sysroot= also applies to header search paths.
2 // RUN: %clang -target i386-unk-unk --sysroot=/FOO -### -E %s 2> %t1
3 // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s
4 // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "{{[^"]*}}/FOO"
6 // Apple Darwin uses -isysroot as the syslib root, too.
7 // We pass --sysroot="" to defeat any -DDEFAULT_SYSROOT parameter.
8 // RUN: touch %t2.o
9 // RUN: %clang -target i386-apple-darwin10 \
10 // RUN: -isysroot /FOO --sysroot="" -### %t2.o 2> %t2
11 // RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s
12 // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/FOO"
14 // Check that honor --sysroot= over -isysroot, for Apple Darwin.
15 // RUN: touch %t3.o
16 // RUN: %clang -target i386-apple-darwin10 \
17 // RUN: -isysroot /FOO --sysroot=/BAR -### %t3.o 2> %t3
18 // RUN: FileCheck --check-prefix=CHECK-APPLE-SYSROOT < %t3 %s
19 // CHECK-APPLE-SYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/BAR"