From 833a0abbea3095dc865ecd4f00e7dc7fbeeb270e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 4 Aug 2016 09:01:46 -0500 Subject: [PATCH] Support static libs for emscripten building. --- src/tools/emscripten.jam | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tools/emscripten.jam b/src/tools/emscripten.jam index 292e0f092..74e3c200a 100644 --- a/src/tools/emscripten.jam +++ b/src/tools/emscripten.jam @@ -54,6 +54,7 @@ toolset.inherit-flags emscripten : gcc type.set-generated-target-suffix EXE : emscripten : "js" ; type.set-generated-target-suffix OBJ : emscripten : "bc" ; +type.set-generated-target-suffix STATIC_LIB : emscripten : "bc" ; toolset.flags emscripten.compile OPTIONS ; toolset.flags emscripten.compile OPTIONS ; @@ -81,7 +82,7 @@ toolset.flags emscripten OPTIONS off : -g0 ; toolset.flags emscripten OPTIONS on : -g4 ; toolset.flags emscripten OPTIONS off : -fno-rtti ; -toolset.flags emscripten OPTIONS on : --bind ; +toolset.flags emscripten.link OPTIONS on : --bind ; toolset.flags emscripten.link OPTIONS on : --closure 1 ; toolset.flags emscripten.link OPTIONS full : --closure 2 ; toolset.flags emscripten.link OPTIONS off : --llvm-lto 0 ; @@ -98,6 +99,11 @@ actions compile.c++ "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } +actions archive +{ + "$(CONFIG_COMMAND)" $(AROPTIONS) -o "$(<)" "$(>)" +} + toolset.flags emscripten.link USER_OPTIONS ; actions link bind LIBRARIES