Skip to content

Commit

Permalink
[lld-macho] Silence XAR deprecation warning
Browse files Browse the repository at this point in the history
If you're building this on macOS 12.x+ this produces a deprecation
warning. I'm not sure what this means for the bitcode format going
forward, but it seems safe to silence for now.

Do we need to worry about GCC for this?

Differential Revision: https://reviews.llvm.org/D117718
  • Loading branch information
keith committed Jan 19, 2022
1 parent 67090e3 commit 3f38dc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lld/MachO/SyntheticSections.cpp
Expand Up @@ -1283,7 +1283,10 @@ void BitcodeBundleSection::finalize() {
using namespace llvm::sys::fs;
CHECK_EC(createTemporaryFile("bitcode-bundle", "xar", xarPath));

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
xar_t xar(xar_open(xarPath.data(), O_RDWR));
#pragma clang diagnostic pop
if (!xar)
fatal("failed to open XAR temporary file at " + xarPath);
CHECK_EC(xar_opt_set(xar, XAR_OPT_COMPRESSION, XAR_OPT_VAL_NONE));
Expand Down

0 comments on commit 3f38dc5

Please sign in to comment.