Daniel Dunbar | cc95719 | 2011-05-02 21:03:47 +0000 | [diff] [blame] | 1 | // Check that --sysroot= also applies to header search paths. |
Daniel Dunbar | f7faee0 | 2011-05-04 19:52:08 +0000 | [diff] [blame] | 2 | // RUN: %clang -ccc-host-triple i386-unk-unk --sysroot=/FOO -### -E %s 2> %t1 |
Daniel Dunbar | cc95719 | 2011-05-02 21:03:47 +0000 | [diff] [blame] | 3 | // RUN: FileCheck --check-prefix=CHECK-SYSROOTEQ < %t1 %s |
NAKAMURA Takumi | a5ca112 | 2011-07-11 16:21:34 +0000 | [diff] [blame] | 4 | // CHECK-SYSROOTEQ: "-cc1"{{.*}} "-isysroot" "{{[^"]*}}/FOO" |
Daniel Dunbar | cc95719 | 2011-05-02 21:03:47 +0000 | [diff] [blame] | 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 |
NAKAMURA Takumi | a5ca112 | 2011-07-11 16:21:34 +0000 | [diff] [blame] | 11 | // CHECK-APPLE-ISYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/FOO" |
Daniel Dunbar | cc95719 | 2011-05-02 21:03:47 +0000 | [diff] [blame] | 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 |
NAKAMURA Takumi | a5ca112 | 2011-07-11 16:21:34 +0000 | [diff] [blame] | 18 | // CHECK-APPLE-SYSROOT: "-arch" "i386"{{.*}} "-syslibroot" "{{[^"]*}}/BAR" |