-DCMAKE_C_FLAGS="-flto=auto" -DCMAKE_CXX_FLAGS="-flto=auto" -DGCC_OFFLINEASM_SOURCE_MAP=ON
The full error message is:
/tmp/cchYjCtn.s: Assembler messages:
make: *** [/tmp/ccrXP4o0.mk:2: /tmp/cctehSRQ.ltrans0.ltrans.o] Error 1
make: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Notice this occurs when called by lto-wrapper. The build works fine when LTO is disabled.
In case it matters (unlikely), my full CMake command line is:
jhbulid run cmake -DCMAKE_C_FLAGS="-flto=auto" -DCMAKE_CXX_FLAGS="-flto=auto" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPORT=GTK -DDEVELOPER_MODE=ON -DGCC_OFFLINEASM_SOURCE_MAP=ON -DCMAKE_INSTALL_PREFIX=$HOME/Projects/GNOME/install/ -DCMAKE_INSTALL_LIBDIR=lib -GNinja
When this bug is fixed, please also reenable the GCC_OFFLINEASM_SOURCE_MAP feature by reverting the patch in bug #229893!
Created attachment 438488 [details]
Thanks for the clear instructions on how to reproduce Michael! Uploaded a simple workaround, would be great if you could verify it fixes things for you.
Comment on attachment 438488 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=438488&action=review
Tested this. It works. Thanks Angelos!
> + COMPILE_OPTIONS "-fno-lto")
OK, I was going to whine that you need to check if the option is supported, but this is within a CMAKE_COMPILER_IS_GNUCXX guard so no need.
Committed r282685 (241824@main): <https://commits.webkit.org/241824@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 438488 [details].