forked from OSchip/llvm-project
Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`
When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path, some tests would fail. Override sysroot to be empty string for the tests to succeed when clang is configured with `DEFAULT_SYSROOT`. Differential Revision: https://reviews.llvm.org/D66834 Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>. llvm-svn: 373147
This commit is contained in:
parent
b1cd91815e
commit
4bc0562719
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// RUN: rm -rf %t.tmpdir
|
// RUN: rm -rf %t.tmpdir
|
||||||
// RUN: mkdir -p %t.tmpdir
|
// RUN: mkdir -p %t.tmpdir
|
||||||
// RUN: env SDKROOT=%t.tmpdir %clang -target x86_64-apple-darwin10 \
|
// RUN: env SDKROOT=%t.tmpdir %clang -target x86_64-apple-darwin10 --sysroot="" \
|
||||||
// RUN: -c %s -### 2> %t.log
|
// RUN: -c %s -### 2> %t.log
|
||||||
// RUN: FileCheck --check-prefix=CHECK-BASIC < %t.log %s
|
// RUN: FileCheck --check-prefix=CHECK-BASIC < %t.log %s
|
||||||
//
|
//
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
// Check that we don't use SDKROOT as the default if it is not a valid path.
|
// Check that we don't use SDKROOT as the default if it is not a valid path.
|
||||||
//
|
//
|
||||||
// RUN: rm -rf %t.nonpath
|
// RUN: rm -rf %t.nonpath
|
||||||
// RUN: env SDKROOT=%t.nonpath %clang -target x86_64-apple-darwin10 \
|
// RUN: env SDKROOT=%t.nonpath %clang -target x86_64-apple-darwin10 --sysroot="" \
|
||||||
// RUN: -c %s -### 2> %t.log
|
// RUN: -c %s -### 2> %t.log
|
||||||
// RUN: FileCheck --check-prefix=CHECK-NONPATH < %t.log %s
|
// RUN: FileCheck --check-prefix=CHECK-NONPATH < %t.log %s
|
||||||
//
|
//
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
// Check that we don't use SDKROOT as the default if it is just "/"
|
// Check that we don't use SDKROOT as the default if it is just "/"
|
||||||
//
|
//
|
||||||
// RUN: env SDKROOT=/ %clang -target x86_64-apple-darwin10 \
|
// RUN: env SDKROOT=/ %clang -target x86_64-apple-darwin10 --sysroot="" \
|
||||||
// RUN: -c %s -### 2> %t.log
|
// RUN: -c %s -### 2> %t.log
|
||||||
// RUN: FileCheck --check-prefix=CHECK-NONROOT < %t.log %s
|
// RUN: FileCheck --check-prefix=CHECK-NONROOT < %t.log %s
|
||||||
//
|
//
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
//
|
//
|
||||||
// RUN: rm -rf %t/SDKs/iPhoneOS8.0.0.sdk
|
// RUN: rm -rf %t/SDKs/iPhoneOS8.0.0.sdk
|
||||||
// RUN: mkdir -p %t/SDKs/iPhoneOS8.0.0.sdk
|
// RUN: mkdir -p %t/SDKs/iPhoneOS8.0.0.sdk
|
||||||
// RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang -target arm64-apple-darwin %s -### 2>&1 \
|
// RUN: env SDKROOT=%t/SDKs/iPhoneOS8.0.0.sdk %clang -target arm64-apple-darwin --sysroot="" %s -### 2>&1 \
|
||||||
// RUN: | FileCheck --check-prefix=CHECK-IPHONE %s
|
// RUN: | FileCheck --check-prefix=CHECK-IPHONE %s
|
||||||
//
|
//
|
||||||
// CHECK-IPHONE: clang
|
// CHECK-IPHONE: clang
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
//
|
//
|
||||||
// RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk
|
// RUN: rm -rf %t/SDKs/iPhoneSimulator8.0.sdk
|
||||||
// RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk
|
// RUN: mkdir -p %t/SDKs/iPhoneSimulator8.0.sdk
|
||||||
// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -target x86_64-apple-darwin %s -### 2>&1 \
|
// RUN: env SDKROOT=%t/SDKs/iPhoneSimulator8.0.sdk %clang -target x86_64-apple-darwin --sysroot="" %s -### 2>&1 \
|
||||||
// RUN: | FileCheck --check-prefix=CHECK-SIMULATOR %s
|
// RUN: | FileCheck --check-prefix=CHECK-SIMULATOR %s
|
||||||
//
|
//
|
||||||
// CHECK-SIMULATOR: clang
|
// CHECK-SIMULATOR: clang
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
//
|
//
|
||||||
// RUN: rm -rf %t/SDKs/MacOSX10.10.0.sdk
|
// RUN: rm -rf %t/SDKs/MacOSX10.10.0.sdk
|
||||||
// RUN: mkdir -p %t/SDKs/MacOSX10.10.0.sdk
|
// RUN: mkdir -p %t/SDKs/MacOSX10.10.0.sdk
|
||||||
// RUN: env SDKROOT=%t/SDKs/MacOSX10.10.0.sdk %clang -target x86_64-apple-darwin %s -### 2>&1 \
|
// RUN: env SDKROOT=%t/SDKs/MacOSX10.10.0.sdk %clang -target x86_64-apple-darwin --sysroot="" %s -### 2>&1 \
|
||||||
// RUN: | FileCheck --check-prefix=CHECK-MACOSX %s
|
// RUN: | FileCheck --check-prefix=CHECK-MACOSX %s
|
||||||
//
|
//
|
||||||
// CHECK-MACOSX: clang
|
// CHECK-MACOSX: clang
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
|
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
|
||||||
// RUN: --target=i386-unknown-linux -stdlib=libstdc++ \
|
// RUN: --target=i386-unknown-linux -stdlib=libstdc++ \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/ubuntu_11.04_multiarch_tree/usr \
|
// RUN: --gcc-toolchain=%S/Inputs/ubuntu_11.04_multiarch_tree/usr \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: | FileCheck %s
|
// RUN: | FileCheck %s
|
||||||
//
|
//
|
||||||
// Additionally check that the legacy spelling of the flag works.
|
// Additionally check that the legacy spelling of the flag works.
|
||||||
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
|
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \
|
||||||
// RUN: --target=i386-unknown-linux -stdlib=libstdc++ \
|
// RUN: --target=i386-unknown-linux -stdlib=libstdc++ \
|
||||||
// RUN: -gcc-toolchain %S/Inputs/ubuntu_11.04_multiarch_tree/usr \
|
// RUN: -gcc-toolchain %S/Inputs/ubuntu_11.04_multiarch_tree/usr \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: | FileCheck %s
|
// RUN: | FileCheck %s
|
||||||
//
|
//
|
||||||
// Test for header search toolchain detection.
|
// Test for header search toolchain detection.
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -mhard-float -mabi=32 \
|
// RUN: -EB -mhard-float -mabi=32 \
|
||||||
// RUN: | FileCheck --check-prefix=EB-HARD-O32 %s
|
// RUN: | FileCheck --check-prefix=EB-HARD-O32 %s
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -mhard-float -mabi=n32 \
|
// RUN: -EB -mhard-float -mabi=n32 \
|
||||||
// RUN: | FileCheck --check-prefix=EB-HARD-N32 %s
|
// RUN: | FileCheck --check-prefix=EB-HARD-N32 %s
|
||||||
|
@ -60,6 +62,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips64-mti-linux-gnu \
|
// RUN: --target=mips64-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -mhard-float -mabi=64 \
|
// RUN: -EB -mhard-float -mabi=64 \
|
||||||
// RUN: | FileCheck --check-prefix=EB-HARD-N64 %s
|
// RUN: | FileCheck --check-prefix=EB-HARD-N64 %s
|
||||||
|
@ -88,6 +91,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -mabi=32 \
|
// RUN: -EL -mhard-float -mabi=32 \
|
||||||
// RUN: | FileCheck --check-prefix=EL-HARD-O32 %s
|
// RUN: | FileCheck --check-prefix=EL-HARD-O32 %s
|
||||||
|
@ -116,6 +120,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -mabi=n32 \
|
// RUN: -EL -mhard-float -mabi=n32 \
|
||||||
// RUN: | FileCheck --check-prefix=EL-HARD-N32 %s
|
// RUN: | FileCheck --check-prefix=EL-HARD-N32 %s
|
||||||
|
@ -144,6 +149,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips64-mti-linux-gnu \
|
// RUN: --target=mips64-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -mabi=64 \
|
// RUN: -EL -mhard-float -mabi=64 \
|
||||||
// RUN: | FileCheck --check-prefix=EL-HARD-N64 %s
|
// RUN: | FileCheck --check-prefix=EL-HARD-N64 %s
|
||||||
|
@ -172,6 +178,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -msoft-float \
|
// RUN: -EB -msoft-float \
|
||||||
// RUN: | FileCheck --check-prefix=EB-SOFT %s
|
// RUN: | FileCheck --check-prefix=EB-SOFT %s
|
||||||
|
@ -200,6 +207,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -msoft-float \
|
// RUN: -EL -msoft-float \
|
||||||
// RUN: | FileCheck --check-prefix=EL-SOFT %s
|
// RUN: | FileCheck --check-prefix=EL-SOFT %s
|
||||||
|
@ -228,6 +236,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -mhard-float -muclibc \
|
// RUN: -EB -mhard-float -muclibc \
|
||||||
// RUN: | FileCheck --check-prefix=EB-HARD-UCLIBC %s
|
// RUN: | FileCheck --check-prefix=EB-HARD-UCLIBC %s
|
||||||
|
@ -256,6 +265,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -muclibc \
|
// RUN: -EL -mhard-float -muclibc \
|
||||||
// RUN: | FileCheck --check-prefix=EL-HARD-UCLIBC %s
|
// RUN: | FileCheck --check-prefix=EL-HARD-UCLIBC %s
|
||||||
|
@ -284,6 +294,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -mhard-float -mnan=2008 \
|
// RUN: -EB -mhard-float -mnan=2008 \
|
||||||
// RUN: | FileCheck --check-prefix=EB-HARD-NAN2008 %s
|
// RUN: | FileCheck --check-prefix=EB-HARD-NAN2008 %s
|
||||||
|
@ -312,6 +323,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -mnan=2008 \
|
// RUN: -EL -mhard-float -mnan=2008 \
|
||||||
// RUN: | FileCheck --check-prefix=EL-HARD-NAN2008 %s
|
// RUN: | FileCheck --check-prefix=EL-HARD-NAN2008 %s
|
||||||
|
@ -340,6 +352,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EB -mhard-float -muclibc -mnan=2008 \
|
// RUN: -EB -mhard-float -muclibc -mnan=2008 \
|
||||||
// RUN: | FileCheck --check-prefix=EB-HARD-UCLIBC-NAN2008 %s
|
// RUN: | FileCheck --check-prefix=EB-HARD-UCLIBC-NAN2008 %s
|
||||||
|
@ -368,6 +381,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -muclibc -mnan=2008 \
|
// RUN: -EL -mhard-float -muclibc -mnan=2008 \
|
||||||
// RUN: | FileCheck --check-prefix=EL-HARD-UCLIBC-NAN2008 %s
|
// RUN: | FileCheck --check-prefix=EL-HARD-UCLIBC-NAN2008 %s
|
||||||
|
@ -396,6 +410,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -msoft-float -mmicromips \
|
// RUN: -EL -msoft-float -mmicromips \
|
||||||
// RUN: | FileCheck --check-prefix=EL-SOFT-MICRO %s
|
// RUN: | FileCheck --check-prefix=EL-SOFT-MICRO %s
|
||||||
|
@ -424,6 +439,7 @@
|
||||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||||
// RUN: --target=mips-mti-linux-gnu \
|
// RUN: --target=mips-mti-linux-gnu \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
// RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \
|
||||||
|
// RUN: --sysroot="" \
|
||||||
// RUN: -stdlib=libstdc++ \
|
// RUN: -stdlib=libstdc++ \
|
||||||
// RUN: -EL -mhard-float -mmicromips -mnan=2008 \
|
// RUN: -EL -mhard-float -mmicromips -mnan=2008 \
|
||||||
// RUN: | FileCheck --check-prefix=EL-SOFT-MICRO-NAN2008 %s
|
// RUN: | FileCheck --check-prefix=EL-SOFT-MICRO-NAN2008 %s
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// A basic clang -cc1 command-line, and simple environment check.
|
// A basic clang -cc1 command-line, and simple environment check.
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=CC1 %s
|
// RUN: | FileCheck -check-prefix=CC1 %s
|
||||||
// CC1: clang{{.*}} "-cc1" "-triple" "msp430"
|
// CC1: clang{{.*}} "-cc1" "-triple" "msp430"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree 2>&1 \
|
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430 %s
|
// RUN: | FileCheck -check-prefix=MSP430 %s
|
||||||
|
|
||||||
// MSP430: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
// MSP430: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
// MSP430: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430{{/|\\\\}}crtn.o"
|
// MSP430: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430{{/|\\\\}}crtn.o"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nodefaultlibs \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nodefaultlibs \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree 2>&1 \
|
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-NO-DFT-LIB %s
|
// RUN: | FileCheck -check-prefix=MSP430-NO-DFT-LIB %s
|
||||||
|
|
||||||
// MSP430-NO-DFT-LIB: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
// MSP430-NO-DFT-LIB: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
// MSP430-NO-DFT-LIB: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430{{/|\\\\}}crtn.o"
|
// MSP430-NO-DFT-LIB: "{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430{{/|\\\\}}crtn.o"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nostartfiles \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nostartfiles \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree 2>&1 \
|
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-NO-START %s
|
// RUN: | FileCheck -check-prefix=MSP430-NO-START %s
|
||||||
|
|
||||||
// MSP430-NO-START: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
// MSP430-NO-START: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
// MSP430-NO-START: "--start-group" "-lmul_none" "-lgcc" "-lc" "-lcrt" "-lnosys" "--end-group"
|
// MSP430-NO-START: "--start-group" "-lmul_none" "-lgcc" "-lc" "-lcrt" "-lnosys" "--end-group"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nostdlib \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -nostdlib \
|
||||||
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree 2>&1 \
|
// RUN: --gcc-toolchain=%S/Inputs/basic_msp430_tree --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-NO-STD-LIB %s
|
// RUN: | FileCheck -check-prefix=MSP430-NO-STD-LIB %s
|
||||||
|
|
||||||
// MSP430-NO-STD-LIB: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
// MSP430-NO-STD-LIB: "{{.*}}Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}bin{{/|\\\\}}msp430-elf-ld"
|
||||||
|
@ -48,31 +48,31 @@
|
||||||
// MSP430-NO-STD-LIB: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430"
|
// MSP430-NO-STD-LIB: "-L{{.*}}/Inputs/basic_msp430_tree/lib/gcc/msp430-elf/7.3.1/../../..{{/|\\\\}}..{{/|\\\\}}msp430-elf{{/|\\\\}}lib/430"
|
||||||
// MSP430-NO-STD-LIB: "--start-group" "-lmul_none" "-lgcc" "--end-group"
|
// MSP430-NO-STD-LIB: "--start-group" "-lmul_none" "-lgcc" "--end-group"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f147 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f147 --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-16BIT %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-16BIT %s
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f147 -mhwmult=auto 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f147 -mhwmult=auto --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-16BIT %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-16BIT %s
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=16bit 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=16bit --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-16BIT %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-16BIT %s
|
||||||
|
|
||||||
// MSP430-HWMult-16BIT: "--start-group" "-lmul_16"
|
// MSP430-HWMult-16BIT: "--start-group" "-lmul_16"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f4783 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f4783 --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-32BIT %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-32BIT %s
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f4783 -mhwmult=auto 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mmcu=msp430f4783 -mhwmult=auto --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-32BIT %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-32BIT %s
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=32bit 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=32bit --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-32BIT %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-32BIT %s
|
||||||
|
|
||||||
// MSP430-HWMult-32BIT: "--start-group" "-lmul_32"
|
// MSP430-HWMult-32BIT: "--start-group" "-lmul_32"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=f5series 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=f5series --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-F5 %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-F5 %s
|
||||||
// MSP430-HWMult-F5: "--start-group" "-lmul_f5"
|
// MSP430-HWMult-F5: "--start-group" "-lmul_f5"
|
||||||
|
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=none 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=none --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-NONE %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-NONE %s
|
||||||
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=none -mmcu=msp430f4783 2>&1 \
|
// RUN: %clang %s -### -no-canonical-prefixes -target msp430 -mhwmult=none -mmcu=msp430f4783 --sysroot="" 2>&1 \
|
||||||
// RUN: | FileCheck -check-prefix=MSP430-HWMult-NONE %s
|
// RUN: | FileCheck -check-prefix=MSP430-HWMult-NONE %s
|
||||||
|
|
||||||
// MSP430-HWMult-NONE: "--start-group" "-lmul_none"
|
// MSP430-HWMult-NONE: "--start-group" "-lmul_none"
|
||||||
|
|
|
@ -60,7 +60,7 @@ TEST(ToolChainTest, VFSGCCInstallation) {
|
||||||
llvm::MemoryBuffer::getMemBuffer("\n"));
|
llvm::MemoryBuffer::getMemBuffer("\n"));
|
||||||
|
|
||||||
std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(
|
std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(
|
||||||
{"-fsyntax-only", "--gcc-toolchain=", "foo.cpp"}));
|
{"-fsyntax-only", "--gcc-toolchain=", "--sysroot=", "foo.cpp"}));
|
||||||
EXPECT_TRUE(C);
|
EXPECT_TRUE(C);
|
||||||
|
|
||||||
std::string S;
|
std::string S;
|
||||||
|
|
Loading…
Reference in New Issue