summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/gcc-toolchain.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-02-19 01:38:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-02-19 01:38:32 +0000
commit1af7c219c7113a35415651127f05cdf056b63110 (patch)
tree1f5c5f71a09dd1ccdccff3f85f06db69d970e4bd /clang/test/Driver/gcc-toolchain.cpp
parent4f9484722ced89d5d7b629f9d42f993207bf44b0 (diff)
downloadbcm5719-llvm-1af7c219c7113a35415651127f05cdf056b63110.tar.gz
bcm5719-llvm-1af7c219c7113a35415651127f05cdf056b63110.zip
Implement a -gcc-toolchain command line option that does the same as
configure's --with-gcc-toolchain. The configure option is now just a default value for the command line one. llvm-svn: 150898
Diffstat (limited to 'clang/test/Driver/gcc-toolchain.cpp')
-rw-r--r--clang/test/Driver/gcc-toolchain.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp
new file mode 100644
index 00000000000..ab651ac8eb3
--- /dev/null
+++ b/clang/test/Driver/gcc-toolchain.cpp
@@ -0,0 +1,27 @@
+// Test that gcc-toolchain option is working correctly
+//
+// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -gcc-toolchain %S/Inputs/ubuntu_11.04_multiarch_tree/usr \
+// RUN: | FileCheck %s
+
+// CHECK: "-internal-isystem"
+// CHECK: "[[TOOLCHAIN:.*]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5"
+// CHECK: "-internal-isystem"
+// CHECK: "[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/i686-linux-gnu"
+// CHECK: "-internal-isystem"
+// CHECK: "[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/backward"
+// CHECK: "-internal-isystem"
+// CHECK: "/usr/local/include"
+// CHECK: "-internal-isystem"
+// CHECK: lib/clang/3.1/include"
+// CHECK: "-internal-externc-isystem"
+// CHECK: "/include"
+// CHECK: "-internal-externc-isystem"
+// CHECK: "/usr/include"
+// CHECK: "/{{.*}}/ld"
+// CHECK: "[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/crtbegin.o"
+// CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5"
+// CHECK: "-L[[TOOLCHAIN]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.."
+// CHECK: "-L/lib"
+// CHECK: "-L/usr/lib"
OpenPOWER on IntegriCloud