This revision was automatically updated to reflect the committed changes. Closed by commit rL373147: Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT` (authored by sepavloff, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D66834?vs=217991&id=222289#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66834/new/ https://reviews.llvm.org/D66834 Files: cfe/trunk/test/Driver/darwin-sdkroot.c cfe/trunk/test/Driver/gcc-toolchain.cpp cfe/trunk/test/Driver/mips-mti.cpp cfe/trunk/test/Driver/msp430-toolchain.c cfe/trunk/unittests/Driver/ToolChainTest.cpp
Index: cfe/trunk/unittests/Driver/ToolChainTest.cpp =================================================================== --- cfe/trunk/unittests/Driver/ToolChainTest.cpp +++ cfe/trunk/unittests/Driver/ToolChainTest.cpp @@ -60,7 +60,7 @@ llvm::MemoryBuffer::getMemBuffer("\n")); std::unique_ptr<Compilation> C(TheDriver.BuildCompilation( - {"-fsyntax-only", "--gcc-toolchain=", "foo.cpp"})); + {"-fsyntax-only", "--gcc-toolchain=", "--sysroot=", "foo.cpp"})); EXPECT_TRUE(C); std::string S; Index: cfe/trunk/test/Driver/darwin-sdkroot.c =================================================================== --- cfe/trunk/test/Driver/darwin-sdkroot.c +++ cfe/trunk/test/Driver/darwin-sdkroot.c @@ -2,7 +2,7 @@ // // RUN: rm -rf %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: 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. // // 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: 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 "/" // -// 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: FileCheck --check-prefix=CHECK-NONROOT < %t.log %s // @@ -43,7 +43,7 @@ // // RUN: rm -rf %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 // // CHECK-IPHONE: clang @@ -55,7 +55,7 @@ // // RUN: rm -rf %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 // // CHECK-SIMULATOR: clang @@ -66,7 +66,7 @@ // // RUN: rm -rf %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 // // CHECK-MACOSX: clang Index: cfe/trunk/test/Driver/mips-mti.cpp =================================================================== --- cfe/trunk/test/Driver/mips-mti.cpp +++ cfe/trunk/test/Driver/mips-mti.cpp @@ -4,6 +4,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -mhard-float -mabi=32 \ // RUN: | FileCheck --check-prefix=EB-HARD-O32 %s @@ -32,6 +33,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -mhard-float -mabi=n32 \ // RUN: | FileCheck --check-prefix=EB-HARD-N32 %s @@ -60,6 +62,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips64-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -mhard-float -mabi=64 \ // RUN: | FileCheck --check-prefix=EB-HARD-N64 %s @@ -88,6 +91,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -mabi=32 \ // RUN: | FileCheck --check-prefix=EL-HARD-O32 %s @@ -116,6 +120,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -mabi=n32 \ // RUN: | FileCheck --check-prefix=EL-HARD-N32 %s @@ -144,6 +149,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips64-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -mabi=64 \ // RUN: | FileCheck --check-prefix=EL-HARD-N64 %s @@ -172,6 +178,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -msoft-float \ // RUN: | FileCheck --check-prefix=EB-SOFT %s @@ -200,6 +207,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -msoft-float \ // RUN: | FileCheck --check-prefix=EL-SOFT %s @@ -228,6 +236,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -mhard-float -muclibc \ // RUN: | FileCheck --check-prefix=EB-HARD-UCLIBC %s @@ -256,6 +265,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -muclibc \ // RUN: | FileCheck --check-prefix=EL-HARD-UCLIBC %s @@ -284,6 +294,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -mhard-float -mnan=2008 \ // RUN: | FileCheck --check-prefix=EB-HARD-NAN2008 %s @@ -312,6 +323,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -mnan=2008 \ // RUN: | FileCheck --check-prefix=EL-HARD-NAN2008 %s @@ -340,6 +352,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EB -mhard-float -muclibc -mnan=2008 \ // 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: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -muclibc -mnan=2008 \ // 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: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -msoft-float -mmicromips \ // RUN: | FileCheck --check-prefix=EL-SOFT-MICRO %s @@ -424,6 +439,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips-mti-linux-gnu \ // RUN: --gcc-toolchain=%S/Inputs/mips_mti_tree \ +// RUN: --sysroot="" \ // RUN: -stdlib=libstdc++ \ // RUN: -EL -mhard-float -mmicromips -mnan=2008 \ // RUN: | FileCheck --check-prefix=EL-SOFT-MICRO-NAN2008 %s Index: cfe/trunk/test/Driver/gcc-toolchain.cpp =================================================================== --- cfe/trunk/test/Driver/gcc-toolchain.cpp +++ cfe/trunk/test/Driver/gcc-toolchain.cpp @@ -3,12 +3,14 @@ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \ // RUN: --target=i386-unknown-linux -stdlib=libstdc++ \ // RUN: --gcc-toolchain=%S/Inputs/ubuntu_11.04_multiarch_tree/usr \ +// RUN: --sysroot="" \ // RUN: | FileCheck %s // // Additionally check that the legacy spelling of the flag works. // RUN: %clangxx -no-canonical-prefixes %s -### -o %t 2>&1 \ // RUN: --target=i386-unknown-linux -stdlib=libstdc++ \ // RUN: -gcc-toolchain %S/Inputs/ubuntu_11.04_multiarch_tree/usr \ +// RUN: --sysroot="" \ // RUN: | FileCheck %s // // Test for header search toolchain detection. Index: cfe/trunk/test/Driver/msp430-toolchain.c =================================================================== --- cfe/trunk/test/Driver/msp430-toolchain.c +++ cfe/trunk/test/Driver/msp430-toolchain.c @@ -1,11 +1,11 @@ // 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 // CC1: clang{{.*}} "-cc1" "-triple" "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 // 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" // 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 // 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" // 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 // 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" // 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 // 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: "--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: %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: %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 // 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: %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: %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 // 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 // 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: %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 // MSP430-HWMult-NONE: "--start-group" "-lmul_none"
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits