Rollup merge of #125869 - alexcrichton:add-p1-to-wasi-targets, r=wesleywiser
Add `target_env = "p1"` to the `wasm32-wasip1` target This commit sets the `target_env` key for the `wasm32-wasi{,p1,p1-threads}` targets to the string `"p1"`. This mirrors how the `wasm32-wasip2` target has `target_env = "p2"`. The intention of this is to more easily detect each target in downstream crates to enable adding custom code per-target. cc #125803 <!-- If this PR is related to an unstable feature or an otherwise tracked effort, please link to the relevant tracking issue here. If you don't know of a related tracking issue or there are none, feel free to ignore this. This PR will get automatically assigned to a reviewer. In case you would like a specific user to review your work, you can assign it to them by using r? <reviewer name> -->
This commit is contained in:
commit
7133257d4f
6 changed files with 34 additions and 1 deletions
|
@ -18,6 +18,7 @@ pub fn target() -> Target {
|
|||
let mut options = base::wasm::options();
|
||||
|
||||
options.os = "wasi".into();
|
||||
options.env = "p1".into();
|
||||
options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasi"]);
|
||||
|
||||
options.pre_link_objects_self_contained = crt_objects::pre_wasi_self_contained();
|
||||
|
|
|
@ -13,6 +13,7 @@ pub fn target() -> Target {
|
|||
let mut options = base::wasm::options();
|
||||
|
||||
options.os = "wasi".into();
|
||||
options.env = "p1".into();
|
||||
|
||||
options.add_pre_link_args(
|
||||
LinkerFlavor::WasmLld(Cc::No),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue