Experimental support for compiling to WebAssembly using Emscripten (not yet working) (nw)

This commit is contained in:
Justin Kerk 2016-10-29 06:00:45 +00:00
parent 592c51d19e
commit b99be73f2d
3 changed files with 14 additions and 0 deletions

View File

@ -742,6 +742,10 @@ endif
ifdef DEBUG_ARGS
PARAMS += --DEBUG_ARGS='$(DEBUG_ARGS)'
endif
ifdef WEBASSEMBLY
PARAMS += --WEBASSEMBLY='$(WEBASSEMBLY)'
endif
#-------------------------------------------------
# All scripts
#-------------------------------------------------

View File

@ -377,6 +377,11 @@ newoption {
description = "Arguments for running debug build.",
}
newoption {
trigger = "WEBASSEMBLY",
description = "Produce WebAssembly output when building with Emscripten.",
}
dofile ("extlib.lua")
if _OPTIONS["SHLIB"]=="1" then

View File

@ -137,6 +137,11 @@ end
.. " -s DEMANGLE_SUPPORT=1"
end
if _OPTIONS["WEBASSEMBLY"] then
emccopts = emccopts
.. " -s BINARYEN=1"
end
if _OPTIONS["ARCHOPTS"] then
emccopts = emccopts .. " " .. _OPTIONS["ARCHOPTS"]
end