emscripten-core / emscripten-core/emscripten
Warnings while building shared library through cmake
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Using emsdk 3.1.45
I am trying to build a shared lib for a the [cppinterop](https://github.com/compiler-research/CppInterOp) library.
The cmake goes like this
```
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1")
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1")
set(CMAKE_STRIP FALSE)
add_library(clangCppInterOp SHARED
CppInterOp.cpp
CXCppInterOp.cpp
DynamicLibraryManager.cpp
DynamicLibraryManagerSymbol.cpp
Paths.cpp
)
target_link_libraries(clangCppInterOp clangInterpreter)
)
```
The first 4 lines are inspired by this comment on how to build shared libs through cmake (https://github.com/emscripten-core/emscripten/issues/15276#issuecomment-1039349267 )
Now while building it I see the following warnings/errors (the build is succesful and i can make use of it though)
```
(xeus-cpp-wasm-build) anutosh491@Anutoshs-MacBook-Air build2 % emmake make -j1
make: make -j1
[ 16%] Linking CXX shared library ../libclangCppInterOp.so
em++: warning: ignoring unsupported linker flag: `-soname` [-Wlinkflags]
wasm-ld: warning: unknown -z value: defs
```
Contributor guide
Assessment
This issue has not been assessed yet.