diff --git a/.bazelrc b/.bazelrc index 2af5b640afa..16ba84be628 100644 --- a/.bazelrc +++ b/.bazelrc @@ -249,6 +249,9 @@ build:linux --linkopt="-Wl,--gc-sections" build:linux --copt="-ffunction-sections" --host_copt="-ffunction-sections" build:linux --copt="-fdata-sections" --host_copt="-fdata-sections" +# On Linux, use clang lld. +build:linux --linkopt="-fuse-ld=lld" + # # Windows # diff --git a/README.md b/README.md index 519265b48a6..709a3c76b3c 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,9 @@ To build `workerd`, you need: * On Linux: * We use the clang/LLVM toolchain to build workerd and support version 16 and higher. Earlier versions of clang may still work, but are not officially supported. * Clang 16+ (e.g. package `clang-16` on Debian Bookworm). If clang is installed as `clang-` please create a symlink to it in your PATH named `clang`, or use `--action_env=CC=clang-` on `bazel` command lines to specify the compiler name. - + * libc++ 16+ (e.g. packages `libc++-16-dev` and `libc++abi-16-dev`) - * LLD 16+ (e.g. package `lld-16`). The build may still succeed if a recent version of GNU gold or the system linker is installed, but lld is highly recommended for link performance. + * LLD 16+ (e.g. package `lld-16`). * `python3`, `python3-distutils`, and `tcl8.6` * On macOS: * Xcode 15 installation (available on macOS 13 and higher). **Full Xcode is required**, the Xcode command line tools alone are **not sufficient** for building.