]> granicus.if.org Git - llvm/commitdiff
[cmake] Only run llvm-codesign if targetting apple on an apple host
authorNathan Lanza <nathan@lanza.io>
Thu, 18 Jul 2019 21:14:26 +0000 (21:14 +0000)
committerNathan Lanza <nathan@lanza.io>
Thu, 18 Jul 2019 21:14:26 +0000 (21:14 +0000)
Summary:
Other platforms don't have the capability to perform llvm_codesign
step. If LLVM_CODESIGNING_IDENTITY is set then this chunk of code would
attempt to codesign if the target was Apple. But when cross compiling
to Darwin from Linux, for example, this step would fail. So test if the
host is Apple as well.

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64942

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366498 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake

index 619e986b8aa097bd01e684bcae5a922daa053e93..a05f366d6e608560bbe87c04d4d4859be2f23a1b 100644 (file)
@@ -1682,7 +1682,7 @@ function(llvm_codesign name)
         XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ARG_ENTITLEMENTS}
       )
     endif()
-  elseif(APPLE)
+  elseif(APPLE AND CMAKE_HOST_SYSTEM_NAME MATCHES APPLE)
     if(NOT CMAKE_CODESIGN)
       set(CMAKE_CODESIGN xcrun codesign)
     endif()