Add mold preloading support
mold supports object file preloading feature. In order to use it, someone has to run a linker command with
--preloadflag a few seconds prior to the actual linker invocation. And I think "someone" should be a build system, such as make or ninja executing CMake-generated ninja or Makefiles.
As a starter, I think we should add the following feature to CMake:
- Detect if a linker is mold
- run a linker command with
--preloadif it is mold before invoking compiler instances to generate object files