[PATCH] D149917: [lld][WebAssembly] Add --preserve-features flag

Sam Clegg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 16:09:09 PDT 2023


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: cfe-commits, MaskRay, aheejin.
Herald added a project: clang.

This flag causes wasm-ld to preserve features section even in the face
of `--strip-all`.  This is useful for both clang (which can run
wasm-opt) after linking, and emcc (which performs a bunch of post-link
work).

Fixes: https://github.com/llvm/llvm-project/issues/60613
Fixes: https://github.com/llvm/llvm-project/issues/55781


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149917

Files:
  clang/lib/Driver/ToolChains/WebAssembly.cpp
  lld/wasm/Config.h
  lld/wasm/Driver.cpp
  lld/wasm/Options.td
  lld/wasm/SyntheticSections.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149917.519689.patch
Type: text/x-patch
Size: 4156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230504/6b005c40/attachment.bin>


More information about the cfe-commits mailing list