aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2021-01-14 12:30:16 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2021-01-20 19:10:21 +0000
commitd808429a483c0cac7e2d27ba68d0d9d4ca13053e (patch)
treedbcea413887815acde84cdec2fc31c3678cd190a
parent2e48d13fa2762fd0b3316a76705318be94db8e21 (diff)
downloadmeson-d808429a483c0cac7e2d27ba68d0d9d4ca13053e.zip
meson-d808429a483c0cac7e2d27ba68d0d9d4ca13053e.tar.gz
meson-d808429a483c0cac7e2d27ba68d0d9d4ca13053e.tar.bz2
Avoid accidental use of STANDALONE_WASM mode on compiler tests
Compiler tests, such as checking for atomics support, could fail when compiling to WebAssembly multithreaded targets because the compiler tests got compiled to 'output.wasm'. Using the '.wasm' suffix in recent versions of emscripten engages STANDALONE_WASM mode, which disables features that require a JS runtime like shared memory. This created false negatives on support of those features when building a library to be linked into an executable that is not in STANDALONE_WASM mode. Changing these to 'output.o' will continue to produce WebAssembly object files, but they will no longer be configured for standalone runtime mode.
-rw-r--r--mesonbuild/compilers/mixins/emscripten.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/emscripten.py b/mesonbuild/compilers/mixins/emscripten.py
index fc0b21e..57295d0 100644
--- a/mesonbuild/compilers/mixins/emscripten.py
+++ b/mesonbuild/compilers/mixins/emscripten.py
@@ -43,7 +43,7 @@ class EmscriptenMixin(Compiler):
if mode == 'link':
suffix = 'js'
else:
- suffix = 'wasm'
+ suffix = 'o'
return os.path.join(dirname, 'output.' + suffix)
def thread_flags(self, env: 'Environment') -> T.List[str]: