blob: 0348d7257780e6a6a885476e28b6d66b1bd56f5a [file] [log] [blame]
Daniel Dunbarcc957192011-05-02 21:03:47 +00001// Check that --sysroot= also applies to header search paths.
2// RUN: %clang -ccc-host-triple unknown --sysroot=/FOO -### -E %s 2> %t1
3// RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s
4// CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "/FOO"
5
6// Apple Darwin uses -isysroot as the syslib root, too.
7// RUN: touch %t2.o
8// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
9// RUN: -isysroot /FOO -### %t2.o 2> %t2
10// RUN: FileCheck --check-prefix=CHECK-APPLE-ISYSROOT < %t2 %s
11// CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "/FOO"
12
13// Check that honor --sysroot= over -isysroot, for Apple Darwin.
14// RUN: touch %t3.o
15// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
16// RUN: -isysroot /FOO --sysroot=/BAR -### %t3.o 2> %t3
17// RUN: FileCheck --check-prefix=CHECK-APPLE-SYSROOT < %t3 %s
18// CHECK-APPLE-SYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "/BAR"