@@ -45,11 +45,26 @@ cmake.args = ["-C", "llvm_wasm_cache.cmake"]
4545CMAKE_BUILD_TYPE = { env = " CMAKE_BUILD_TYPE" , default = " Release" }
4646CMAKE_C_COMPILER_LAUNCHER = { env = " CMAKE_C_COMPILER_LAUNCHER" , default = " " }
4747CMAKE_CXX_COMPILER_LAUNCHER = { env = " CMAKE_CXX_COMPILER_LAUNCHER" , default = " " }
48- # re -Wno-undefined see https://github.com/emscripten-core/emscripten/issues/21516
49- # missing symbol: _LLVMAddSymbol
50- CMAKE_EXE_LINKER_FLAGS = " -sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT -Wno-undefined"
51- CMAKE_SHARED_LINKER_FLAGS = " -sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT -Wno-undefined"
52- CMAKE_MODULE_LINKER_FLAGS = " -sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT -Wno-undefined"
48+ # https://github.com/emscripten-core/emscripten/issues/25911
49+ # https://github.com/pyodide/pyodide/blob/7f2feb1a673b7b610cf17bfc8a48727687843cd3/docs/development/abi.md?plain=1#L40C34-L40C49
50+ # Linking a shared libraries with `-sSIDE_MODULE=1` will pass `-whole-archive` to
51+ # `wasm-ld` and so force inclusion of all object files and all symbols. Linking
52+ # with `-sSIDE_MODULE=2` will only include symbols that are explicitly listed with
53+ # `-sEXPORTED_FUNCTIONS=<export list>`. The name of each symbol in the list must
54+ # be prefixed with an underscore.
55+ # https://github.com/emscripten-core/emscripten/blob/04fda5c8e488985bd5825a11e21373316dd133e4/site/source/docs/getting_started/FAQ.rst?plain=1#L461-L463
56+ # https://github.com/pyodide/pyodide/blob/7f2feb1a673b7b610cf17bfc8a48727687843cd3/docs/development/abi.md
57+
58+ # CMAKE_C_FLAGS = "-sLINKABLE -Wl,-allow-multiple-definition"
59+ # CMAKE_CXX_FLAGS = "-sLINKABLE -Wl,-allow-multiple-definition"
60+ CMAKE_C_FLAGS = " -sLINKABLE"
61+ CMAKE_CXX_FLAGS = " -sLINKABLE"
62+ CMAKE_EXE_LINKER_FLAGS = " -sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT"
63+ CMAKE_SHARED_LINKER_FLAGS = " -sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT"
64+ CMAKE_MODULE_LINKER_FLAGS = " -sALLOW_TABLE_GROWTH -sASSERTIONS -sWASM_BIGINT"
65+ # De-duplicate libraries on link lines based on linker capabilities.
66+ # minimum cmake version is 3.29
67+ CMAKE_POLICY_DEFAULT_CMP0156 = " NEW"
5368CMAKE_VERBOSE_MAKEFILE = " ON"
5469
5570# so that NATIVE doesn't try to get built
0 commit comments