Closed trcrsired closed 1 month ago
@BertalanD @alx32
@trcrsired thanks for reporting. This is probably because of https://github.com/llvm/llvm-project/pull/106573. Do you happen to have repro steps for this - i.e the OS and command that sets up this build environment ?
@trcrsired thanks for reporting. This is probably because of #106573. Do you happen to have repro steps for this - i.e the OS and command that sets up this build environment ?
i do canadian compilation for windows on linux. cross compile windows clang on linux
@llvm/issue-subscribers-lld-macho
Author: cqwrteur (trcrsired)
https://github.com/llvm/llvm-project/blob/main/lld/MachO/Symbols.cpp#L23 @alx32 this is wrong. I use windows-gnu, so _MSC_VER is not defined. Plus i guess cygwin does not work either.
@alx32 can we remove this static_assert? A lot of platforms do not work correctly. x86_64-windows-gnu, x86_64-windows-msvc, x86_64-cygwin, UEFI etc they all fail to work
Sure, I will submit a patch soon
ty
FWIW, the reason why d1756165a9066f907b88d51dd8e3ffee15a8cc1e breaks things, is probably because of the change at https://github.com/llvm/llvm-project/commit/d1756165a9066f907b88d51dd8e3ffee15a8cc1e#diff-1d1c93151f6708c960053c32c0dc1fda887d546d9aa9a86387936f3e640c9d2dR155 :
- bool wasIdenticalCodeFolded : 1;
+ ICFFoldKind identicalCodeFoldingKind : 2;
Under the MS struct packing rules, the ICFFoldKind
can't be packed tightly with bool
- MS only packs bitfield members tightly if they have they same underlying type - look up docs for -mms-bitfields
. https://developercommunity.visualstudio.com/t/Non-conforming-bit-field-packing-in-C/10641514 is a very concise example of this issue.
@alx32 can we remove this static_assert? A lot of platforms do not work correctly. x86_64-windows-gnu, x86_64-windows-msvc
To be clear here - this change wasn't a build break for x86_64-windows-msvc
as the static assert was already ifdeffed out.
But changing the ifdef to #ifndef _WIN32
also should work, then you could add a comment about the bitfield packing issue as reference for mingw. I guess extending it to cover cygwin also could work.
I don't know about UEFI targets though (does anybody compile LLD to run in UEFI?)