Skip to content

Commit

Permalink
-flto ~10% perfomance boost
Browse files Browse the repository at this point in the history
  • Loading branch information
yekm committed Jun 13, 2023
1 parent bb42e7f commit eb4d56d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ cmake_minimum_required(VERSION 3.16.3)
project(imgui-cmake LANGUAGES C CXX)


set (CMAKE_C_FLAGS_RELEASE "-O3 -march=native")
set (CMAKE_C_FLAGS_RELEASE "-O3 -march=native -flto")
set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -march=native -g")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
set (CMAKE_C_FLAGS_DEBUG "-O0 -ggdb3 -fsanitize=address")
set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})

Expand Down

0 comments on commit eb4d56d

Please sign in to comment.