[lld] [lld-macho] Disable static assert failing on several platforms (PR #107514)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 01:17:47 PDT 2024
mstorsjo wrote:
> I think the issue is that Windows targets only "merge" bit fields when the underlying types have the same size. Can someone check that this fixes the issue?
>
> ```diff
> diff --git a/lld/MachO/Symbols.h b/lld/MachO/Symbols.h
> index 70fd195f25c9..bfb777b86621 100644
> --- a/lld/MachO/Symbols.h
> +++ b/lld/MachO/Symbols.h
> @@ -14,6 +14,7 @@
> #include "Target.h"
>
> #include "llvm/Object/Archive.h"
> +#include "llvm/Support/Compiler.h"
> #include "llvm/Support/MathExtras.h"
>
> namespace lld {
> @@ -152,7 +153,8 @@ public:
> // Whether this symbol should appear in the output symbol table.
> bool includeInSymtab : 1;
> // The ICF folding kind of this symbol: None / Body / Thunk.
> - ICFFoldKind identicalCodeFoldingKind : 2;
> + LLVM_PREFERRED_TYPE(ICFFoldKind)
> + uint8_t identicalCodeFoldingKind : 2;
> // Symbols marked referencedDynamically won't be removed from the output's
> // symbol table by tools like strip. In theory, this could be set on arbitrary
> // symbols in input object files. In practice, it's used solely for the
> ```
Yes, this does seem to fix the issue for me, too. Thanks!
https://github.com/llvm/llvm-project/pull/107514
More information about the llvm-commits
mailing list