-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Wasm/WASI: propagate PATH to UserToolchain to fix sysroot search #2936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # Sources/Workspace/UserToolchain.swift
This comment has been minimized.
This comment has been minimized.
d1948f5
to
47b8e0f
Compare
This comment has been minimized.
This comment has been minimized.
47b8e0f
to
7d79801
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -264,23 +270,22 @@ public final class UserToolchain: Toolchain { | |||
+ destination.extraSwiftCFlags | |||
} | |||
|
|||
public init(destination: Destination, environment: [String: String] = ProcessEnv.vars) throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should retain the possibility to pass in a custom environment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out, I've reverted that part of the change.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@swift-ci please smoke test |
Currently, when building for WASI, our users need to provide a
destination.json
file that contains a WASI sysroot path. It would be great if the sysroot path could be inferred automatically from PATH, when the appropriate WASI triple is requested as the destination platform. With this PR it's enough to pass--triple wasm32-unknown-wasi
toswift build
to build for WASI.Unused private
processEnvironment
property ofUserToolchain
is removed.(cc @kateinoigakukun)