[WebAssembly] Add test for `--undefined` flag. NFC.
authorSam Clegg <sbc@chromium.org>
Wed, 28 Feb 2018 01:42:16 +0000 (01:42 +0000)
committerSam Clegg <sbc@chromium.org>
Wed, 28 Feb 2018 01:42:16 +0000 (01:42 +0000)
Specifically the case where the undefined symbol is not found
during the link.

Differential Revision: https://reviews.llvm.org/D43846

llvm-svn: 326294

lld/test/wasm/undefined.ll

index ac86c6c..69b7a82 100644 (file)
@@ -1,9 +1,10 @@
 ; RUN: llc -filetype=obj %s -o %t.o
 ; RUN: wasm-ld --check-signatures --allow-undefined -o %t.wasm %t.o
 
-; Fails due to undefined 'foo'
-; RUN: not wasm-ld --check-signatures -o %t.wasm %t.o 2>&1 | FileCheck %s
+; Fails due to undefined 'foo' and also 'baz'
+; RUN: not wasm-ld --check-signatures --undefined=baz -o %t.wasm %t.o 2>&1 | FileCheck %s
 ; CHECK: error: {{.*}}.o: undefined symbol: foo
+; CHECK: error: undefined symbol: baz
 
 ; But succeeds if we pass a file containing 'foo' as --allow-undefined-file.
 ; RUN: echo 'foo' > %t.txt