Skip to content

Commit d31368f

Browse files
committed
Enable LTO for C API
1 parent 0267c15 commit d31368f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

graalpython/com.oracle.graal.python.cext/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ set(TARGET_LIBPYTHON "python-native")
5555
# common variables and compile/link options (for all build targets)
5656
######################################################################
5757

58+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
59+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE)
60+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE)
61+
5862
if (MSVC)
5963
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE)
6064
SET(CFLAGS_WARNINGS /Wall /WX

0 commit comments

Comments
 (0)