[llvm] r366498 - [cmake] Only run llvm-codesign if targetting apple on an apple host

Nathan Lanza via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 14:14:26 PDT 2019


Author: lanza
Date: Thu Jul 18 14:14:26 2019
New Revision: 366498

URL: http://llvm.org/viewvc/llvm-project?rev=366498&view=rev
Log:
[cmake] Only run llvm-codesign if targetting apple on an apple host

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

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=366498&r1=366497&r2=366498&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Jul 18 14:14:26 2019
@@ -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()




More information about the llvm-commits mailing list