Revert "Change to use -O0 instead of -O1 in debug build. (#1949)" (#1957)

This reverts commit 5f16e69d8e.

[ROCm/rccl commit: cede6d0134]
Цей коміт міститься в:
Arm Patinyasakdikul authored and GitHub committed 2025-10-08 10:01:45 -05:00
1 джерело 45abdcfe62
коміт edd1c72741
2 files changed
+2 -11

No files matched your search

-9
Переглянути файл
@@ -886,15 +886,6 @@ foreach(file ${GENERATED_FILES})
list(APPEND HIP_SOURCES ${file})
endforeach()
# Apply -O1 optimization for generated files in debug builds
# This is needed for device object to not go over the stacksize limit at link time while allowing
# -O0 for host code in debug build.
if(CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT DEFINED ENV{CXXFLAGS})
message(STATUS "Setting -O1 optimization for device code in ${GEN_DIR} (Debug build)")
set_source_files_properties(${GENERATED_FILES} PROPERTIES COMPILE_OPTIONS "-O1")
endif()
# Create an initial git_version.cpp file (that will be updated with latest git version)
#==================================================================================================
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/git_version.cpp "")
+2 -2
Переглянути файл
@@ -13,7 +13,7 @@ else()
endif()
if (NOT DEFINED ENV{CXXFLAGS})
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
endif()
@@ -24,6 +24,6 @@ else()
endif()
if (NOT DEFINED ENV{CFLAGS})
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
set(CMAKE_C_FLAGS_DEBUG "-g -O1")
set(CMAKE_C_FLAGS_RELEASE "-O3")
endif()