Skip to content

Commit

Permalink
build: always add support for assembly targets on Darwin
Browse files Browse the repository at this point in the history
When attempting to build compiler-rt on a developer transition kit, the
build would fail due to `.S` files not being handled properly by the
Ninja generator.  Rather than conditionalising on Xcode, conditionalise
to Darwin.  Because we know that the system compiler is clang based, it
will always properly handle the pre-processing based on the extension.

Differential Revision: https://reviews.llvm.org/D84333
  • Loading branch information
compnerd committed Jul 29, 2020
1 parent 120e66b commit d8e8e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/cmake/Modules/AddCompilerRT.cmake
Expand Up @@ -110,7 +110,7 @@ endfunction()
function(add_asm_sources output)
set(${output} ${ARGN} PARENT_SCOPE)
# Xcode will try to compile asm files as C ('clang -x c'), and that will fail.
if (${CMAKE_GENERATOR} STREQUAL "Xcode")
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
enable_language(ASM)
else()
# Pass ASM file directly to the C++ compiler.
Expand Down

0 comments on commit d8e8e32

Please sign in to comment.