[lld] 3f38dc5 - [lld-macho] Silence XAR deprecation warning
Keith Smiley via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 13:53:49 PST 2022
Author: Keith Smiley
Date: 2022-01-19T13:51:55-08:00
New Revision: 3f38dc5c046c08111a9c7505d35e530473c213dd
URL: https://github.com/llvm/llvm-project/commit/3f38dc5c046c08111a9c7505d35e530473c213dd
DIFF: https://github.com/llvm/llvm-project/commit/3f38dc5c046c08111a9c7505d35e530473c213dd.diff
LOG: [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
Added:
Modified:
lld/MachO/SyntheticSections.cpp
Removed:
################################################################################
diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp
index 23e908646d00..7e4b83ec1903 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));
More information about the llvm-commits
mailing list