build: add cmake flag to enable interprocedural optimization

Related-To: NEO-6904
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-07-05 08:51:26 +00:00
committed by Compute-Runtime-Automation
parent 0cc8330a1a
commit 0f47295a23

View File

@@ -12,6 +12,13 @@ endif()
include(ExternalProject)
if(NEO_ENABLE_INTERPROCEDURAL_OPTIMIZATION)
cmake_policy(SET CMP0069 NEW)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
set(NEO_DISABLE_LD_LLD TRUE)
message(STATUS "Enabling interprocedural optimization")
endif()
# Set the runtime source directory
if(NOT DEFINED NEO_SOURCE_DIR)
set(NEO_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})