Skip to content

Commit

Permalink
scons: Fix 'CheckLinkFlag' so '-Werror' is not enabled
Browse files Browse the repository at this point in the history
A small error in 'CheckLinkFlag' was resulting in `-Werror` being set
as a CXXFLAG after the function was run. This patch fixes this.

Change-Id: I786f81a4f94be0356573eb6d4673d04ee5aa844d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54863
Maintainer: Bobby Bruce <[email protected]>
Reviewed-by: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
  • Loading branch information
BobbyRBruce committed Dec 27, 2021
1 parent 5941458 commit db921c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site_scons/gem5_scons/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def CheckLinkFlag(context, flag, autoadd=True, set_for_shared=True):
last_linkflags = context.env['LINKFLAGS']
context.env.Append(LINKFLAGS=[flag])
pre_werror = context.env['LINKFLAGS']
context.env.Append(CXXFLAGS=['-Werror'])
context.env.Append(LINKFLAGS=['-Werror'])
ret = context.TryLink('int main(int, char *[]) { return 0; }', '.cc')
context.env['LINKFLAGS'] = pre_werror
if not (ret and autoadd):
Expand Down

0 comments on commit db921c8

Please sign in to comment.