Skip to content

Commit dbb7f1e

Browse files
merge main
2 parents 53e0927 + 8d88a4a commit dbb7f1e

13 files changed

Lines changed: 912 additions & 1380 deletions

File tree

javascript/CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55

66
cmake_minimum_required(VERSION 3.13...3.26)
77
set(CMAKE_VERBOSE_MAKEFILE on)
8-
project(yoga)
8+
project(yoga C CXX)
99

10-
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
10+
file(GLOB_RECURSE YOGA_SOURCES CONFIGURE_DEPENDS
1111
${CMAKE_CURRENT_SOURCE_DIR}/../yoga/*.cpp
12-
${CMAKE_CURRENT_SOURCE_DIR}/../yoga/**/*.cpp
13-
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
12+
${CMAKE_CURRENT_SOURCE_DIR}/../yoga/**/*.cpp)
13+
14+
set(BRIDGE_SOURCES
15+
${CMAKE_CURRENT_SOURCE_DIR}/src/wasm_bridge.c)
1416

1517
include_directories(..)
1618

1719
set(CMAKE_CXX_STANDARD 20)
1820

19-
add_compile_definitions(
20-
EMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0)
21-
2221
set(COMPILE_OPTIONS
2322
-flto
2423
-fno-exceptions
2524
-fno-rtti
25+
-Wno-ignored-attributes
2626
-g0
2727
-Os
2828
"SHELL:-s STRICT=1")
@@ -32,7 +32,6 @@ add_compile_options(${COMPILE_OPTIONS})
3232
add_link_options(
3333
${COMPILE_OPTIONS}
3434
"SHELL:--closure 1"
35-
"SHELL:--memory-init-file 0"
3635
"SHELL:--no-entry"
3736
"SHELL:-s ALLOW_MEMORY_GROWTH=1"
3837
"SHELL:-s ASSERTIONS=0"
@@ -44,16 +43,16 @@ add_link_options(
4443
"SHELL:-s MODULARIZE=1"
4544
"SHELL:-s EXPORT_ES6=1"
4645
"SHELL:-s WASM=1"
47-
"SHELL:-s TEXTDECODER=0"
46+
"SHELL:-s TEXTDECODER=2"
4847
"SHELL:-s SUPPORT_BIG_ENDIAN=1"
4948
# SINGLE_FILE=1 combined with ENVIRONMENT='web' creates code that works on
5049
# both bundlders and Node.
5150
"SHELL:-s SINGLE_FILE=1"
52-
"SHELL:-s ENVIRONMENT='web'")
53-
54-
link_libraries(embind)
51+
"SHELL:-s ENVIRONMENT='web'"
52+
"SHELL:-s EXPORTED_RUNTIME_METHODS=['HEAPF32','HEAP32']"
53+
"SHELL:-Wl,--export-dynamic")
5554

56-
add_library(yogaObjLib OBJECT ${SOURCES})
55+
add_library(yogaObjLib OBJECT ${YOGA_SOURCES} ${BRIDGE_SOURCES})
5756

5857
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/binaries)
5958

javascript/just.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function runBenchTask() {
137137
};
138138
}
139139

140-
const emsdkVersion = '3.1.28';
140+
const emsdkVersion = '4.0.23';
141141
const emsdkPath = path.join(__dirname, '.emsdk');
142142
const emsdkBin = path.join(
143143
emsdkPath,

javascript/src/Config.cpp

Lines changed: 0 additions & 54 deletions
This file was deleted.

javascript/src/Config.h

Lines changed: 0 additions & 44 deletions
This file was deleted.

javascript/src/Layout.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)