This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Disable xar on macOS 12.0 and later
ClosedPublic

Authored by JDevlieghere on Oct 29 2021, 2:55 PM.

Details

Summary

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.

Diff Detail

Event Timeline

JDevlieghere created this revision.Oct 29 2021, 2:55 PM
JDevlieghere requested review of this revision.Oct 29 2021, 2:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 29 2021, 2:55 PM
phosek accepted this revision.Oct 29 2021, 2:58 PM

LGTM

llvm/cmake/config-ix.cmake
218

Could we also print a warning that this option is deprecated and might be removed in future versions?

This revision is now accepted and ready to land.Oct 29 2021, 2:58 PM

Print a status message about the deprecation of the xar file format and corresponding cmake variable.

llvm/cmake/config-ix.cmake
218

Is this what you had in mind? I didn't use an actual warning because the variable is set based on whether the library exists and therefore isn't really actionable. This seems like a nice middle ground.

phosek added inline comments.Oct 29 2021, 3:28 PM
llvm/cmake/config-ix.cmake
216–222
218

Yes, thanks.

This revision was landed with ongoing or failed builds.Oct 29 2021, 3:31 PM
This revision was automatically updated to reflect the committed changes.

Isn't libxar still required by the lld.ld64 -bitcode_bundle option, so doesn't LLVM need to continue to use it despite it being deprecated?

Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 10:40 AM