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

* Change to use -O0 instead of -O1 in debug build.

* Use -O1 for device code to avoid linking issue in debug build.
This commit is contained in:
Arm Patinyasakdikul
2025-10-03 14:05:01 -07:00
committed by GitHub
parent 342ec086e3
commit feee02ca61
2 changed files with 11 additions and 2 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ else()
endif()
if (NOT DEFINED ENV{CXXFLAGS})
set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
endif()
@@ -24,6 +24,6 @@ else()
endif()
if (NOT DEFINED ENV{CFLAGS})
set(CMAKE_C_FLAGS_DEBUG "-g -O1")
set(CMAKE_C_FLAGS_DEBUG "-g -O0")
set(CMAKE_C_FLAGS_RELEASE "-O3")
endif()