[all-commits] [llvm/llvm-project] 45ad34: [clang][WebAssembly] Imply -fno-threadsafe-static ...
Sam Clegg via All-commits
all-commits at lists.llvm.org
Mon Jan 31 14:30:54 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 45ad3467b708618841869cb529a814001d2295f9
https://github.com/llvm/llvm-project/commit/45ad3467b708618841869cb529a814001d2295f9
Author: Sam Clegg <sbc at chromium.org>
Date: 2022-01-31 (Mon, 31 Jan 2022)
Changed paths:
M clang/lib/Basic/Targets/WebAssembly.cpp
M clang/test/CodeGenCXX/static-init-wasm.cpp
Log Message:
-----------
[clang][WebAssembly] Imply -fno-threadsafe-static when threading is disabled
When we don't enable atomics we completely disabled threading in
which case there is no point in generating thread safe code for
static initialization.
This should always be safe because, in WebAssembly, it is not
possible to link object compiled without the atomics feature into a
mutli-threaded program.
See https://github.com/emscripten-core/emscripten/pull/16152
Differential Revision: https://reviews.llvm.org/D118571
More information about the All-commits
mailing list