[PATCH] D71738: [lld][WebAssembly] Add libcall symbols to the link when LTO is being used.

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 14:18:51 PST 2019


sbc100 marked an inline comment as done.
sbc100 added inline comments.


================
Comment at: lld/wasm/Driver.cpp:450
+    MemoryBufferRef mb = lazySym->getMemberBuffer();
+    if (isBitcode(mb))
+      lazySym->fetch();
----------------
pcc wrote:
> Do you really need the `isBitcode` check in the wasm linker? We needed it in the ELF linker because of some badly behaving libgcc functions, but maybe wasm doesn't have anything like that?
But then wouldn't we end up fetching native object from libraries unnecessarily?

Without this check, if (for example) compiler-rt and libc are compiled as native object files, wouldn't we be loading in a lot of objects that we might never need. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71738/new/

https://reviews.llvm.org/D71738





More information about the llvm-commits mailing list