Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for full LTO build #798

Merged
merged 2 commits into from
Mar 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function(tbb_add_test)
# Expand the linker rpath by the CMAKE_LIBRARY_OUTPUT_DIRECTORY path since clang compiler from Android SDK
# doesn't respect the -L flag.
target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE "-Wl,--rpath-link,${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
target_link_libraries(${_tbb_test_TARGET_NAME} PRIVATE -rdynamic) # for the test_dynamic_link
add_test(NAME ${_tbb_test_TARGET_NAME}
COMMAND ${CMAKE_COMMAND}
-DBINARIES_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
Expand Down Expand Up @@ -94,7 +93,6 @@ function(tbb_add_c_test)
target_include_directories(${_tbb_test_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR})

if (ANDROID_PLATFORM)
target_link_libraries(${_tbb_test_NAME} PRIVATE -rdynamic) # for the test_dynamic_link
add_test(NAME ${_tbb_test_NAME}
COMMAND ${CMAKE_COMMAND}
-DBINARIES_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
Expand Down Expand Up @@ -369,6 +367,9 @@ if (TARGET TBB::tbb)
tbb_add_test(SUBDIR tbb NAME test_allocators DEPENDENCIES TBB::tbb)
tbb_add_test(SUBDIR tbb NAME test_arena_priorities DEPENDENCIES TBB::tbb)
tbb_add_test(SUBDIR tbb NAME test_dynamic_link DEPENDENCIES TBB::tbb)
if (APPLE OR ANDROID_PLATFORM)
target_link_libraries(test_dynamic_link PRIVATE -rdynamic) # for the test_dynamic_link
endif()
tbb_add_test(SUBDIR tbb NAME test_collaborative_call_once DEPENDENCIES TBB::tbb)
tbb_add_test(SUBDIR tbb NAME test_concurrent_lru_cache DEPENDENCIES TBB::tbb)
tbb_add_test(SUBDIR tbb NAME test_concurrent_unordered_map DEPENDENCIES TBB::tbb)
Expand Down Expand Up @@ -575,7 +576,6 @@ if (TARGET TBB::tbbmalloc)
${TBBMALLOC_LIB_COMPILE_FLAGS}
)
if (ANDROID_PLATFORM)
target_link_libraries(test_malloc_whitebox PRIVATE -rdynamic) # for the test_dynamic_link
add_test(NAME test_malloc_whitebox
COMMAND ${CMAKE_COMMAND}
-DBINARIES_PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
Expand Down