From 72ed051b12d983d298b9447d3464a38f5e0f918c Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Mon, 23 Jan 2017 18:58:18 -0800 Subject: CMakeDetermineCompilerId: check with and without user-specified flags Clang may raise an error when passed a `-march=` option that doesn't correspond to the current target triple. CMake cannot pass the target triple when determining the compiler id because it doesn't know how yet, but it does pass along user-specified flags. This breaks when those user-specified flags include `-march=`. Fix this use case by also trying to find the compiler id without the user-specified flags. Fixes: #16587 --- Modules/CMakeDetermineASMCompiler.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Modules/CMakeDetermineASMCompiler.cmake') diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index 4162726c82..3f18a8c239 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -93,8 +93,8 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_ARMCC "(ARM Compiler)|(ARM Assembler)") include(CMakeDetermineCompilerId) - CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT}) - + set(userflags) + CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}") endif() if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID) -- cgit v1.2.1