From 7e2a1bb7dd92949faa55e241aa611a4c17a756af Mon Sep 17 00:00:00 2001 From: Yureka Date: Tue, 3 Aug 2021 17:56:24 +0200 Subject: [PATCH] emscripten: build multi-threaded libc --- pkgs/development/compilers/emscripten/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/emscripten/default.nix b/pkgs/development/compilers/emscripten/default.nix index a142008e2e30..47ae2f76b750 100644 --- a/pkgs/development/compilers/emscripten/default.nix +++ b/pkgs/development/compilers/emscripten/default.nix @@ -92,8 +92,10 @@ stdenv.mkDerivation rec { # wasm2c doesn't work with PIC $out/bin/emcc -s WASM2C -s STANDALONE_WASM $LTO test.c - for RELOCATABLE in "" "-s RELOCATABLE"; do - $out/bin/emcc $RELOCATABLE $LTO test.c + for MT in "" "-s USE_PTHREADS"; do + for RELOCATABLE in "" "-s RELOCATABLE"; do + $out/bin/emcc $RELOCATABLE $MT $LTO test.c + done done done popd