Debugging: Add code to print backtrace for guest on SIGSEGV
[nativeclient.git] / scons.bat
blob0e1048db6f190051f182f1d3ae95ed5e45dbdc65
2 @echo off
4 setlocal
6 :: If this batch file is run directly thru cygwin, we will get the wrong
7 :: version of python. To avoid this, if we detect cygwin, we need to then
8 :: invoke the shell script which will then re-invoke this batch file with
9 :: cygwin stripped out of the path.
10 :: Detect cygwin by trying to run bash.
11 bash --version >NUL 2>&1
12 if %ERRORLEVEL% == 0 (
13     bash "%~dp0\scons" %*
14     goto end
17 :: Preserve a copy of the PATH (in case we need it later, mainly for cygwin).
18 set PRESCONS_PATH=%PATH%
20 :: Set the PYTHONPATH so we can import SCons modules
21 set PYTHONPATH=%~dp0..\third_party\scons\scons-local;%PYTHONPATH%
23 :: Add gnu_binutils to the path
24 set PATH=%PATH%;%~dp0..\third_party\gnu_binutils\files
26 :: Run the included copy of scons.
27 python -O -OO "%~dp0\..\third_party\scons\scons.py" %*
29 :end