Rafael Espindola | 0e65959 | 2012-02-19 01:38:32 +0000 | [diff] [blame] | 1 | // Test that gcc-toolchain option is working correctly |
| 2 | // |
| 3 | // RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \ |
| 4 | // RUN: -target i386-unknown-linux \ |
| 5 | // RUN: -gcc-toolchain %S/Inputs/ubuntu_11.04_multiarch_tree/usr \ |
| 6 | // RUN: | FileCheck %s |
Chandler Carruth | 6ce2341 | 2012-02-21 21:51:40 +0000 | [diff] [blame^] | 7 | // |
| 8 | // Test for header search toolchain detection. |
Rafael Espindola | 0e65959 | 2012-02-19 01:38:32 +0000 | [diff] [blame] | 9 | // CHECK: "-internal-isystem" |
Chandler Carruth | 607098c | 2012-02-19 23:09:50 +0000 | [diff] [blame] | 10 | // CHECK: "[[TOOLCHAIN:[^"]+]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5" |
Rafael Espindola | 0e65959 | 2012-02-19 01:38:32 +0000 | [diff] [blame] | 11 | // CHECK: "-internal-isystem" |
| 12 | // CHECK: "[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/i686-linux-gnu" |
| 13 | // CHECK: "-internal-isystem" |
| 14 | // CHECK: "[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/backward" |
Chandler Carruth | 6ce2341 | 2012-02-21 21:51:40 +0000 | [diff] [blame^] | 15 | // CHECK: "-internal-isystem" "/usr/local/include" |
| 16 | // |
| 17 | // Test for linker toolchain detection. Note that we use a separate variable |
| 18 | // because the '/'s may be different in the linker invocation than in the |
| 19 | // header search. |
Chandler Carruth | 607098c | 2012-02-19 23:09:50 +0000 | [diff] [blame] | 20 | // CHECK: "{{[^"]*}}ld{{(.exe)?}}" |
Chandler Carruth | 6ce2341 | 2012-02-21 21:51:40 +0000 | [diff] [blame^] | 21 | // CHECK: "[[TOOLCHAIN2:[^"]*]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/crtbegin.o" |
| 22 | // CHECK: "-L[[TOOLCHAIN2]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" |
| 23 | // CHECK: "-L[[TOOLCHAIN2]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." |