SConscript (11984:41223424e72c) SConscript (11985:03e3d059c4b9)
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 1227 unchanged lines hidden (view full) ---

1236 test_objs += main_objs
1237 path = variant('unittest/%s.%s' % (test.target, label))
1238 new_env.Program(path, test_objs + static_objs)
1239
1240 progname = exename
1241 if strip:
1242 progname += '.unstripped'
1243
1# -*- mode:python -*-
2
3# Copyright (c) 2004-2005 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright

--- 1227 unchanged lines hidden (view full) ---

1236 test_objs += main_objs
1237 path = variant('unittest/%s.%s' % (test.target, label))
1238 new_env.Program(path, test_objs + static_objs)
1239
1240 progname = exename
1241 if strip:
1242 progname += '.unstripped'
1243
1244 # When linking the gem5 binary, the command line can be too big for the
1245 # shell to handle. Use "subprocess" to spawn processes without passing
1246 # through the shell to avoid this problem. That means we also can't use
1247 # shell syntax in any of the commands this will run, but that isn't
1248 # currently an issue.
1249 def spawn_with_subprocess(sh, escape, cmd, args, env):
1250 return subprocess.call(args, env=env)
1244 targets = new_env.Program(progname, main_objs + static_objs)
1251
1245
1252 # Since we're not running through a shell, no escaping is necessary either.
1253 targets = new_env.Program(progname, main_objs + static_objs,
1254 SPAWN=spawn_with_subprocess,
1255 ESCAPE=lambda x: x)
1256
1257 if strip:
1258 if sys.platform == 'sunos5':
1259 cmd = 'cp $SOURCE $TARGET; strip $TARGET'
1260 else:
1261 cmd = 'strip $SOURCE -o $TARGET'
1262 targets = new_env.Command(exename, progname,
1263 MakeAction(cmd, Transform("STRIP")))
1264

--- 143 unchanged lines hidden ---
1246 if strip:
1247 if sys.platform == 'sunos5':
1248 cmd = 'cp $SOURCE $TARGET; strip $TARGET'
1249 else:
1250 cmd = 'strip $SOURCE -o $TARGET'
1251 targets = new_env.Command(exename, progname,
1252 MakeAction(cmd, Transform("STRIP")))
1253

--- 143 unchanged lines hidden ---