Skip to content

Commit 20feba4

Browse files
committed
Try building remglk-rs with codegen-units = 1
1 parent befc70a commit 20feba4

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build
22
node_modules
3+
target
34
tests/regtest.py

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ if(NOT CMAKE_BUILD_TYPE)
1111
endif()
1212
if (${CMAKE_BUILD_TYPE} STREQUAL Release)
1313
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
14-
set(REMGLK_RS_LIB_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/remglk/target/wasm32-unknown-emscripten/release)
14+
set(REMGLK_RS_LIB_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/target/wasm32-unknown-emscripten/release)
1515
else()
16-
set(REMGLK_RS_LIB_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/remglk/target/wasm32-unknown-emscripten/debug)
16+
set(REMGLK_RS_LIB_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/target/wasm32-unknown-emscripten/debug)
1717
endif()
1818

1919
add_executable(glulxe)

Cargo.toml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[workspace]
2+
members = [
3+
"remglk/remglk",
4+
"remglk/remglk_capi",
5+
]
6+
resolver = "2"
7+
8+
[profile.release]
9+
codegen-units = 1
10+
lto = true

build.sh

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ docker run --rm -t \
3636
emglken:$DOCKER_TAG \
3737
/bin/bash -c -e " \\
3838
RUSTFLAGS=-Csymbol-mangling-version=v0 cargo build \\
39-
--manifest-path=remglk/Cargo.toml \\
4039
$RUST_TARGET \\
4140
--target=wasm32-unknown-emscripten; \\
4241
emcmake cmake -DCMAKE_BUILD_TYPE=$CMAKE_TYPE -S . -B build; \\

0 commit comments

Comments
 (0)