forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added experimental LTO kconfig option
- Loading branch information
1 parent
8da02e2
commit 108c98a
Showing
6 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ | |
# | ||
#============================================================================= | ||
|
||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR) | ||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR) | ||
|
||
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE FILEPATH "PX4 source directory" FORCE) | ||
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE FILEPATH "PX4 binary directory" FORCE) | ||
|
@@ -234,6 +234,14 @@ message(STATUS "cmake build type: ${CMAKE_BUILD_TYPE}") | |
# | ||
project(px4 CXX C ASM) | ||
|
||
# Check if LTO option and check if toolchain supports it | ||
if(LTO) | ||
include(CheckIPOSupported) | ||
check_ipo_supported() | ||
message(AUTHOR_WARNING "LTO enabled: LTO is highly experimental and should not be used in production") | ||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) | ||
endif() | ||
|
||
set(package-contact "[email protected]") | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters