-
Notifications
You must be signed in to change notification settings - Fork 202
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
Add a separate install target for threaded libc #331
Conversation
Makefile
Outdated
# Threaded version necessitates a different traget, as objects from different | ||
# targets can't be mixed together while linking | ||
ifeq ($(THREAD_MODEL), posix) | ||
MULTIARCH_TRIPLE = wasm32-wasi-pthread |
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 wonder if its work being explicit here and calling this wasm32-unknown-wasi-pthread
?
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.
Also, is there a reason with have TARGET_TRIPLE and MULTIARCH_TRIPLE separated here? I would that thought that we want to just use a single triple everywhere?
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 propose we handle the vendor string in the same way as the non-pthread builds, so that the only difference is the suffix.
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.
Also, is there a reason with have TARGET_TRIPLE and MULTIARCH_TRIPLE separated here? I would that thought that we want to just use a single triple everywhere?
Should we update both to include pthread or should we only keep one variable? Both are viable solutions I think.
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.
Maybe I misread your question initially. I don't know why there are two variables, but can try to make it into just one.
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 don't know the precise state of things here, but my suggestion was just to avoid making the unknown
vendor field explicit here, since it's implicit everywhere else and making it explicit here would make more things different.
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.
Oh, I meant @sbc100's comment right before yours - it looks like he was asking why there are two variables. If there is a desire to do that I can make it into just one variable.
I've added a commit to that would leave only one triple variable in the Makefile. I am not squashing it yet, so that it is easier to drop it if that is not what we need. |
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 tested this? Does clang/llvm already support wasm32-wasi-pthread
?
I just realized I didn't build |
Produce a different sysroot directory for threaded target. Restructure `expected` directory to correspond to the target.
c2a8cbd
to
c89f692
Compare
@sbc100 how do you normally test something like that? I have built |
Until very recently there was no testing at all in this repo and testing via integration with If you have have manually verified via integration with wasi-sdk and the CI here is green I think thats good enough. |
I don't have commit privileges here, can you merge this for me? |
Produce a different sysroot directory for threaded target. Restructure `expected` directory to correspond to the target.
Use
MULTIARCH_TRIPLE
to append 'pthread' andTARGET_TRIPLE
as more genericwasm32-wasi
.To use this sysroot, one would have to compile with
--triple=wasm32-wasi-pthread
.