Skip to content

Commit

Permalink
COMP: Remove invalid Emscripten HDF5 link flags
Browse files Browse the repository at this point in the history
Addresses:

FAILED: bin/H5detect.js
: && /emsdk_portable/emscripten/sdk/emcc -std=c99 -Wno-warn-absolute-paths --memory-init-file 0 -s WASM=0 -lnodefs.js -Wno-almost-asm  -Wno-uninitialized -Wno-unused-parameter -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow  -w -DNDEBUG -O2  -O2 Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/H5detect.dir/H5detect.c.o  -o bin/H5detect.js  -l"-O0" && :
shared:ERROR: emcc: cannot find library "-O0"
[1545/2207] Linking C executable bin/H5make_libsettings.js
FAILED: bin/H5make_libsettings.js
: && /emsdk_portable/emscripten/sdk/emcc -std=c99 -Wno-warn-absolute-paths --memory-init-file 0 -s WASM=0 -lnodefs.js -Wno-almost-asm  -Wno-uninitialized -Wno-unused-parameter -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow  -w -DNDEBUG -O2  -O2 Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeFiles/H5make_libsettings.dir/H5make_libsettings.c.o  -o bin/H5make_libsettings.js  -l"-O0" && :
shared:ERROR: emcc: cannot find library "-O0"

This flags are invalid, at least with newer Emscripten, and not required.
  • Loading branch information
thewtex committed Feb 17, 2021
1 parent 63150f0 commit 6146b3a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Modules/ThirdParty/HDF5/src/itkhdf5/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,6 @@ if (NOT EXISTS "${HDF5_GENERATED_SOURCE_DIR}/H5Tinit.c")
TARGET_C_PROPERTIES (H5detect STATIC)
target_link_libraries (H5detect
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)

if (HDF5_BATCH_H5DETECT)
Expand Down Expand Up @@ -1043,7 +1042,6 @@ target_compile_definitions(H5make_libsettings PUBLIC ${HDF_EXTRA_C_FLAGS} ${HDF_
TARGET_C_PROPERTIES (H5make_libsettings STATIC)
target_link_libraries (H5make_libsettings
PRIVATE "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>" $<$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:MinGW>>:ws2_32.lib>
PRIVATE $<$<PLATFORM_ID:Emscripten>:"-O0">
)

add_custom_command (
Expand Down

0 comments on commit 6146b3a

Please sign in to comment.