Skip to content

Conversation

@shravanrn
Copy link
Collaborator

@shravanrn shravanrn commented Oct 15, 2024

WASM_RT_THREAD_LOCAL should use __thread compiler intrinsic where possible (gcc, clang, icc) to avoid making C11 a hard dependency to compile the wasm2c runtime. This is a necessity for Segue as well as it also uses a thread_local variable.

@shravanrn shravanrn requested review from keithw and sbc100 October 15, 2024 05:39
@shravanrn shravanrn marked this pull request as draft October 16, 2024 02:03
@shravanrn shravanrn force-pushed the threadlocal-fix branch 2 times, most recently from 24d3c1d to b4870bb Compare October 27, 2024 22:32
@shravanrn shravanrn changed the title wasm2c: Fix WASM_RT_THREAD_LOCAL to check for __thread and add an error path wasm2c: Cleanup TLS: check for __thread and declare TLS vars only when needed Oct 27, 2024
@shravanrn shravanrn marked this pull request as ready for review October 27, 2024 22:53
@shravanrn
Copy link
Collaborator Author

@sbc100 This is now ready for review. Could you please help land this when you have a chance?

@shravanrn shravanrn enabled auto-merge (rebase) October 28, 2024 21:01
@shravanrn shravanrn merged commit 1af9589 into WebAssembly:main Oct 28, 2024
@shravanrn shravanrn deleted the threadlocal-fix branch October 28, 2024 21:18
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.

2 participants