[PATCH] D112849: [llvm] Disable xar on macOS 12.0 and later
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 14:55:34 PDT 2021
JDevlieghere created this revision.
JDevlieghere added reviewers: arphaman, t.p.northover, phosek.
Herald added a subscriber: mgorny.
JDevlieghere requested review of this revision.
Herald added a project: LLVM.
The xar file format has been deprecated since macOS 12.0, causing a warning to be printed:
warning: 'xar_open' is deprecated: first deprecated in macOS 12.0 - xar is a deprecated file format and should not be used.
Disable xar support when the macosx deployment target is greater or equal to 12.0.
https://reviews.llvm.org/D112849
Files:
llvm/cmake/config-ix.cmake
Index: llvm/cmake/config-ix.cmake
===================================================================
--- llvm/cmake/config-ix.cmake
+++ llvm/cmake/config-ix.cmake
@@ -213,7 +213,12 @@
check_library_exists(xar xar_open "" LLVM_HAVE_LIBXAR)
if(LLVM_HAVE_LIBXAR)
- set(XAR_LIB xar)
+ # The xar file format has been deprecated since macOS 12.0.
+ if (CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 12)
+ set(LLVM_HAVE_LIBXAR 0)
+ else()
+ set(XAR_LIB xar)
+ endif()
endif()
# function checks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112849.383508.patch
Type: text/x-patch
Size: 511 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211029/abdd4006/attachment.bin>
More information about the llvm-commits
mailing list