Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/41159 )
Change subject: scons: In Check(Cxx|Link)Flag, only install the flag if it
exists.
......................................................................
scons: In Check(Cxx|Link)Flag, only install the flag if it exists.
These functions where correctly returning whether a flag had existed,
and also correctly not installing it if asked not to. Unfortunately if
they *were* asked to install the flag, they ignored whether or not it
had actually existed to begin with.
Change-Id: I2dca0e1a0ddbc182576d48237aeea5452a02c51b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41159
Maintainer: Gabe Black <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
---
M site_scons/gem5_scons/configure.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/site_scons/gem5_scons/configure.py
b/site_scons/gem5_scons/configure.py
index e539c73..cebbb12 100644
--- a/site_scons/gem5_scons/configure.py
+++ b/site_scons/gem5_scons/configure.py
@@ -47,7 +47,7 @@
last_cxxflags = context.env['CXXFLAGS']
context.env.Append(CXXFLAGS=[flag])
ret = context.TryCompile('', '.cc')
- if not autoadd:
+ if not (ret and autoadd):
context.env['CXXFLAGS'] = last_cxxflags
context.Result(ret)
return ret
@@ -57,7 +57,7 @@
last_linkflags = context.env['LINKFLAGS']
context.env.Append(LINKFLAGS=[flag])
ret = context.TryLink('int main(int, char *[]) { return 0; }', '.cc')
- if not autoadd:
+ if not (ret and autoadd):
context.env['LINKFLAGS'] = last_linkflags
if set_for_shared:
assert(autoadd)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41159
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: I2dca0e1a0ddbc182576d48237aeea5452a02c51b
Gerrit-Change-Number: 41159
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s