[all-commits] [llvm/llvm-project] c07e83: [lld][WebAssembly] Add `--extra-features` flag to ...

Sam Clegg via All-commits all-commits at lists.llvm.org
Thu Oct 13 09:37:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c07e83813009dca9d7549991b3f5162b676059f7
      https://github.com/llvm/llvm-project/commit/c07e83813009dca9d7549991b3f5162b676059f7
  Author: Sam Clegg <sbc at chromium.org>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M lld/test/wasm/mutable-global-exports.s
    M lld/wasm/Config.h
    M lld/wasm/Driver.cpp
    M lld/wasm/Options.td
    M lld/wasm/Writer.cpp

  Log Message:
  -----------
  [lld][WebAssembly] Add `--extra-features` flag to add addional features

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.

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




More information about the All-commits mailing list