43 lines · plain
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s2 3.globl _start4_start:5 .functype _start () -> ()6 end_function7 8# RUN: not wasm-ld %t -o 2>&1 | FileCheck --check-prefix=NO_O_VAL %s9# NO_O_VAL: error: -o: missing argument10 11# RUN: not wasm-ld -o %t.exe 2>&1 | FileCheck -check-prefix=IN %s12# IN: error: no input files13 14# RUN: not wasm-ld %t.o 2>&1 | FileCheck -check-prefix=OUT %s15# OUT: error: no output file specified16 17# RUN: not wasm-ld 2>&1 | FileCheck -check-prefix=BOTH %s18# BOTH: error: no input files19# BOTH-NOT: error: no output file specified20 21# RUN: not wasm-ld --export-table --import-table %t.o 2>&1 \22# RUN: | FileCheck -check-prefix=TABLE %s23# TABLE: error: --import-table and --export-table may not be used together24 25# RUN: not wasm-ld --relocatable --shared-memory %t.o 2>&1 \26# RUN: | FileCheck -check-prefix=SHARED-MEM %s27# SHARED-MEM: error: -r and --shared-memory may not be used together28 29# RUN: wasm-ld %t.o -z foo -o /dev/null 2>&1 | FileCheck -check-prefix=ERR10 %s30# RUN: wasm-ld %t.o -z foo -o /dev/null --version 2>&1 | FileCheck -check-prefix=ERR10 %s31# ERR10: warning: unknown -z value: foo32 33## Check we report "unknown -z value" error even with -v.34# RUN: wasm-ld %t.o -z foo -o /dev/null -v 2>&1 | FileCheck -check-prefix=ERR10 %s35 36## Note: in GNU ld, --fatal-warning still leads to a warning.37# RUN: not wasm-ld %t.o -z foo --fatal-warnings 2>&1 | FileCheck --check-prefix=ERR10-FATAL %s38# ERR10-FATAL: error: unknown -z value: foo39 40## stack-size without an = is also an error41# RUN: not wasm-ld %t.o -z stack-size 2>&1 | FileCheck -check-prefix=ERR11 %s42# ERR11: unknown -z value: stack-size43