Add CMake option to enable IPO (enabled by default).
This commit is contained in:
parent
31eda82b3f
commit
2cb2985539
@ -19,8 +19,19 @@ option(STATIC_BUILD "Create static build" OFF)
|
||||
option(EXTERNAL_CHIPDB "Create build with pre-built chipdb binaries" OFF)
|
||||
option(WERROR "pass -Werror to compiler (used for CI)" OFF)
|
||||
option(PROFILER "Link against libprofiler" OFF)
|
||||
if(ipo_supported)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
option(USE_IPO "Compile nextpnr with IPO" ON)
|
||||
|
||||
if (USE_IPO)
|
||||
if (ipo_supported)
|
||||
message(STATUS "Building with IPO")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(STATUS "IPO is not supported with this compiler")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Building without IPO")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
|
||||
endif()
|
||||
|
||||
if(WIN32 OR EXTERNAL_CHIPDB)
|
||||
|
Loading…
Reference in New Issue
Block a user