Skip to content

Commit

Permalink
Merge branch 'func-js-bin-mainline' into func-debug-info
Browse files Browse the repository at this point in the history
  • Loading branch information
krigga committed Aug 13, 2024
2 parents c538837 + ffe0a1c commit 845b7a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assembly/wasm/fift-func-wasm-build-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ emcmake cmake -DUSE_EMSCRIPTEN=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAK
test $? -eq 0 || { echo "Can't configure TON with emmake "; exit 1; }
cp -R ../crypto/smartcont ../crypto/fift/lib crypto

emmake make -j16 funcfiftlib func fift tlbc emulator-emscripten
emmake make -j16 funcfiftlib funcfiftlib-portable func fift tlbc emulator-emscripten

test $? -eq 0 || { echo "Can't compile TON with emmake "; exit 1; }

Expand Down
21 changes: 21 additions & 0 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,27 @@ if (USE_EMSCRIPTEN)
target_link_options(funcfiftlib PRIVATE --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/funcfiftlib/funcfiftlib-prejs.js)
target_link_options(funcfiftlib PRIVATE -fexceptions)
target_compile_options(funcfiftlib PRIVATE -fexceptions -fno-stack-protector)

add_executable(funcfiftlib-portable funcfiftlib/funcfiftlib.cpp ${FUNC_LIB_SOURCE})
target_include_directories(funcfiftlib-portable PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(funcfiftlib-portable PUBLIC fift-lib src_parser git)
target_link_options(funcfiftlib-portable PRIVATE -sEXPORTED_RUNTIME_METHODS=FS,ccall,cwrap,UTF8ToString,stringToUTF8,lengthBytesUTF8,addFunction,removeFunction,setValue)
target_link_options(funcfiftlib-portable PRIVATE -sEXPORTED_FUNCTIONS=_func_compile,_version,_malloc,_free,_setThrew)
target_link_options(funcfiftlib-portable PRIVATE -sEXPORT_NAME=CompilerModule)
target_link_options(funcfiftlib-portable PRIVATE -sERROR_ON_UNDEFINED_SYMBOLS=0)
target_link_options(funcfiftlib-portable PRIVATE -sFILESYSTEM=1)
target_link_options(funcfiftlib-portable PRIVATE -Oz)
target_link_options(funcfiftlib-portable PRIVATE -sIGNORE_MISSING_MAIN=1)
target_link_options(funcfiftlib-portable PRIVATE -sAUTO_NATIVE_LIBRARIES=0)
target_link_options(funcfiftlib-portable PRIVATE -sMODULARIZE=1)
target_link_options(funcfiftlib-portable PRIVATE -sTOTAL_MEMORY=33554432)
target_link_options(funcfiftlib-portable PRIVATE -sALLOW_MEMORY_GROWTH=1)
target_link_options(funcfiftlib-portable PRIVATE -sALLOW_TABLE_GROWTH=1)
target_link_options(funcfiftlib-portable PRIVATE --embed-file ${CMAKE_CURRENT_SOURCE_DIR}/fift/lib@/fiftlib)
target_link_options(funcfiftlib-portable PRIVATE --pre-js ${CMAKE_CURRENT_SOURCE_DIR}/funcfiftlib/funcfiftlib-prejs.js)
target_link_options(funcfiftlib-portable PRIVATE -sENVIRONMENT=web)
target_link_options(funcfiftlib-portable PRIVATE -fexceptions)
target_compile_options(funcfiftlib-portable PRIVATE -fexceptions -fno-stack-protector)
endif()

add_executable(tlbc tl/tlbc.cpp)
Expand Down

0 comments on commit 845b7a6

Please sign in to comment.