1 // REQUIRES: x86-registered-target 2 // 3 // Check that --sysroot= also applies to header search paths. 4 // RUN: %clang -target i386-unk-unk --sysroot=/FOO -### -E %s 2> %t1 5 // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s 6 // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "{{[^"]*}}/FOO" 7 8 // Apple Darwin uses -isysroot as the syslib root, too. 9 // RUN: touch %t2.o 10 // RUN: %clang -target i386-apple-darwin10 \ 11 // RUN: -isysroot /FOO -### %t2.o 2> %t2 12 // RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s 13 // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/FOO" 14 15 // Check that honor --sysroot= over -isysroot, for Apple Darwin. 16 // RUN: touch %t3.o 17 // RUN: %clang -target i386-apple-darwin10 \ 18 // RUN: -isysroot /FOO --sysroot=/BAR -### %t3.o 2> %t3 19 // RUN: FileCheck --check-prefix=CHECK-APPLE-SYSROOT < %t3 %s 20 // CHECK-APPLE-SYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/BAR" 21