-
Notifications
You must be signed in to change notification settings - Fork 192
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
Don't modify the host compiler's sysroot #445
Conversation
This commit updates the building of the wasi-sdk sysroot to leverage the `-resource-dir` argument from Clang to avoid modifying the host compiler's sysroot with compiler-rt things. This should help improve the experience of building a standalone sysroot with whatever host Clang is on the system. Closes WebAssembly#444
39fd460
to
98cb31f
Compare
cc: @whitequark, does this help towards resolving the discussion you were having over in #443 (comment)? I'm thinking of merging this but wanted to hear whether you had any additional feedback 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.
LGTM
have you ever tested if this change actually "avoid modifying the host compiler's sysroot with compiler-rt things"? |
Yes I tested this doesn't modify the host compiler's sysroot. No there is no test of using the host toolchain in CI. Yes it would be great to add tests. |
did your "host compiler" already happen to have wasi compiler-rt? |
On Ubuntu 24.04 I ran:
and everything compiled ok. No the host compiler does not have a compiler-rt for wasm. |
where did clang/clang++/llvm-nm-18 come from? ubuntu package? which compiler-rt does it link for wasi-libc without WebAssembly/wasi-libc#517? |
The As to what links compiler-rt is linked, I'm not sure. |
To include WebAssembly/wasi-libc#517, which is necessary to avoid modifying host compiler's resource directory. At least on my environment (macOS if it matters), without the above mentioned fix, gmake tries to create the directory for wasi compiler-rt during wasi-libc build. I'm not sure why it didn't happen for others. cf. WebAssembly#445
To include WebAssembly/wasi-libc#517, which is necessary to avoid modifying host compiler's resource directory. At least on my environment (macOS if it matters), without the above mentioned fix, gmake tries to create the directory for wasi compiler-rt during wasi-libc build. I'm not sure why it didn't happen for others. cf. #445
This commit updates the building of the wasi-sdk sysroot to leverage the
-resource-dir
argument from Clang to avoid modifying the host compiler's sysroot with compiler-rt things. This should help improve the experience of building a standalone sysroot with whatever host Clang is on the system.Closes #444