@@ -36,14 +36,19 @@ if not os.path.exists(cwd + "/user" + "/arch" +"/" + rtconfig.ARCH + "/vdso.lds"
3636# clean = ["xmake", "clean"]
3737
3838vdso_file = os .path .join (cwd , 'user' ,"arch" , rtconfig .ARCH , 'SConstruct' )
39- EXEC_PATH_PASS = "EXEC_PATH=" + rtconfig .EXEC_PATH
40- command = ["scons" , "-f" , vdso_file , EXEC_PATH_PASS ]
41- clean = ["scons" , "-f" , vdso_file , "--clean" ]
4239
43- if not GetOption ('clean' ):
44- result = subprocess .run (command )
40+ process_env = os .environ .copy ()
41+ if hasattr (rtconfig , 'EXEC_PATH' ) and rtconfig .EXEC_PATH is not None :
42+ process_env ['EXEC_PATH' ] = rtconfig .EXEC_PATH
43+ if hasattr (rtconfig , 'PREFIX' ) and rtconfig .PREFIX is not None :
44+ process_env ['CC_PREFIX' ] = rtconfig .PREFIX
45+ command = ["scons" , "-f" , vdso_file ]
46+ clean_command = ["scons" , "-f" , vdso_file , "--clean" ]
47+
48+ if not GetOption ('clean' ):
49+ result = subprocess .run (command , env = process_env , check = True )
4550else :
46- result = subprocess .run (clean )
51+ result = subprocess .run (clean_command , env = process_env , check = True )
4752
4853if result .returncode == 0 :
4954 print ("Command executed successfully" )
0 commit comments