[tests][Driver] Pass an empty sysroot for `DEFAULT_SYSROOT` builds
authorTim Northover <t.p.northover@gmail.com>
Fri, 4 Mar 2022 07:59:16 +0000 (07:59 +0000)
committerTim Northover <t.p.northover@gmail.com>
Fri, 4 Mar 2022 09:01:50 +0000 (09:01 +0000)
The baremetal-sysroot test fails when the toolchain is configured with
DEFAULT_SYSROOT. So, to emulate not having passed one at all, let's
pass an empty sysroot instead.

https://reviews.llvm.org/D119144

Patch by Carlo Cabrera <carlo.antonio.cabrera@gmail.com>

clang/test/Driver/baremetal-sysroot.cpp

index ae174e0..fc66020 100644 (file)
@@ -10,7 +10,7 @@
 // RUN: ln -s %clang %T/baremetal_default_sysroot/bin/clang
 
 // RUN: %T/baremetal_default_sysroot/bin/clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN:     -target armv6m-none-eabi \
+// RUN:     -target armv6m-none-eabi --sysroot= \
 // RUN:   | FileCheck --check-prefix=CHECK-V6M-C %s
 // CHECK-V6M-C: "{{.*}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-none-unknown-eabi"
 // CHECK-V6M-C-SAME: "-internal-isystem" "{{.*}}/baremetal_default_sysroot{{[/\\]+}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}armv6m-none-eabi{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"