Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Oct 23, 2024
1 parent 897e15f commit 21880c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0.

# As of October 2024, we picked 3.9 as our version because internally we still support RHEL5 and AL2012, and CMake 3.9
# was the latest version available on those platforms.
cmake_minimum_required(VERSION 3.9)
option(ALLOW_CROSS_COMPILED_TESTS "Allow tests to be compiled via cross compile, for use with qemu" OFF)

Expand Down
18 changes: 7 additions & 11 deletions cmake/AwsCFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,13 @@ function(aws_set_common_properties target)
set(_ENABLE_LTO_EXPR $<NOT:$<CONFIG:Debug>>)

# try to check whether compiler supports LTO/IPO
if (POLICY CMP0069)
include(CheckIPOSupported OPTIONAL RESULT_VARIABLE ipo_check_exists)
if (ipo_check_exists)
check_ipo_supported(RESULT ipo_supported)
if (ipo_supported)
message(STATUS "Enabling IPO/LTO for Release builds")
else()
message(STATUS "AWS_ENABLE_LTO is enabled, but cmake/compiler does not support it, disabling")
set(_ENABLE_LTO_EXPR OFF)
endif()
endif()
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_supported)
if (ipo_supported)
message(STATUS "Enabling IPO/LTO for Release builds")
else()
message(STATUS "AWS_ENABLE_LTO is enabled, but cmake/compiler does not support it, disabling")
set(_ENABLE_LTO_EXPR OFF)
endif()
else()
set(_ENABLE_LTO_EXPR OFF)
Expand Down

0 comments on commit 21880c4

Please sign in to comment.