diff --git a/SConstruct b/SConstruct index e9dfae5038..e1814c37c3 100755 --- a/SConstruct +++ b/SConstruct @@ -358,8 +358,7 @@ if main['GCC']: main['GCC_VERSION'] = gcc_version # Add the appropriate Link-Time Optimization (LTO) flags - # unless LTO is explicitly turned off. Note that these flags - # are only used by the fast target. + # unless LTO is explicitly turned off. if not GetOption('no_lto'): # Pass the LTO flag when compiling to produce GIMPLE # output, we merely create the flags here and only append diff --git a/src/SConscript b/src/SConscript index aeb7038a61..5fe0ab2c25 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1341,11 +1341,8 @@ if env['GCC']: # the optimization to the ldflags as LTO defers the optimization # to link time for target in ['opt', 'fast', 'prof', 'perf']: - ccflags[target] += ['-O3'] - ldflags[target] += ['-O3'] - - ccflags['fast'] += env['LTO_CCFLAGS'] - ldflags['fast'] += env['LTO_LDFLAGS'] + ccflags[target] += ['-O3'] + env['LTO_CCFLAGS'] + ldflags[target] += ['-O3'] + env['LTO_LDFLAGS'] elif env['CLANG']: ccflags['debug'] += ['-g', '-O0'] # opt, fast, prof and perf all share the same cc flags