1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o 2 3# RUN: not wasm-ld %t.o -o does_not_exist/output 2>&1 | \ 4# RUN: FileCheck %s -check-prefixes=NO-DIR-OUTPUT,CHECK 5# RUN: not wasm-ld %t.o -o %s/dir_is_a_file 2>&1 | \ 6# RUN: FileCheck %s -check-prefixes=DIR-IS-OUTPUT,CHECK 7 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,CHECK 10# 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,CHECK 12 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 is 19# discovered we haven't bailed out early as expected. 20# CHECK-NOT: undefined_symbol 21 22# RUN: not wasm-ld %t.o -o / 2>&1 | FileCheck %s -check-prefixes=ROOT,CHECK 23# ROOT: error: cannot open output file / 24 25.functype undefined_symbol () -> () 26 27_start: 28 .functype _start () -> () 29 call undefined_symbol 30 end_function 31