[gem5-dev] Change in gem5/gem5[develop]: scons: Use the scons environment when marshalling.

2020-03-26 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27123 )


Change subject: scons: Use the scons environment when marshalling.
..

scons: Use the scons environment when marshalling.

scons maintains an environment (in the shell sense) in the ENV
construction variable for use when running external programs. When we
run the "marshal" program which gathers up python objects to embed in
the gem5 binary, it's run by subprocess instead of through scons, and it
uses its own environment inherited from the host system.

Instead, this change makes the subprocess function use the scons
environment when calling "marshal". This ensures the environment is
consistent between this command and other commands scons runs.

This is usually not very important, but some tools like asan take
options set through the environment, and they may need to be adjusted
sometimes.

Change-Id: I671b447657ed8fad45fac7393cc1c09073bf3d3a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27123
Reviewed-by: Nikos Nikoleris 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/SConscript
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/SConscript b/src/SConscript
index 2cdf6cb..ed7e1ea 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1166,7 +1166,8 @@

 import subprocess

-marshalled = subprocess.check_output([source[0].abspath,  
str(source[1])])

+marshalled = subprocess.check_output(
+[source[0].abspath, str(source[1])], env=env['ENV'])

 compressed = zlib.compress(marshalled)
 data = compressed

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27123
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: I671b447657ed8fad45fac7393cc1c09073bf3d3a
Gerrit-Change-Number: 27123
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Earl Ou 
Gerrit-CC: Jui-min Lee 
Gerrit-CC: Yu-hsin Wang 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: scons: Use the scons environment when marshalling.

2020-03-26 Thread Gabe Black (Gerrit)

Hello Gabe Black,

I'd like you to do a code review. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/27123

to review the following change.


Change subject: scons: Use the scons environment when marshalling.
..

scons: Use the scons environment when marshalling.

scons maintains an environment (in the shell sense) in the ENV
construction variable for use when running external programs. When we
run the "marshal" program which gathers up python objects to embed in
the gem5 binary, it's run by subprocess instead of through scons, and it
uses its own environment inherited from the host system.

Instead, this change makes the subprocess function use the scons
environment when calling "marshal". This ensures the environment is
consistent between this command and other commands scons runs.

This is usually not very important, but some tools like asan take
options set through the environment, and they may need to be adjusted
sometimes.

Change-Id: I671b447657ed8fad45fac7393cc1c09073bf3d3a
---
M src/SConscript
1 file changed, 2 insertions(+), 1 deletion(-)



diff --git a/src/SConscript b/src/SConscript
index 2cdf6cb..ed7e1ea 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1166,7 +1166,8 @@

 import subprocess

-marshalled = subprocess.check_output([source[0].abspath,  
str(source[1])])

+marshalled = subprocess.check_output(
+[source[0].abspath, str(source[1])], env=env['ENV'])

 compressed = zlib.compress(marshalled)
 data = compressed

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27123
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: I671b447657ed8fad45fac7393cc1c09073bf3d3a
Gerrit-Change-Number: 27123
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev