ALL and VITA: Link with GNU Make recursive flag #2727
Merged
+15
−15
Conversation
It will be more coherent. LD is defined to CXX in configure script so it shouldn't change behaviour.
With this make gives access to its jobserver for linker which will use it when linking with -flto=jobserver
-flto=jobserver is present in GCC since version 7 at least
I presume that this has been tested as not to confuse |
I don't see why |
As a matter of fact, it does parse the make files. It happens in |
It seems it reads variables definitions (and ifeq, ...) and not recipes. |
Looking good. +1 from me. |
Thanks, merging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
There are three changes in this PR which are dependent, thus the grouping.
First one is to use $(LD) instead of $(CXX) when linking.
I think it's more coherent and makes it easier to grep linking places in makefiles.
This change shouldn't have any impact as we set LD to ${CXX} in configure script
Second one is to make all link commands Make recursive by prepending them with a +.
We can then use -flto=jobserver to let GCC handle LTO threading properly.
This basically tells to make to open 2 more FDs for the child process so it shouldn't have any impact when linker doesn't use it.
(That's what GNU make documentation implies)
Third one is to make use of -flto=jobserver on Vita builds instead of hardcoding a 20 cores value which can have negative impacts on some servers.
Specifying number of cores for compilation is useless and is removed.