[PATCH] D111171: [lld][WebAssembly] Create optional internal symbols only after LTO object as been added

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 5 12:36:01 PDT 2021


sbc100 added a comment.

In D111171#3043704 <https://reviews.llvm.org/D111171#3043704>, @tlively wrote:

> How about if you create two LTO object files, one with -mattr=+atomics,+bulk-memory and one without, then link them together? In the combined bitcode, the presence of +atomics and +bulk-memory on the functions from the first object file will prevent that stripping from running, and you should get references to __tls_base from code originating in both object files.

Thanks for the tip.  Yes I think I'm somehow not setting `-mattr=+atomics,+bulk-memory` in the LTO object file.   In my test hand written `.ll` test case how do I enable those.. it seems not on the `llvm-as` command line?  I guess they are embedded in the `.ll` itself...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111171



More information about the llvm-commits mailing list