lib.systems: Fix setting rust.platform.os for wasm32-unknown-unknown
Previously we would fallback to using `kernel` as the `os` which would result in using the wrong `os` value (`none`) when actually we want `unknown`. This seems to be a special case for wasm32-unknown-unknown and wasm64-unknown-unknown so I extended the if statement to support it.
This commit is contained in:
@@ -323,6 +323,7 @@ let
|
|||||||
os =
|
os =
|
||||||
/**/ if rust ? platform then rust.platform.os or "none"
|
/**/ if rust ? platform then rust.platform.os or "none"
|
||||||
else if final.isDarwin then "macos"
|
else if final.isDarwin then "macos"
|
||||||
|
else if final.isWasm && !final.isWasi then "unknown" # Needed for {wasm32,wasm64}-unknown-unknown.
|
||||||
else final.parsed.kernel.name;
|
else final.parsed.kernel.name;
|
||||||
|
|
||||||
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_family
|
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_family
|
||||||
|
|||||||
Reference in New Issue
Block a user