Skip to content

Commit

Permalink
Add CMAKE ASM workaround for newer clang (backport of #74696) (#75526)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakael authored and mmitche committed Sep 26, 2022
1 parent 5247c8f commit 8770e0e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,13 @@ if (CLR_CMAKE_HOST_WIN32)
endif()

else (CLR_CMAKE_HOST_WIN32)
# This is a workaround for upstream issue: https://gitlab.kitware.com/cmake/cmake/-/issues/22995.
#
# In Clang.cmake, the decision to use single or double hyphen for target and gcc-toolchain
# is made based on CMAKE_${LANG}_COMPILER_VERSION, but CMAKE_ASM_COMPILER_VERSION is empty
# so it picks up single hyphen options, which new clang versions don't recognize.
set (CMAKE_ASM_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}")

enable_language(ASM)

endif(CLR_CMAKE_HOST_WIN32)

0 comments on commit 8770e0e

Please sign in to comment.