Skip to content

Commit cf965b7

Browse files
committed
Disabled LTO in DEBUG mode
Signed-off-by: Jaehyun Kim <[email protected]>
1 parent 0d97381 commit cf965b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ project(OpenROAD VERSION 1
5151

5252
# LTO setting must come after project() for proper compiler detection
5353
option(LINK_TIME_OPTIMIZATION "Flag to control link time optimization: on by default" ON)
54-
if (LINK_TIME_OPTIMIZATION)
54+
55+
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
56+
57+
if (LINK_TIME_OPTIMIZATION AND NOT UPPER_BUILD_TYPE STREQUAL "DEBUG")
5558
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
5659
message(STATUS "LTO is enabled")
5760
else()
58-
message(STATUS "LTO is disabled: ${LTO_ERROR}")
61+
message(STATUS "LTO is disabled")
5962
endif()
6063

6164
set(OPENROAD_HOME ${PROJECT_SOURCE_DIR})

0 commit comments

Comments
 (0)