This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by lanza on Jul 18 2019, 1:08 PM.

Details

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.

Diff Detail

Event Timeline

lanza created this revision.Jul 18 2019, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2019, 1:08 PM
JDevlieghere accepted this revision.Jul 18 2019, 1:36 PM

Yup, thank you Nathan. This LGTM

This revision is now accepted and ready to land.Jul 18 2019, 1:36 PM
This revision was automatically updated to reflect the committed changes.

Was this tested? I am not getting APPLE here:

$ uname -s
Darwin

https://cmake.org/cmake/help/v3.4/variable/CMAKE_HOST_SYSTEM_NAME.html says:

On systems that have the uname command, this variable is set to the output of uname -s. Linux, Windows, and Darwin for Mac OS X are the values found on the big three operating systems.

What motivated the decision against CMAKE_HOST_APPLE?
https://cmake.org/cmake/help/v3.4/variable/CMAKE_HOST_APPLE.html

Yup! Sorry about that, this was fixed in git commit 474ca495a914fca0e.