
This makes sure that a stack overflow will cause a "memory access out of bounds" error instead of a corruption of a global variable. Here is more background on a very similar stack overflow protection: https://blog.japaric.io/stack-overflow-protection/
21 строка
429 Б
JSON
21 строка
429 Б
JSON
{
|
|
"llvm-target": "wasm32-unknown-unknown-wasm",
|
|
"build-tags": ["js", "wasm"],
|
|
"goos": "js",
|
|
"goarch": "wasm",
|
|
"compiler": "clang",
|
|
"linker": "wasm-ld",
|
|
"cflags": [
|
|
"--target=wasm32",
|
|
"-nostdlibinc",
|
|
"-Wno-macro-redefined",
|
|
"-Oz"
|
|
],
|
|
"ldflags": [
|
|
"--allow-undefined",
|
|
"--no-threads",
|
|
"--stack-first",
|
|
"--export-all"
|
|
],
|
|
"emulator": ["node", "targets/wasm_exec.js"]
|
|
}
|