Skip to content

Commit

Permalink
[unity]linux下nodejs后端找不到符号的问题,fix #1696 , 并打开linux node的测试
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Apr 11, 2024
1 parent ee388e5 commit 2cb06a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/unity_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ jobs:
npm i
cd test/dotnet
node ../../cli dotnet-test v8_9.4
#- name: UnitTest-nodejs
# run: |
# cd unity/test/dotnet
# node ../../cli dotnet-test nodejs_16
- name: UnitTest-nodejs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test nodejs_16
- name: UnitTest-quickjs
run: |
cd unity/test/dotnet
Expand Down
8 changes: 5 additions & 3 deletions unity/native_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,11 @@ elseif (UNIX)

# definition
list(APPEND PUERTS_COMPILE_DEFINITIONS PLATFORM_LINUX)
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
if (NOT ("${JS_ENGINE}" STREQUAL "nodejs_16"))
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
endif ()
endif ()

# link
Expand Down
8 changes: 5 additions & 3 deletions unity/native_src_il2cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ elseif (UNIX)

# definition
target_compile_definitions (puerts_il2cpp PRIVATE PLATFORM_LINUX)
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
if (NOT ("${JS_ENGINE}" STREQUAL "nodejs_16"))
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
endif ()
endif ()

# link
Expand Down

0 comments on commit 2cb06a7

Please sign in to comment.