Allow limiting the `MOLD_ELF_TARGETS` CMake variable to improve build times.
no-more-secrets opened this issue · 1 comments
no-more-secrets commented
For my purposes I only need MOLD_ELF_TARGETS=X86_64
which I suspect would significantly increase build times, but the CMake files don't seem to allow a way to override it. Perhaps you should only fill it with values if it is not already set.
rui314 commented
That feature is intentionally left out because if we provide a configurable CMake variable for it, it is not hard to imagine that someone would use it to build an x86-64-only mold binary and distribute it widely. We want all mold binaries to be able to be used as a cross linker, so we don't want to encourage that situation.
See https://github.com/rui314/mold/blob/main/CMakeLists.txt#L38-L44