Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Nov 23, 2023
1 parent 57af457 commit d9c2b0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,20 @@ if(SANDBOX)
endif()

if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
target_link_libraries(${PROJECT_NAME} "-s SIMD=1")
target_link_libraries(${PROJECT_NAME} "-s EVAL_CTORS=1")
target_link_libraries(${PROJECT_NAME} "-s WASM_BIGINT=1")
target_link_libraries(${PROJECT_NAME} "-s DISABLE_EXCEPTION_CATCHING=1")
target_link_libraries(${PROJECT_NAME} "-s ALLOW_MEMORY_GROWTH=1")
target_link_libraries(${PROJECT_NAME} "-s INITIAL_MEMORY=134217728")
target_link_libraries(${PROJECT_NAME} "-s EXPORTED_RUNTIME_METHODS=['callMain']")

# target_link_libraries(${PROJECT_NAME} "--profiling")
# target_link_libraries(${PROJECT_NAME} "-s RUNTIME_DEBUG")
# target_link_libraries(${PROJECT_NAME} "-s ASSERTIONS=1")
# target_link_libraries(${PROJECT_NAME} "-s NO_DISABLE_EXCEPTION_CATCHING")

target_link_libraries(${PROJECT_NAME} "-s ALLOW_MEMORY_GROWTH=1")
target_link_libraries(${PROJECT_NAME} "-s INITIAL_MEMORY=134217728")
target_link_libraries(${PROJECT_NAME} "-s EXPORTED_RUNTIME_METHODS=['callMain']")

target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -pedantic -O2 -flto)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -pedantic -O3 -fno-exceptions -flto)
elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
if (MSVC)
target_compile_options(${PROJECT_NAME} PRIVATE /W4 /Od /Zi)
Expand Down
4 changes: 2 additions & 2 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ application::application(int argc, char **argv) {
int application::run() {

Check warning on line 24 in src/application.cpp

View workflow job for this annotation

GitHub Actions / lint

/src/application.cpp:24:18 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 24 in src/application.cpp

View workflow job for this annotation

GitHub Actions / lint

/src/application.cpp:24:18 [readability-convert-member-functions-to-static]

method 'run' can be made static
try {
#if SANDBOX
storage::filesystem::mount("../assets/sandbox", "/");
// storage::filesystem::mount("/opt/workspace/carimbolabs/snake", "/");
// storage::filesystem::mount("../assets/sandbox", "/");
storage::filesystem::mount("/opt/workspace/flippingpixels/snake", "/");
#else
storage::filesystem::mount("bundle.7z", "/");
#endif
Expand Down

0 comments on commit d9c2b0c

Please sign in to comment.