mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update emscripten build to be compatible with new docker image.
This commit is contained in:
parent
d0c8c79888
commit
10c742ed0a
@ -150,7 +150,8 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM_ASYNC_COMPILATION=0")
|
||||
# Output a single js file with the wasm binary embedded as base64 string.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s SINGLE_FILE=1")
|
||||
|
||||
# Allow new functions to be added to the wasm module via addFunction.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s ALLOW_TABLE_GROWTH=1")
|
||||
# Disable warnings about not being pure asm.js due to memory growth.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-almost-asm")
|
||||
endif()
|
||||
|
@ -1,2 +0,0 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/default.cmake")
|
||||
include("$ENV{EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake")
|
@ -2,7 +2,7 @@ if (EMSCRIPTEN)
|
||||
# Specify which functions to export in soljson.js.
|
||||
# Note that additional Emscripten-generated methods needed by solc-js are
|
||||
# defined to be exported in cmake/EthCompilerSettings.cmake.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_solidity_license\",\"_solidity_version\",\"_solidity_compile\",\"_solidity_alloc\",\"_solidity_free\",\"_solidity_reset\"]' -s RESERVED_FUNCTION_POINTERS=20")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_solidity_license\",\"_solidity_version\",\"_solidity_compile\",\"_solidity_alloc\",\"_solidity_free\",\"_solidity_reset\"]'")
|
||||
add_executable(soljson libsolc.cpp libsolc.h)
|
||||
target_link_libraries(soljson PRIVATE solidity)
|
||||
else()
|
||||
|
@ -56,8 +56,7 @@ fi
|
||||
|
||||
mkdir -p $BUILD_DIR
|
||||
cd $BUILD_DIR
|
||||
cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/emscripten.cmake \
|
||||
emcmake cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBoost_USE_STATIC_LIBS=1 \
|
||||
-DBoost_USE_STATIC_RUNTIME=1 \
|
||||
|
Loading…
Reference in New Issue
Block a user