Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/44886 )

Change subject: scons: Revert "Enable LTO for opt, perf and prof builds."
......................................................................

scons: Revert "Enable LTO for opt, perf and prof builds."

This reverts
https://gem5-review.googlesource.com/c/public/gem5/+/40815

Change-Id: I7dbd2b555570c90c98f38c7c02eb052571f7b6bd
---
M SConstruct
M src/SConscript
2 files changed, 8 insertions(+), 3 deletions(-)



diff --git a/SConstruct b/SConstruct
index 3e2df39..f3d65f0 100755
--- a/SConstruct
+++ b/SConstruct
@@ -328,7 +328,9 @@
         error('gcc version 5 or newer required.\n'
               'Installed version:', main['CXXVERSION'])

-    # If not disabled, set the Link-Time Optimization (LTO) flags.
+    # 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.
     if not GetOption('no_lto'):
# g++ uses "make" to parallelize LTO. The program can be overriden with # the environment variable "MAKE", but we currently make no attempt to
diff --git a/src/SConscript b/src/SConscript
index 831f5c6..47aa2ea 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1435,8 +1435,11 @@
     # the optimization to the ldflags as LTO defers the optimization
     # to link time
     for target in ['opt', 'fast', 'prof', 'perf']:
-        ccflags[target] += ['-O3'] + env['LTO_CCFLAGS']
-        ldflags[target] += ['-O3'] + env['LTO_LDFLAGS']
+        ccflags[target] += ['-O3']
+        ldflags[target] += ['-O3']
+
+    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

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44886
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I7dbd2b555570c90c98f38c7c02eb052571f7b6bd
Gerrit-Change-Number: 44886
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to