dltarget
Returns the architecture the dynamic-link tools build for.
📝Syntax
arch = dltarget()
📤Output Arguments
Parameter Description
arch a string: the running architecture (see computer('arch')), or 'wasm32' for a cross build.
📄Description

dltarget() returns the architecture that dlgeneratemake, dlmake and getdynlibext build for.

By default it is the running architecture. When the environment variable NELSON_DL_TARGET is set to wasm32, the dynamic-link tools describe an Emscripten side module for the WebAssembly engine instead of a host library: dlgeneratemake generates a CMake project that includes the engine's shared compile and link settings (NELSON_WASM_BUILD_DIR/generated/wasm-runtime/side-module.cmake, default temp/build-wasm), dlmake configures it with the Emscripten toolchain found through EMSDK, and getdynlibext returns .so whatever the host is. A toolbox builder based on these functions therefore needs no change to be packaged for the browser with nmm('pack', ..., '-target', 'wasm32').

💡Examples
dltarget()
setenv('NELSON_DL_TARGET', 'wasm32');
dltarget()
getdynlibext()
setenv('NELSON_DL_TARGET', '');
🔗See Also
dlgeneratemakedlmakegetdynlibext
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub