Index: docs/WebAssembly.rst =================================================================== --- docs/WebAssembly.rst +++ docs/WebAssembly.rst @@ -18,8 +18,8 @@ https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. This is object format that the llvm will produce when run with the -``wasm32-unknown-unknown-wasm`` target. To build llvm with WebAssembly support -currently requires enabling the experimental backed using +``wasm32-unknown-unknown`` target triple. To build llvm with WebAssembly +support currently requires enabling the experimental backed using ``-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly``. Index: test/wasm/alias.ll =================================================================== --- test/wasm/alias.ll +++ test/wasm/alias.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj -o %t.o %s ; RUN: lld -flavor wasm %t.o -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/archive.ll =================================================================== --- test/wasm/archive.ll +++ test/wasm/archive.ll @@ -1,7 +1,7 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/archive1.ll -o %t.a1.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/archive2.ll -o %t.a2.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/hello.ll -o %t.a3.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %S/Inputs/archive1.ll -o %t.a1.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %S/Inputs/archive2.ll -o %t.a2.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %S/Inputs/hello.ll -o %t.a3.o ; RUN: llvm-ar rcs %t.a %t.a1.o %t.a2.o %t.a3.o ; RUN: rm -f %t.imports ; RUN: not lld -flavor wasm %t.a %t.o -o %t.wasm 2>&1 | FileCheck -check-prefix=CHECK-UNDEFINED %s Index: test/wasm/call-indirect.ll =================================================================== --- test/wasm/call-indirect.ll +++ test/wasm/call-indirect.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/call-indirect.ll -o %t2.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/call-indirect.ll -o %t2.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -o %t.wasm %t2.o %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/conflict.test =================================================================== --- test/wasm/conflict.test +++ test/wasm/conflict.test @@ -1,4 +1,4 @@ -# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o +# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o # RUN: not lld -flavor wasm -o %t.wasm %t.ret32.o %t.ret32.o 2>&1 | FileCheck %s # CHECK: duplicate symbol: ret32 Index: test/wasm/data-layout.ll =================================================================== --- test/wasm/data-layout.ll +++ test/wasm/data-layout.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/hello.ll -o %t.hello.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/hello.ll -o %t.hello.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o @foo = hidden global i32 1, align 4 @aligned_bar = hidden global i32 3, align 16 Index: test/wasm/entry.ll =================================================================== --- test/wasm/entry.ll +++ test/wasm/entry.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o define hidden void @entry() local_unnamed_addr #0 { entry: Index: test/wasm/export.ll =================================================================== --- test/wasm/export.ll +++ test/wasm/export.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: not lld -flavor wasm --export=missing -o %t.wasm %t.o 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s ; RUN: lld -flavor wasm --export=hidden_function -o %t.wasm %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/function-imports-first.ll =================================================================== --- test/wasm/function-imports-first.ll +++ test/wasm/function-imports-first.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -o %t.wasm %t.o %t.ret32.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/function-imports.ll =================================================================== --- test/wasm/function-imports.ll +++ test/wasm/function-imports.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -o %t.wasm %t.ret32.o %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/function-index.test =================================================================== --- test/wasm/function-index.test +++ test/wasm/function-index.test @@ -1,5 +1,5 @@ -# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o -# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret64.ll -o %t.ret64.o +# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o +# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret64.ll -o %t.ret64.o # RUN: lld -flavor wasm -r -o %t.wasm %t.ret32.o %t.ret64.o # RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/import-memory.test =================================================================== --- test/wasm/import-memory.test +++ test/wasm/import-memory.test @@ -1,4 +1,4 @@ -# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o +# RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o # RUN: lld -flavor wasm -entry ret32 --import-memory -o %t.wasm %t.ret32.o # RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/init-fini.ll =================================================================== --- test/wasm/init-fini.ll +++ test/wasm/init-fini.ll @@ -1,5 +1,5 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj -o %t.o %s +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj %S/Inputs/global-ctor-dtor.ll -o %t.global-ctor-dtor.o define hidden void @func1() { entry: Index: test/wasm/invalid-stack-size.test =================================================================== --- test/wasm/invalid-stack-size.test +++ test/wasm/invalid-stack-size.test @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %s -o %t.o +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj %s -o %t.o ; RUN: not lld -flavor wasm -o %t.wasm -z stack-size=1 %t.o 2>&1 | FileCheck %s define i32 @_start() local_unnamed_addr #1 { Index: test/wasm/load-undefined.ll =================================================================== --- test/wasm/load-undefined.ll +++ test/wasm/load-undefined.ll @@ -1,9 +1,9 @@ ; Verify that the -u / --undefined option is able to pull in symbols from ; an archive, and doesn't error when uses to pull in a symbol already loaded. ; -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/ret64.ll -o %t.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %S/Inputs/ret32.ll -o %t2.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t3.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %S/Inputs/ret64.ll -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %S/Inputs/ret32.ll -o %t2.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t3.o ; RUN: llvm-ar rcs %t2.a %t2.o ; RUN: lld -flavor wasm %t3.o %t2.a %t.o -o %t.wasm -u ret32 --undefined ret64 ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/local-symbols.ll =================================================================== --- test/wasm/local-symbols.ll +++ test/wasm/local-symbols.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -o %t.wasm %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/locals-duplicate.test =================================================================== --- test/wasm/locals-duplicate.test +++ test/wasm/locals-duplicate.test @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/locals-duplicate1.ll -o %t1.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/locals-duplicate2.ll -o %t2.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/locals-duplicate1.ll -o %t1.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/locals-duplicate2.ll -o %t2.o ; RUN: lld -flavor wasm --no-entry -o %t.wasm %t1.o %t2.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/many-functions.ll =================================================================== --- test/wasm/many-functions.ll +++ test/wasm/many-functions.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/many-funcs.ll -o %t.many.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/many-funcs.ll -o %t.many.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -r -o %t.wasm %t.many.o %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/relocatable.ll =================================================================== --- test/wasm/relocatable.ll +++ test/wasm/relocatable.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/hello.ll -o %t.hello.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/hello.ll -o %t.hello.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -r -o %t.wasm %t.hello.o %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/signature-mismatch.ll =================================================================== --- test/wasm/signature-mismatch.ll +++ test/wasm/signature-mismatch.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.main.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.main.o ; RUN: not lld -flavor wasm --check-signatures -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s ; Function Attrs: nounwind Index: test/wasm/stack-pointer.ll =================================================================== --- test/wasm/stack-pointer.ll +++ test/wasm/stack-pointer.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm --relocatable -o %t.wasm %t.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/strip-debug.test =================================================================== --- test/wasm/strip-debug.test +++ test/wasm/strip-debug.test @@ -1,4 +1,4 @@ -RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o +RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o RUN: lld -flavor wasm --strip-debug --entry=ret32 -o %t.wasm %t.ret32.o RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/symbol-type-mismatch.ll =================================================================== --- test/wasm/symbol-type-mismatch.ll +++ test/wasm/symbol-type-mismatch.ll @@ -1,5 +1,5 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o ; RUN: not lld -flavor wasm -o %t.wasm %t.o %t.ret32.o 2>&1 | FileCheck %s @ret32 = extern_weak global i32, align 4 Index: test/wasm/undefined-entry.test =================================================================== --- test/wasm/undefined-entry.test +++ test/wasm/undefined-entry.test @@ -1,4 +1,4 @@ -RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/ret32.ll -o %t.ret32.o +RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/ret32.ll -o %t.ret32.o RUN: not lld -flavor wasm -o %t.wasm %t.ret32.o 2>&1 | FileCheck %s CHECK: error: undefined symbol: _start Index: test/wasm/undefined.ll =================================================================== --- test/wasm/undefined.ll +++ test/wasm/undefined.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm --allow-undefined -o %t.wasm %t.o ; Fails due to undefined 'foo' Index: test/wasm/version.ll =================================================================== --- test/wasm/version.ll +++ test/wasm/version.ll @@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -o %t.wasm %t.o ; RUN: llvm-readobj -file-headers %t.wasm | FileCheck %s Index: test/wasm/visibility-hidden.ll =================================================================== --- test/wasm/visibility-hidden.ll +++ test/wasm/visibility-hidden.ll @@ -1,5 +1,5 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/hidden.ll -o %t2.o +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj -o %t.o %s +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj %S/Inputs/hidden.ll -o %t2.o ; RUN: llvm-ar rcs %t2.a %t2.o ; RUN: lld -flavor wasm %t.o %t2.a -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/weak-alias-overide.ll =================================================================== --- test/wasm/weak-alias-overide.ll +++ test/wasm/weak-alias-overide.ll @@ -1,5 +1,5 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj -o %t.o %s +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o ; RUN: lld -flavor wasm %t.o %t2.o -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/weak-alias.ll =================================================================== --- test/wasm/weak-alias.ll +++ test/wasm/weak-alias.ll @@ -1,5 +1,5 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj -o %t.o %s +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj %S/Inputs/weak-alias.ll -o %t2.o ; RUN: lld -flavor wasm %t.o %t2.o -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/weak-symbols.ll =================================================================== --- test/wasm/weak-symbols.ll +++ test/wasm/weak-symbols.ll @@ -1,6 +1,6 @@ -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/weak-symbol1.ll -o %t1.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %p/Inputs/weak-symbol2.ll -o %t2.o -; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown-wasm %s -o %t.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/weak-symbol1.ll -o %t1.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %p/Inputs/weak-symbol2.ll -o %t2.o +; RUN: llc -filetype=obj -mtriple=wasm32-unknown-unknown %s -o %t.o ; RUN: lld -flavor wasm -o %t.wasm %t.o %t1.o %t2.o ; RUN: obj2yaml %t.wasm | FileCheck %s Index: test/wasm/weak-undefined.ll =================================================================== --- test/wasm/weak-undefined.ll +++ test/wasm/weak-undefined.ll @@ -1,4 +1,4 @@ -; RUN: llc -mtriple=wasm32-unknown-unknown-wasm -filetype=obj -o %t.o %s +; RUN: llc -mtriple=wasm32-unknown-unknown -filetype=obj -o %t.o %s ; RUN: lld -flavor wasm -strip-debug %t.o -o %t.wasm ; RUN: obj2yaml %t.wasm | FileCheck %s