As per my comment at https://bugs.webkit.org/show_bug.cgi?id=235476#c4 all of ld.bfd, lld, and mold support split-debug builds, and there is not reason whatsoever to make the DEBUG_FISSION option depend on the value of the USE_LD_GOLD one. % cat hello.cc #include <cstdio> extern const char* whom(); int main() { std::printf("Hello, %s!\n", whom()); } % cat other.cc const char* whom() { return "Pete"; } % g++ -gsplit-dwarf -ggdb -c hello.cc % g++ -gsplit-dwarf -ggdb -c other.cc % g++ -gsplit-dwarf -ggdb -fuse-ld=bfd -o hello hello.o other.o % dwarfdump hello | grep DW_AT_dwo_name | sort -u DW_AT_dwo_name hello.dwo DW_AT_dwo_name other.dwo (Replacing g++ with clang++ above also works, plus the Clang compiler driver will happily accept any -fuse-ld=whatever as long as there is a “ld.whatever” binary in the $PATH.)
Created attachment 450187 [details] Patch
Committed r288718 (246511@main): <https://commits.webkit.org/246511@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450187 [details].
For the record: I did some tests, and debug builds now take about the same time with ld.bfd after applying this patch, and ld.lld is faster than both ld.gold and ld.bfd (no surprises there!). I have not tried with ld.mold because we do not yet have it in the Flatpak SDK.