[PATCH] D47162: [WebAssembly] Initial support for LTO
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 22 13:23:10 PDT 2018
sbc100 marked 2 inline comments as done.
sbc100 added inline comments.
================
Comment at: test/wasm/lto/lto-start.ll:2
+; RUN: llvm-as %s -o %t.o
+; RUN: wasm-ld %t.o -o %t.wasm
+; RUN: obj2yaml %t.wasm | FileCheck %s
----------------
pcc wrote:
> More tests please. I would expect to see a ThinLTO test as well as tests for the new flags.
I agree. I was thinking of landing this initial version and iterating (see the change description), but perhaps its best not to land in a half baked state. I'm happy to add more tests and make this more complete.
================
Comment at: wasm/Driver.cpp:281
+static Symbol *handleUndefined(StringRef Name) {
+ Symbol *S = Symtab->addUndefinedFunction(Name, 0, nullptr, nullptr);
+
----------------
pcc wrote:
> pcc wrote:
> > Should we implement `-u` in the same way as in the ELF linker? With this implementation it doesn't look like it will work correctly for undefined data and globals.
> Please address.
You are correct. Right now with wasm-ld `-u` flag only works for function symbols. This is a current limitation of the wasm linker, not something that this change introduces. I agree we should address that, but that would be a separate change I think.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D47162
More information about the llvm-commits
mailing list