[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:34 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld-macho
Author: None (alx32)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/107514.diff
1 Files Affected:
- (modified) lld/MachO/Symbols.cpp (+4)
``````````diff
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");
``````````
</details>
https://github.com/llvm/llvm-project/pull/107514
More information about the llvm-commits
mailing list