[PATCH] D84333: build: always add support for assembly targets on Darwin
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 08:59:29 PDT 2020
compnerd created this revision.
compnerd added a reviewer: davide.
Herald added subscribers: Sanitizers, mgorny.
Herald added a project: Sanitizers.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84333
Files:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -110,7 +110,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84333.279841.patch
Type: text/x-patch
Size: 568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200722/790d27a9/attachment.bin>
More information about the llvm-commits
mailing list