mold is the latest modern linker with high speed, I want to use it to replace default ld linker when compiling our heavy c++ repository.
I use Bazel + GCC 10.2 to compile, and mold docs provide a gcc -B/mold/path solution. However I don't find a way to pass this CLI option to bazel.
I tried bazel build --linkopt=-B/usr/local/libexec/mold //src:XXX or --copt=-B/usr/local/libexec/mold, but both don't work, bazel still use old linker.
I can ensure mold has been installed on my system, because I can compile c++ helloworld program link by mold directly run g++ -B/usr/local/libexec/mold.