[WebAssembly] Add linker options to control feature checking
authorThomas Lively <tlively@google.com>
Fri, 22 Mar 2019 20:43:06 +0000 (20:43 +0000)
committerThomas Lively <tlively@google.com>
Fri, 22 Mar 2019 20:43:06 +0000 (20:43 +0000)
commit5991328c96b6146999cfa74ede42901f8c01f2fa
tree98ab96840053518493f2e8310d18d6cbf98a298c
parentc48e223309c36d482107b86b97c91d4a231f7322
[WebAssembly] Add linker options to control feature checking

Summary:
Adds --check-features and --no-check-features. The default for now is
to enable the checking, but this might change in the future.

Also adds --features=foo,bar for precisely controlling the features
used in the output binary.

Depends on D59173.

Reviewers: sbc100, aheejin

Subscribers: dschuff, jgravelle-google, sunfish, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 356805
lld/test/wasm/target-feature-disallowed.yaml
lld/test/wasm/target-feature-none.yaml [new file with mode: 0644]
lld/test/wasm/target-feature-required.yaml
lld/test/wasm/target-feature-used.yaml
lld/wasm/Config.h
lld/wasm/Driver.cpp
lld/wasm/Options.td
lld/wasm/Writer.cpp