mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-13 12:07:41 +00:00
fix: disable TBB LTCG to allow linking with lld-link
oneTBB enables MSVC IPO/LTCG by default, which emits MSVC proprietary bitcode objects when built with cl.exe. lld-link cannot consume those /GL objects. Patch the TBB MSVC compiler settings so IPO can be disabled and the dependency produces native COFF objects that both link.exe and lld-link can consume.
This commit is contained in:
6
deps/TBB/TBB.cmake
vendored
6
deps/TBB/TBB.cmake
vendored
@@ -1,4 +1,6 @@
|
||||
if (FLATPAK AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
if (MSVC)
|
||||
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/MSVC.cmake ./cmake/compilers/MSVC.cmake)
|
||||
elseif (FLATPAK AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/GNU.cmake ./cmake/compilers/GNU.cmake)
|
||||
else()
|
||||
set(_patch_command "")
|
||||
@@ -13,6 +15,8 @@ orcaslicer_add_cmake_project(
|
||||
-DTBB_BUILD_SHARED=OFF
|
||||
-DTBB_BUILD_TESTS=OFF
|
||||
-DTBB_TEST=OFF
|
||||
-DTBB_ENABLE_IPO=OFF
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DCMAKE_DEBUG_POSTFIX=_debug
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user