[PATCH] D43846: [WebAssembly] Add test for `--undefined` flag. NFC.

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 17:25:39 PST 2018


sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff, jfb.
sbc100 added a reviewer: ruiu.

Specifically the case where the undefined symbol is not found
during the link.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D43846

Files:
  test/wasm/undefined.ll


Index: test/wasm/undefined.ll
===================================================================
--- test/wasm/undefined.ll
+++ test/wasm/undefined.ll
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43846.136205.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180228/bc6ea5d4/attachment.bin>


More information about the llvm-commits mailing list