[lld] [lld-macho] Disable static assert failing on several platforms (PR #107514)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 21:13:03 PDT 2024
https://github.com/alx32 created https://github.com/llvm/llvm-project/pull/107514
Recently https://github.com/llvm/llvm-project/pull/106573 modified `Define` and caused the size to change on some platforms.
https://github.com/llvm/llvm-project/issues/107511
Disable the static assert it until we can find a universal solution.
>From 59777293d46690522268d03118eb5dc050fb3ccb Mon Sep 17 00:00:00 2001
From: Alex B <alexborcan at meta.com>
Date: Thu, 5 Sep 2024 21:10:41 -0700
Subject: [PATCH] [lld-macho] Disable static assert failing on serveral
platforms
---
lld/MachO/Symbols.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lld/MachO/Symbols.cpp b/lld/MachO/Symbols.cpp
index 9faf01e09de059..61becf97ba6728 100644
--- a/lld/MachO/Symbols.cpp
+++ b/lld/MachO/Symbols.cpp
@@ -18,12 +18,16 @@ using namespace lld::macho;
static_assert(sizeof(void *) != 8 || sizeof(Symbol) == 56,
"Try to minimize Symbol's size; we create many instances");
+// TODO: Fix this for all platforms or remove it.
+// https://github.com/llvm/llvm-project/issues/107511
+#if 0
// The Microsoft ABI doesn't support using parent class tail padding for child
// members, hence the _MSC_VER check.
#if !defined(_MSC_VER)
static_assert(sizeof(void *) != 8 || sizeof(Defined) == 88,
"Try to minimize Defined's size; we create many instances");
#endif
+#endif
static_assert(sizeof(SymbolUnion) == sizeof(Defined),
"Defined should be the largest Symbol kind");
More information about the llvm-commits
mailing list