31 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o2 3# RUN: not wasm-ld %t.o -o does_not_exist/output 2>&1 | \4# RUN: FileCheck %s -check-prefixes=NO-DIR-OUTPUT,CHECK5# RUN: not wasm-ld %t.o -o %s/dir_is_a_file 2>&1 | \6# RUN: FileCheck %s -check-prefixes=DIR-IS-OUTPUT,CHECK7 8# RUN: not wasm-ld %t.o -o %t -Map=does_not_exist/output 2>&1 | \9# RUN: FileCheck %s -check-prefixes=NO-DIR-MAP,CHECK10# RUN: not wasm-ld %t.o -o %t -Map=%s/dir_is_a_file 2>&1 | \11# RUN: FileCheck %s -check-prefixes=DIR-IS-MAP,CHECK12 13# NO-DIR-OUTPUT: error: cannot open output file does_not_exist/output:14# DIR-IS-OUTPUT: error: cannot open output file {{.*}}/dir_is_a_file:15# NO-DIR-MAP: error: cannot open map file does_not_exist/output:16# DIR-IS-MAP: error: cannot open map file {{.*}}/dir_is_a_file:17 18# We should exit before doing the actual link. If an undefined symbol error is19# discovered we haven't bailed out early as expected.20# CHECK-NOT: undefined_symbol21 22# RUN: not wasm-ld %t.o -o / 2>&1 | FileCheck %s -check-prefixes=ROOT,CHECK23# ROOT: error: cannot open output file /24 25.functype undefined_symbol () -> ()26 27_start:28 .functype _start () -> ()29 call undefined_symbol30 end_function31