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