scons: Add --with-lto to enabled LTO; remove --no-lto
LTO is no longer enabled by default and can instead be enabled by `--with-lto`. Change-Id: I2eea7d447703491675c02730707cf9026cface5f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44887 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -1435,11 +1435,9 @@ 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[target] += ['-O3'] + env['LTO_CCFLAGS']
|
||||
ldflags[target] += ['-O3'] + env['LTO_LDFLAGS']
|
||||
|
||||
ccflags['fast'] += env['LTO_CCFLAGS']
|
||||
ldflags['fast'] += env['LTO_LDFLAGS']
|
||||
elif env['CLANG']:
|
||||
ccflags['debug'] += ['-g', '-O0']
|
||||
# opt, fast, prof and perf all share the same cc flags
|
||||
|
||||
Reference in New Issue
Block a user