-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCons: Refactor Linux linker options with linker=<bfd|gold|lld|mold>
#63278
SCons: Refactor Linux linker options with linker=<bfd|gold|lld|mold>
#63278
Conversation
1f05a82
to
70ad959
Compare
As a side note, @Calinou suggested this in godotengine/godot-proposals#4531 (comment):
I think that makes sense, could be done in a follow-up PR. |
70ad959
to
534f85a
Compare
Is this really needed? I always use |
Well the same can be said of most other build options. You can set We just abstract them in a way that makes them either to use. Personally I always have to double check the exact syntax of the link flag so IMO having an option we can validate makes a lot of sense. It's also more discoverable (we can document it, and you can see it in |
534f85a
to
54472be
Compare
The new option is `linker` and lets the user specify the argument to the`-fuse_ld=` linker flag directly. The supported options are: - `default`: No change, typically uses GNU ld (bfd) unless the user or distro picked a different default `/usr/bin/ld`. - `bfd`: GNU ld from binutils - `gold`: GNU gold from binutils - `lld`: lld from LLVM - `mold`: mold, an extremely fast modern linker, not (yet) intended for use in production but great for development speed. Provided by distro `mold` package or needs to be compiled from source and installed to `/usr` otherwise. Removes the `use_lld=yes` option, and make lld actually usable with GCC too. Not all the above are compatible or recommend for LTO, we recommend using GNU ld with GCC LTO, or lld with LLVM ThinLTO.
54472be
to
c8479c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine!
The new option is
linker
and lets the user specify the argument tothe
-fuse_ld=
linker flag directly. The supported options are:default
: No change, typically uses GNU ld (bfd) unless the user ordistro picked a different default
/usr/bin/ld
.bfd
: GNU ld from binutilsgold
: GNU gold from binutilslld
: lld from LLVMmold
: mold, an extremely fast modern linker, not (yet) intended foruse in production but great for development speed. Provided by distro
mold
package or needs to be compiled from source and installed to/usr
otherwise.Removes the
use_lld=yes
option, and make lld actually usable with GCCtoo.
Not all the above are compatible or recommend for LTO, we recommend
using GNU ld with GCC LTO, or lld with LLVM ThinLTO.