Skip to content
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

Support building just a sysroot, not a toolchain #444

Closed
alexcrichton opened this issue Jul 15, 2024 · 0 comments · Fixed by #445
Closed

Support building just a sysroot, not a toolchain #444

alexcrichton opened this issue Jul 15, 2024 · 0 comments · Fixed by #445

Comments

@alexcrichton
Copy link
Collaborator

Right now this is sort of supported with the default CMake invocation of this repository but as pointed out in this comment and the discussion in that thread this doesn't fully work because compiler-rt is copied into the host toolchain. That's generally not a great thing to do.

Fixing this would require one of two things that I can think of:

  1. Support not building compiler-rt. How exactly the host toolchain gets compiler-rt, however, I'm not certain.
  2. Support the host compiler using the just-built compiler-rt. It sounds like -resource-dir is the way to go here according to the discussion in Fix determination of wasi-sdk version when built in a subdirectory #443 but I don't know how to communicate that or how best to document that (e.g. what is the exact structure of -resource-dir? What to do with target-specific headers? etc)
alexcrichton added a commit to alexcrichton/wasi-sdk that referenced this issue Jul 15, 2024
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
alexcrichton added a commit to alexcrichton/wasi-sdk that referenced this issue Jul 16, 2024
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
@abrown abrown closed this as completed in 08be2d4 Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant