[all-commits] [llvm/llvm-project] 89d563: [lld][WebAssembly] Add --keep-section flag

Sam Clegg via All-commits all-commits at lists.llvm.org
Thu Nov 2 14:24:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89d5635f0a834e53ac5446c6d6ea38d9166b2a55
      https://github.com/llvm/llvm-project/commit/89d5635f0a834e53ac5446c6d6ea38d9166b2a55
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/WebAssembly.cpp
    A lld/test/wasm/strip-all.s
    R lld/test/wasm/strip-all.test
    M lld/wasm/Config.h
    M lld/wasm/Driver.cpp
    M lld/wasm/Options.td
    M lld/wasm/SyntheticSections.h

  Log Message:
  -----------
  [lld][WebAssembly] Add --keep-section flag

This flag causes wasm-ld preserve a section even in the face of
`--strip-all`.  This is useful, for example, to preserve the
target_features section in the ase of 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

Differential Revision: https://reviews.llvm.org/D149917




More information about the All-commits mailing list