[X86][MC,LLD][NFC] Rename R_X86_64_REX2_GOTPCRELX (#116737)
[llvm-project.git] / lld / test / wasm / driver.s
blob6247eda93b5ba91f3b00089b2a93be4e29aa33a6
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
3 .globl _start
4 _start:
5 .functype _start () -> ()
6 end_function
8 # RUN: not wasm-ld %t -o 2>&1 | FileCheck --check-prefix=NO_O_VAL %s
9 # NO_O_VAL: error: -o: missing argument
11 # RUN: not wasm-ld -o %t.exe 2>&1 | FileCheck -check-prefix=IN %s
12 # IN: error: no input files
14 # RUN: not wasm-ld %t.o 2>&1 | FileCheck -check-prefix=OUT %s
15 # OUT: error: no output file specified
17 # RUN: not wasm-ld 2>&1 | FileCheck -check-prefix=BOTH %s
18 # BOTH: error: no input files
19 # BOTH-NOT: error: no output file specified
21 # RUN: not wasm-ld --export-table --import-table %t.o 2>&1 \
22 # RUN: | FileCheck -check-prefix=TABLE %s
23 # TABLE: error: --import-table and --export-table may not be used together
25 # RUN: not wasm-ld --relocatable --shared-memory %t.o 2>&1 \
26 # RUN: | FileCheck -check-prefix=SHARED-MEM %s
27 # SHARED-MEM: error: -r and --shared-memory may not be used together
29 # RUN: wasm-ld %t.o -z foo -o /dev/null 2>&1 | FileCheck -check-prefix=ERR10 %s
30 # RUN: wasm-ld %t.o -z foo -o /dev/null --version 2>&1 | FileCheck -check-prefix=ERR10 %s
31 # ERR10: warning: unknown -z value: foo
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 %s
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 %s
38 # ERR10-FATAL: error: unknown -z value: foo
40 ## stack-size without an = is also an error
41 # RUN: not wasm-ld %t.o -z stack-size 2>&1 | FileCheck -check-prefix=ERR11 %s
42 # ERR11: unknown -z value: stack-size