1
0
Fork 0

Allow GCC's LTO on all platforms

This commit is contained in:
kcgen 2020-05-05 18:21:53 -07:00 committed by Patryk Obara
parent 17de912e43
commit d7b8590026
2 changed files with 4 additions and 6 deletions

View file

@ -43,7 +43,10 @@ cflags_usan+=("${cflags_debug[@]}" -fsanitize=undefined
cflags_tsan+=("${cflags_debug[@]}" -fsanitize=thread)
# Modifier additions
MODIFIERS=(fdo)
MODIFIERS=(lto fdo)
# Override the prior optimization flag because O2 does better w/ feedback
cflags_fdo+=("-O2 -ftree-vectorize
-fauto-profile=${FDO_FILE:-${repo_root}/current.afdo}")
cflags_lto+=(-flto)
ldflags_lto+=("${cflags[@]}" "-flto=$(( $(nproc) + 2 ))")

View file

@ -5,8 +5,3 @@ ldflags+=(-Wl,--as-needed)
x86_math=(-mfpmath=sse -msse4.2)
cflags_release+=("${x86_math[@]}")
cflags_optinfo+=("${x86_math[@]}")
# Modifier additions
MODIFIERS+=(lto)
cflags_lto+=(-flto)
ldflags_lto+=("${cflags[@]}" "-flto=$(( $(nproc) + 2 ))")