diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-11-09 03:46:20 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-11-09 03:46:20 +0000 |
commit | 6e46ca2c1065a50318bdbb47437709ff4f45acc3 (patch) | |
tree | 2cf6c5a7d3075256b7a75b76771b7732881b11a3 /clang/test/Driver/linux-header-search.cpp | |
parent | a6db70b049ded3704a2e3cd190733f5abd3cdd82 (diff) | |
download | bcm5719-llvm-6e46ca2c1065a50318bdbb47437709ff4f45acc3.tar.gz bcm5719-llvm-6e46ca2c1065a50318bdbb47437709ff4f45acc3.zip |
Fix an issue that Duncan discovered on a specific (no longer current)
version of Ubuntu. It has a very broken multiarch configuration, and so
we need special logic to handle it correctly. Fixing and testing this
uncovered a few other trivial issues with the logic that are fixed as
well.
I added tests to cover this as it is hard to notice if you install
recent versions of the OS.
llvm-svn: 144165
Diffstat (limited to 'clang/test/Driver/linux-header-search.cpp')
-rw-r--r-- | clang/test/Driver/linux-header-search.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Driver/linux-header-search.cpp b/clang/test/Driver/linux-header-search.cpp new file mode 100644 index 00000000000..a2f486e307b --- /dev/null +++ b/clang/test/Driver/linux-header-search.cpp @@ -0,0 +1,17 @@ +// General tests that the header search paths detected by the driver and passed +// to CC1 are sane. +// +// Test a very broken version of multiarch that shipped in Ubuntu 11.04. +// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ +// RUN: -ccc-host-triple i386-unknown-linux \ +// RUN: --sysroot=%S/Inputs/ubuntu_11.04_multiarch_tree \ +// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-11-04 %s +// CHECK-UBUNTU-11-04: "{{.*}}clang{{.*}}" "-cc1" +// CHECK-UBUNTU-11-04: "-isysroot" "[[SYSROOT:[^"]+]]" +// CHECK-UBUNTU-11-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5" +// CHECK-UBUNTU-11-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/i686-linux-gnu" +// CHECK-UBUNTU-11-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../../include/c++/4.5/backward" +// CHECK-UBUNTU-11-04: "-internal-isystem" "[[SYSROOT]]/usr/local/include" +// CHECK-UBUNTU-11-04: "-internal-isystem" "{{.*}}/lib/clang/{{[0-9]\.[0-9]}}/include" +// CHECK-UBUNTU-11-04: "-internal-externc-isystem" "[[SYSROOT]]/include" +// CHECK-UBUNTU-11-04: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" |