One more reverted change in PR
[platform/upstream/coreclr.git] / configure.cmake
1 include(CheckCXXSourceCompiles)
2
3 # VC++ guarantees support for LTCG (LTO's equivalent)
4 if(NOT WIN32)
5   # Function required to give CMAKE_REQUIRED_* local scope
6   function(check_have_lto)
7     set(CMAKE_REQUIRED_FLAGS -flto)
8     set(CMAKE_REQUIRED_LIBRARIES -flto -fuse-ld=gold)
9     check_cxx_source_compiles("int main() { return 0; }" HAVE_LTO)
10   endfunction(check_have_lto)
11   check_have_lto()
12 endif(NOT WIN32)