[PATCH] D135831: [lld][WebAssembly] Add `--extra-features` flag to add addional features

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 16:58:02 PDT 2022


sbc100 created this revision.
Herald added subscribers: pmatos, asb, wingo, ecnelises, sunfish, jgravelle-google, dschuff.
Herald added a project: All.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

This flag acts just like the existing `--features` flag but instead
of replacing the set of inferred features it adds to it.

This is useful for example if you want to `--export` a mutable global
but none of the input of object were built with mutable global support.
In that case you can do `--extra-features=mutable-globals` to avoid the
linker error that would otherwise be generated in this case:

wasm-ld: error: mutable global exported but 'mutable-globals' feature not present in inputs: `__stack_pointer`. Use --no-check-features to suppress.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135831

Files:
  lld/test/wasm/mutable-global-exports.s
  lld/test/wasm/target-feature-add.s
  lld/wasm/Config.h
  lld/wasm/Driver.cpp
  lld/wasm/Options.td
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135831.467305.patch
Type: text/x-patch
Size: 4728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221012/f57107ea/attachment.bin>


More information about the llvm-commits mailing list