From: Nathan Lanza Date: Thu, 18 Jul 2019 21:14:26 +0000 (+0000) Subject: [cmake] Only run llvm-codesign if targetting apple on an apple host X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33279947e149a22247181eb9163198cb904ca5eb;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366498 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 619e986b8aa..a05f366d6e6 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -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()