harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r560919 - /harmony/enhanced/drlvm/trunk/build/build.bat
Date Mon, 30 Jul 2007 10:45:23 GMT
Author: gshimansky
Date: Mon Jul 30 03:45:19 2007
New Revision: 560919

URL: http://svn.apache.org/viewvc?view=rev&rev=560919
Log:
Applied patch from HARMONY-4544
[drlvm][build] msvc build can't find COMPILER_CFG_SCRIPT if ICL is not installed


Modified:
    harmony/enhanced/drlvm/trunk/build/build.bat

Modified: harmony/enhanced/drlvm/trunk/build/build.bat
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/build.bat?view=diff&rev=560919&r1=560918&r2=560919
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/build.bat (original)
+++ harmony/enhanced/drlvm/trunk/build/build.bat Mon Jul 30 03:45:19 2007
@@ -33,79 +33,63 @@
 REM 
 REM  For the quick start, build needs the following 
 REM  variables to be set:
-REM  JAVA_HOME = <Path to 1.4-compatible JRE>
+REM  JAVA_HOME = <Path to 1.5-compatible JRE>
 REM  ANT_HOME = <Path to Apache Ant 1.6.5>
+REM  ANT_OPTS = <proxy-host proxy-port> - set it if you work from firewall
 REM  COMPILER_CFG_SCRIPT = <Whatever script that is configuring environment for C/C++
compiler>
+REM  (not that COMPILER_CFG_SCRIPT is an optional setting)
 REM ================================================
 
-REM Script for configuring C/C++ compiler, Intel C compiler by default.
-
-REM Select configuration depending on 64-bitness of Windows
-IF _%PROCESSOR_ARCHITEW6432%_==_AMD64_ GOTO X86_64_CONFIG
-IF _%PROCESSOR_ARCHITECTURE%_==_AMD64_ GOTO X86_64_CONFIG
-IF _%CXX%_ == _msvc_ GOTO MSVC_COMPILER
-GOTO DEFAULT_COMPILER
-
-:MSVC_COMPILER
-IF DEFINED COMPILER_CFG_SCRIPT GOTO CHOOSE_ARGS
-
-REM Try Platform SDK first
-SET COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft Platform SDK\SetEnv.Cmd
-IF EXIST "%COMPILER_CFG_SCRIPT%" GOTO CHOOSE_ARGS
-
-REM Try Platform SDK at another location
-SET COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft SDK\SetEnv.bat
-IF EXIST "%COMPILER_CFG_SCRIPT%" GOTO CHOOSE_ARGS
-
-REM Then try Mirosoft Visual Studio .NET 2003
-SET COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat
-IF EXIST "%COMPILER_CFG_SCRIPT%" GOTO CHOOSE_ARGS
-
-REM Otherwise try Mocrosoft Visual Studio 6
-SET COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT
-IF EXIST "%COMPILER_CFG_SCRIPT%" GOTO CHOOSE_ARGS
-GOTO NO_CFG_SCRIPT
-
-:CHOOSE_ARGS
-IF "%BUILD_CFG%" == "release" (
-    SET COMPILER_CFG_ARG=/RETAIL
-) ELSE (
-    SET COMPILER_CFG_ARG=/DEBUG
-)
-GOTO RUN_COMPILER_CONFIGURATION
-
-:DEFAULT_COMPILER
-IF NOT DEFINED VS71COMNTOOLS (
-    IF EXIST "C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools" (
-        SET VS71COMNTOOLS=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\
-    )
+REM ==========================================================================
+REM
+REM Set up COMPILER_CFG_SCRIPT if it is not set externally
+REM
+REM ==========================================================================
+
+REM select configuration depending on 64-bitness of Windows
+REM Note: PROCESSOR_ARCHITEW6432 is set by cygwin
+SET PLATFORM_64BIT_ARG=
+IF _%PROCESSOR_ARCHITEW6432%_==_AMD64_ SET PLATFORM_64BIT_ARG=amd64
+IF _%PROCESSOR_ARCHITECTURE%_==_AMD64_ SET PLATFORM_64BIT_ARG=amd64
+
+REM COMPILER_CFG_SCRIPT may be set externally 
+IF DEFINED COMPILER_CFG_SCRIPT GOTO CHECK_COMPILER_CONFIGURATION
+
+REM Compiler may be set for 'icl' for Windows x86
+IF _%CXX%_ == _icl_ (
+  IF _%PLATFORM_64BIT_ARG%_==_amd64_ (
+      ECHO error: CXX=icl is not supported on Windows/x86_64
+      GOTO ERROR
+  )
+  SET COMPILER_CFG_SCRIPT=C:\Program Files\Intel\Compiler\C++\9.0\IA32\Bin\iclvars.bat
+  GOTO CHECK_COMPILER_CONFIGURATION
 )
 
-IF DEFINED COMPILER_CFG_SCRIPT GOTO RUN_COMPILER_CONFIGURATION
-SET COMPILER_CFG_SCRIPT=C:\Program Files\Intel\Compiler\C++\9.0\IA32\Bin\iclvars.bat
-IF EXIST "%COMPILER_CFG_SCRIPT%" GOTO RUN_COMPILER_CONFIGURATION
-GOTO NO_CFG_SCRIPT
-
-:X86_64_CONFIG
-SET PLATFORM_64BIT=amd64
+REM Default compiler is MSVC for DRLVM build on Windows
+REM MSVC 2005 must be used for Windows x86_64
+IF _%PLATFORM_64BIT_ARG%_==_amd64_ GOTO MSVC_X86_64
 
-IF DEFINED COMPILER_CFG_SCRIPT GOTO RUN_COMPILER_CONFIGURATION
+:MSVC_X86
+SET COMPILER_CFG_SCRIPT=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat
+GOTO CHECK_COMPILER_CONFIGURATION
 
-REM Select Microsoft Visual Studio 2005 on Windows x64 edition
+:MSVC_X86_64
 SET COMPILER_CFG_SCRIPT=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat
+
+:CHECK_COMPILER_CONFIGURATION
 IF EXIST "%COMPILER_CFG_SCRIPT%" GOTO RUN_COMPILER_CONFIGURATION
 
-:NO_CFG_SCRIPT
-ECHO error: Cannot guess the location of compiler configuration script
-ECHO Please set COMPILER_CFG_SCRIPT and/or CXX
+REM COMPILER_CFG_SCRIPT is not detected or points to unexisting file
+ECHO Error: COMPILER_CFG_SCRIPT is unset or points to non-existing file
+ECHO        A set/detected COMPILER_CFG_SCRIPT value is: %COMPILER_CFG_SCRIPT%
+ECHO Note: you may set COMPILER_CFG_SCRIPT and/or CXX before running build.bat
 GOTO ERROR
 
 :RUN_COMPILER_CONFIGURATION
 ECHO COMPILER_CFG_SCRIPT="%COMPILER_CFG_SCRIPT%"
-ECHO PLATFORM_64BIT="%PLATFORM_64BIT%"
-ECHO COMPILER_CFG_ARG="%COMPILER_CFG_ARG%"
+ECHO PLATFORM_64BIT_ARG="%PLATFORM_64BIT_ARG%"
 ECHO ON
-CALL "%COMPILER_CFG_SCRIPT%" %PLATFORM_64BIT% %COMPILER_CFG_ARG%
+CALL "%COMPILER_CFG_SCRIPT%" %PLATFORM_64BIT_ARG%
 @ECHO OFF
 
 IF NOT ERRORLEVEL 0 (
@@ -166,4 +150,3 @@
 EXIT /B 1
 
 :THEEND
-



Mime
View raw message