[PATCH] D64942: [cmake] Only run llvm-codesign if targetting apple on an apple host

Nathan Lanza via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 13:08:06 PDT 2019


lanza created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D64942

Files:
  cmake/modules/AddLLVM.cmake


Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1682,7 +1682,7 @@
         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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64942.210654.patch
Type: text/x-patch
Size: 437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190718/a3418bd0/attachment.bin>


More information about the llvm-commits mailing list