[clang] 072192d - [WebAssembly] Fix a testcase to be independent of the sysroot default

Dan Gohman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 4 16:05:03 PDT 2020


Author: Dan Gohman
Date: 2020-06-04T16:04:44-07:00
New Revision: 072192d54aa0a5c4bb694be8280dd4fef495b582

URL: https://github.com/llvm/llvm-project/commit/072192d54aa0a5c4bb694be8280dd4fef495b582
DIFF: https://github.com/llvm/llvm-project/commit/072192d54aa0a5c4bb694be8280dd4fef495b582.diff

LOG: [WebAssembly] Fix a testcase to be independent of the sysroot default

As a followup to D62922, add a sysroot command-line option to this test
to ensure that the output is independent of any default sysroot options,
and adjust the reactor test to be more consistent with the command test.

Added: 
    

Modified: 
    clang/test/Driver/wasm-toolchain.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/wasm-toolchain.c b/clang/test/Driver/wasm-toolchain.c
index 8300a81614e3..ad8b000ad225 100644
--- a/clang/test/Driver/wasm-toolchain.c
+++ b/clang/test/Driver/wasm-toolchain.c
@@ -110,11 +110,12 @@
 
 // Basic exec-model tests.
 
-// RUN: %clang %s -### -no-canonical-prefixes -target wasm32-unknown-unknown -mexec-model=command 2>&1 \
+// RUN: %clang %s -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=%s/no-sysroot-there -mexec-model=command 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-COMMAND %s
 // CHECK-COMMAND: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
 // CHECK-COMMAND: wasm-ld{{.*}}" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"
 
-// RUN: %clang %s -### -no-canonical-prefixes -target wasm32-unknown-unknown -mexec-model=reactor 2>&1 \
+// RUN: %clang %s -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=%s/no-sysroot-there -mexec-model=reactor 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-REACTOR %s
-// CHECK-REACTOR: wasm-ld{{.*}}" {{.*}} "--entry" "_initialize" {{.*}}
+// CHECK-REACTOR: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
+// CHECK-REACTOR: wasm-ld{{.*}}" "crt1-reactor.o" "--entry" "_initialize" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"


        


More information about the cfe-commits mailing list