Skip to content

Commit

Permalink
Don't use --whole-archive
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed May 10, 2024
1 parent a1d7d6b commit 680cf22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ else()

link_libraries(
"roc"
"stdc++"
"pthread"
)
endif()

Expand Down Expand Up @@ -170,6 +168,11 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
link_libraries(Threads::Threads)

# for libroc.a
link_libraries(
"stdc++"
)

add_definitions(
-DROC_PULSEAUDIO_VERSION=${PULSEAUDIO_VERSION}
)
Expand Down
6 changes: 2 additions & 4 deletions cmake/download_roc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ include_directories(SYSTEM
"${CMAKE_CURRENT_BINARY_DIR}/roc-prefix/include"
)

set(LIBROC "${CMAKE_CURRENT_BINARY_DIR}/roc-prefix/lib/libroc.a")

set(CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -Wl,--whole-archive ${LIBROC} -Wl,--no-whole-archive -lstdc++"
link_libraries(
"${CMAKE_CURRENT_BINARY_DIR}/roc-prefix/lib/libroc.a"
)

0 comments on commit 680cf22

Please sign in to comment.