diff --git a/src/tools/emscripten.jam b/src/tools/emscripten.jam index d6594c5e435..105cf7daadc 100644 --- a/src/tools/emscripten.jam +++ b/src/tools/emscripten.jam @@ -6,6 +6,7 @@ import feature ; import os ; import toolset ; +import generators ; import common ; import gcc ; import type ; @@ -50,10 +51,14 @@ toolset.inherit-flags emscripten : gcc off on off on ; +generators.override builtin.lib-generator : emscripten.prebuilt ; +generators.override emscripten.searched-lib-generator : searched-lib-generator ; + +toolset.add-requirements emscripten:"$(NODEJS)" ; 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" ; +type.set-generated-target-suffix OBJ : emscripten : "a" ; +type.set-generated-target-suffix STATIC_LIB : emscripten : "a" ; toolset.flags emscripten.compile OPTIONS ; toolset.flags emscripten.compile OPTIONS ; @@ -102,5 +107,5 @@ toolset.flags emscripten.link USER_OPTIONS ; actions link bind LIBRARIES { - "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) + "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -r -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) }