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 | d936d9d9abae0e5018fa0233aa51ac8390a6778f (patch) | |
tree | 1c9f1bf8fff78675534a3333921a47da40679715 /test/Driver/linux-header-search.cpp | |
parent | a59e4b7fca1d46afd8f315fa87fa8bf1a68df9cd (diff) | |
download | clang-d936d9d9abae0e5018fa0233aa51ac8390a6778f.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144165 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/linux-header-search.cpp')
-rw-r--r-- | test/Driver/linux-header-search.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Driver/linux-header-search.cpp b/test/Driver/linux-header-search.cpp new file mode 100644 index 0000000000..a2f486e307 --- /dev/null +++ b/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" |