mold
mold copied to clipboard
Mold: A Modern Linker 🦠
Tried building current ccache on x86_64: ``` Dir.chdir 'build' do system "env CFLAGS="-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto" CXXFLAGS="-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto" FCFLAGS="-O2 -pipe -ffat-lto-objects -fPIC -fuse-ld=mold -flto"...
cmake settings (`cmake -L` output): ```console -- Cache values BUILD_TESTING:BOOL=ON CMAKE_BUILD_TYPE:STRING=RelWithDebInfo CMAKE_INSTALL_PREFIX:PATH=/usr MOLD_ENABLE_QEMU_TESTS:BOOL=OFF MOLD_ENABLE_QEMU_TESTS_RV32:BOOL=OFF MOLD_LTO:BOOL=OFF MOLD_MOSTLY_STATIC:BOOL=OFF MOLD_USE_ASAN:BOOL=OFF MOLD_USE_MIMALLOC:BOOL=ON MOLD_USE_MOLD:BOOL=ON MOLD_USE_SYSTEM_MIMALLOC:BOOL=ON MOLD_USE_SYSTEM_TBB:BOOL=ON MOLD_USE_TSAN:BOOL=OFF MOLD_X86_64_ONLY:BOOL=OFF TBB_DIR:PATH=/usr/lib64/cmake/TBB mimalloc_DIR:PATH=/usr/lib64/cmake/mimalloc ``` and test suite is...
Related #647
First just summary stats: ```console [tkloczko@pers-jacek SPECS]$ rpmbuild -ba --quiet 2>&1 | grep -- \\[-W | sed 's/.*\[//; s/\]//' | sort | uniq -c | sort -nr 1012 -Wsign-compare 70...
Please consider supporting the -Y flag, which is supported by the bfd linker (but not gold): ``` -Y path Add path to the default library search path. This option exists...
``` autoninja -C out/Default chrome ninja: Entering directory `out/Default' [389/3614] SOLINK libgfx_shared_mojom_traits.dylib libgfx_shared_mojom_traits.dylib.TOC FAILED: libgfx_shared_mojom_traits.dylib libgfx_shared_mojom_traits.dylib.TOC if [ ! -e "./libgfx_shared_mojom_traits.dylib" -o ! -e "./libgfx_shared_mojom_traits.dylib.TOC" ] || /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool -l "./libgfx_shared_mojom_traits.dylib"...
When compiling [napi-rs](https://napi.rs) (Node.js addons in Rust) the Rust compilation fails with ``` note: mold: fatal: unknown command line option: -undefined ``` The relevant flags are `"-fuse-ld=/opt/homebrew/bin/ld64.mold" "-Wl" "-undefined" "dynamic_lookup"`.