| Index: chrome/build_nacl_irt.py
|
| ===================================================================
|
| --- chrome/build_nacl_irt.py (revision 97773)
|
| +++ chrome/build_nacl_irt.py (working copy)
|
| @@ -79,11 +79,16 @@
|
| filename = GPU_CMD_BUFFER_DIR + filename[len(NACL_CMD_BUFFER_DIR):]
|
| inputs.add(filename)
|
| # Check that everything exists and make it script relative.
|
| + # Exclude things above SRC_DIR.
|
| rel_inputs = set()
|
| for f in inputs:
|
| nf = os.path.join(NACL_DIR, f)
|
| if not os.path.exists(nf):
|
| raise Exception('missing input file "%s"' % nf)
|
| + # If the relative path from SRC_DIR to the file starts with ../ ignore it.
|
| + # (i.e. the file is outside the client).
|
| + if RelativePath(nf, SRC_DIR).startswith('..' + os.sep):
|
| + continue
|
| rel_inputs.add(RelativePath(nf, SCRIPT_DIR))
|
| # Print it sorted.
|
| rel_inputs = sorted(list(rel_inputs))
|
| @@ -98,6 +103,8 @@
|
| platforms: list of platform names to build for.
|
| out_dir: directory to output the IRT to.
|
| """
|
| + # Make out_dir absolute.
|
| + out_dir = os.path.abspath(out_dir)
|
| # Clean.
|
| scons_out = os.path.join(NACL_DIR, 'scons-out')
|
| if os.path.exists(scons_out):
|
| @@ -110,7 +117,22 @@
|
| 'scons-out/nacl_irt-' + platform + '/staging/irt.nexe',
|
| ]
|
| print 'Running: ' + ' '.join(cmd)
|
| - p = subprocess.Popen(cmd, cwd=NACL_DIR)
|
| + # Work around the fact that python's readline module (used by scons),
|
| + # attempts to alter file handle state on stdin in a way that blocks if
|
| + # a process is not a member of a foreground job on a tty on OSX.
|
| + # e.g. On a Mac:
|
| + #
|
| + # hydric:test mseaborn$ python -c 'import readline' &
|
| + # [1] 67058
|
| + # hydric:test mseaborn$
|
| + # [1]+ Stopped python -c 'import readline'
|
| + #
|
| + # i.e. the process receives a stop signal when it's a background job.
|
| + if sys.platform == 'darwin':
|
| + devnull = open(os.devnull, 'r')
|
| + else:
|
| + devnull = None
|
| + p = subprocess.Popen(cmd, cwd=NACL_DIR, stdin=devnull)
|
| p.wait()
|
| if p.returncode != 0:
|
| sys.exit(3)
|
|
|
| Property changes on: chrome/build_nacl_irt.py
|
| ___________________________________________________________________
|
| Added: svn:executable
|
| + *
|
|
|
|
|