[compiler-rt] d8e8e32 - build: always add support for assembly targets on Darwin

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 14:01:33 PDT 2020


Author: Saleem Abdulrasool
Date: 2020-07-29T14:01:02-07:00
New Revision: d8e8e32d85f1cbde2a6b67af010fba3c3a3c86e9

URL: https://github.com/llvm/llvm-project/commit/d8e8e32d85f1cbde2a6b67af010fba3c3a3c86e9
DIFF: https://github.com/llvm/llvm-project/commit/d8e8e32d85f1cbde2a6b67af010fba3c3a3c86e9.diff

LOG: build: always add support for assembly targets on Darwin

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

Added: 
    

Modified: 
    compiler-rt/cmake/Modules/AddCompilerRT.cmake

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index efb660818270..9c135ef931a0 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -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.


        


More information about the llvm-commits mailing list