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.
Paths
| Differential D59274
[WebAssembly] Add linker options to control feature checking ClosedPublic Authored by tlively on Mar 12 2019, 2:45 PM.
Details Summary Adds --check-features and --no-check-features. The default for now is Also adds --features=foo,bar for precisely controlling the features Depends on D59173.
Diff Detail
Event Timelineruiu added inline comments.
tlively added a child revision: D59281: [WebAssembly] "atomics" feature requires shared memory.Mar 12 2019, 5:40 PM tlively marked 8 inline comments as done. Comment Actions
tlively marked an inline comment as done. Comment Actions
Comment Actions
The desired linking behavior when the user does not manually specify features is described in this PR: https://github.com/WebAssembly/tool-conventions/pull/99. Unfortunately that document does not describe the flags implemented here, because the flags are for deviating from the convention. tlively added a child revision: D59343: [WebAssembly] Add option to emit passive segments.Mar 13 2019, 7:01 PM tlively removed a child revision: D59343: [WebAssembly] Add option to emit passive segments.Mar 14 2019, 1:09 PM sbc100 added inline comments. This revision is now accepted and ready to land.Mar 21 2019, 12:24 PM Closed by commit rL356805: [WebAssembly] Add linker options to control feature checking (authored by tlively). · Explain WhyMar 22 2019, 1:42 PM This revision was automatically updated to reflect the committed changes. tlively marked 2 inline comments as done.
Revision Contents
Diff 190369 lld/test/wasm/target-feature-disallowed.yaml
lld/test/wasm/target-feature-none.yaml
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
|
It seems like you can just use std::vector<std::string> instead of Optional<std::vector<std::string>>. If there's nothing, leave the vector empty.