nitc $ EnscriptenToolchain :: SELF
Type of this instance, automatically specialized in every classnitc $ EnscriptenToolchain :: default_outname
Get the default name of the executable to producenitc $ EnscriptenToolchain :: makefile_name
Get the name of the Makefile to usenitc $ EnscriptenToolchain :: write_makefile
Write the Makefilenitc :: Toolchain :: _compiler
Compiler of the target programcore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nitc :: MakefileToolchain :: compile_c_code
The C code is generated, compile it to an executablenitc :: Toolchain :: compiler=
Compiler of the target programnitc :: MakefileToolchain :: default_outname
Get the default name of the executable to producenitc :: MakefileToolchain :: defaultinit
nitc :: Toolchain :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
nitc :: MakefileToolchain :: makefile_name
Get the name of the Makefile to usecore :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: Toolchain :: root_compile_dir
Directory where to generate all filesnitc :: MakefileToolchain :: write_files
Write all source files to thecompile_dir
nitc :: MakefileToolchain :: write_makefile
Write the Makefile
class EnscriptenToolchain
super MakefileToolchain
redef fun makefile_name do return "{super}.js.mk"
redef fun default_outname do return "{super}.js"
redef fun write_makefile(compile_dir, cfiles)
do
super
var emcc_make_flags = "CC=emcc CXX=em++ CFLAGS='-Wno-unused-value -Wno-switch -Qunused-arguments -s ALLOW_MEMORY_GROWTH=1"
var release = toolcontext.opt_release.value
if release then
emcc_make_flags += "' LDFLAGS='--minify 1'"
else emcc_make_flags += " -g'"
var make_flags = self.toolcontext.opt_make_flags.value or else ""
make_flags += emcc_make_flags
self.toolcontext.opt_make_flags.value = make_flags
end
end
src/platform/emscripten.nit:41,1--63,3