Skip to content

Commit 270e7b9

Browse files
authored
[BUILD] Fix python related build problems on mac (#3769)
1 parent b755547 commit 270e7b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

third_party/proton/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,10 @@ else()
2222
include_directories(${Python3_INCLUDE_DIRS})
2323
endif()
2424

25+
# Check if the platform is MacOS
26+
if(APPLE)
27+
set(PROTON_PYTHON_LDFLAGS "-undefined dynamic_lookup -flto")
28+
endif()
29+
2530
include_directories(${CUPTI_INCLUDE_DIR})
26-
target_link_libraries(proton ${Python_LIBRARIES})
31+
target_link_libraries(proton PRIVATE ${Python_LIBRARIES} ${PROTON_PYTHON_LDFLAGS})

0 commit comments

Comments
 (0)