Skip to content

Commit

Permalink
Fix CMake args
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneWizard08 committed Jan 30, 2023
1 parent 71bfcd2 commit 4b9e401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grpc-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ SET(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/protobuf)

ADD_SUBDIRECTORY(${PROTOBUF_ROOT_DIR}/cmake deps/protobuf)

SET(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++ -static -Wl,-Bstatic")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector -static -Wl,-Bstatic")
SET(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-stack-protector")

ADD_EXECUTABLE(grpc_node_plugin
src/node_generator.cc
Expand Down
4 changes: 4 additions & 0 deletions packages/grpc-tools/linux.toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
IF(UNIX AND NOT APPLE)
SET(CMAKE_COMPILER_PREFIX "")

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -Wl,-Bstatic")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -Wl,-Bstatic")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -Wl,-Bstatic")

IF(GRPC_TOOLS_TARGET STREQUAL "x86_64")
SET(CMAKE_COMPILER_PREFIX "x86_64-linux-gnu-")

Expand Down

0 comments on commit 4b9e401

Please sign in to comment.