mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 12:39:11 +00:00
(svn r21662) -Codechange: use -flto=jobserver for GCC 4.6, it makes linking with LTO use number of processes passed to make -j
This commit is contained in:
@@ -1295,7 +1295,11 @@ make_compiler_cflags() {
|
||||
has_lto=`$1 -dumpspecs | grep '\%{flto'`
|
||||
if [ -n "$has_lto" ]; then
|
||||
# Use LTO only if we see LTO exists and is requested
|
||||
flags="$flags -flto"
|
||||
if [ $cc_version -lt 46 ]; then
|
||||
flags="$flags -flto"
|
||||
else
|
||||
flags="$flags -flto=jobserver"
|
||||
fi
|
||||
ldflags="$ldflags -fwhole-program"
|
||||
features="$features lto"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user