Skip to content

[DNM] Address Sanitizer for Wasm/WASI #1897

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kateinoigakukun
Copy link
Member

This is just for building toolchain via xrepo CI

Previously, we used `Triple.platformName(conflatingDarwin: true)` to
derive the OS directory under <ResourceDir>/lib/, which was documented
as “the name clang uses”. However, this was in fact closer to what
Swift itself uses for resource directories, and it diverged from
Clang’s behavior in some cases.

For example, for wasm32-unknown-wasip1-threads, Swift uses "wasi" as the
OS name, but Clang uses "wasip1", matching the result of Triple::getOS,
in their resource directory lookup.

This patch aligns the behavior with Clang’s logic for looking up the
compiler resource directory libraries.
We are adding support for sanitizers on WASI targets. This commit
adds driver support by unblocking hard-coded checks and forwarding
sanitizer flags to clang linker driver.
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 this pull request may close these issues.

1 participant