Skip to content

Commit

Permalink
Merge pull request #518 from ewasm/engine-symbols
Browse files Browse the repository at this point in the history
CMake: Hide symbols from wasm engines included
  • Loading branch information
axic authored Apr 26, 2019
2 parents db3bb2b + ab29b42 commit 5274292
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/ProjectWAVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set(llvmjit_library ${binary_dir}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}LLVMJIT${CMA

set(other_libraries ${platform_library} ${wasm_library} ${ir_library} ${logging_library} ${unwind_library} ${llvmjit_library})

set(flags "-Wno-error -fvisibility=hidden")

ExternalProject_Add(wavm
PREFIX ${prefix}
Expand All @@ -41,7 +42,8 @@ ExternalProject_Add(wavm
-DCMAKE_BUILD_TYPE=Release
-DLLVM_DIR=${LLVM_DIR}
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_CXX_FLAGS=-Wno-error
-DCMAKE_CXX_FLAGS=${flags}
-DCMAKE_C_FLAGS=${flags}
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${runtime_library} ${other_libraries}
)
Expand Down
2 changes: 2 additions & 0 deletions cmake/ProjectWabt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ExternalProject_Add(wabt
-DBUILD_TESTS=OFF
-DBUILD_TOOLS=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_CXX_FLAGS=-fvisibility=hidden
-DCMAKE_C_FLAGS=-fvisibility=hidden
INSTALL_COMMAND ""
BUILD_BYPRODUCTS ${wabt_library}
)
Expand Down

0 comments on commit 5274292

Please sign in to comment.