From 3f38dc5c046c08111a9c7505d35e530473c213dd Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 19 Jan 2022 13:34:04 -0800 Subject: [PATCH] [lld-macho] Silence XAR deprecation warning 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 --- lld/MachO/SyntheticSections.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp index 23e9086..7e4b83e 100644 --- a/lld/MachO/SyntheticSections.cpp +++ b/lld/MachO/SyntheticSections.cpp @@ -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)); -- 2.7.4