Skip to content

Commit

Permalink
build(wasi): Add support for printscan-long-double
Browse files Browse the repository at this point in the history
Explicitly required for std::strtold, used by CLI11.
  • Loading branch information
thewtex committed Feb 6, 2023
1 parent 403c3a8 commit 6634822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ FetchContent_Declare(
)

set(CLI11_GIT_REPOSITORY "https://github.com/CLIUtils/CLI11")
# std::strtold patch
set(CLI11_GIT_REPOSITORY "https://github.com/thewtex/CLI11")
set(CLI11_GIT_TAG "82d4e022cdfcf18d1fc59684bdc6977ea34053f4")
# v2.3.2
set(CLI11_GIT_TAG "291c58789c031208f08f4f261a858b5b7083e8e2")
FetchContent_Declare(
cli11
GIT_REPOSITORY ${CLI11_GIT_REPOSITORY}
Expand Down
4 changes: 2 additions & 2 deletions src/docker/itk-wasm-base/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ for param; do
done
set -- "${newparams[@]}" # overwrites the original positional params

wasi_ld_flags="-flto -lwasi-emulated-process-clocks -lwasi-emulated-signal"
wasi_ld_flags="-flto -lwasi-emulated-process-clocks -lwasi-emulated-signal -lc-printscan-long-double"
wasi_c_flags="-flto -D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_SIGNAL"

emscripten_debug_ld_flags="-fno-lto -s ALLOW_MEMORY_GROWTH=1"
emscripten_debug_c_flags="-fno-lto -Wno-warn-absolute-paths"

wasi_debug_ld_flags="-fno-lto -lwasi-emulated-process-clocks -lwasi-emulated-signal"
wasi_debug_ld_flags="-fno-lto -lwasi-emulated-process-clocks -lwasi-emulated-signal -lc-printscan-long-double"
wasi_debug_c_flags="-fno-lto -D_WASI_EMULATED_PROCESS_CLOCKS -D_WASI_EMULATED_SIGNAL"

docker build -t itkwasm/emscripten-base:latest \
Expand Down

0 comments on commit 6634822

Please sign in to comment.