mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Tests: Pass -fno-lto to the Assembler test when using clang
This commit is contained in:
@@ -24,6 +24,12 @@ if("${CMAKE_GENERATOR}" MATCHES "Makefile|Xcode|Ninja" AND
|
||||
elseif("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
|
||||
list(APPEND C_FLAGS -arch arm64)
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
# Just in case the user is passing -flto, we need to pass -fno-lto to
|
||||
# clang when generating the assembly file, or else clang will generate
|
||||
# LLVM IR instead of assembly.
|
||||
list(APPEND C_FLAGS -fno-lto)
|
||||
endif()
|
||||
# Clang on OS X, and perhaps other compilers, do not support -g
|
||||
# for both generating and assembling, so drop it from generating.
|
||||
list(REMOVE_ITEM C_FLAGS -g)
|
||||
|
||||
Reference in New Issue
Block a user