Mercurial > hg > graal-compiler
annotate make/build.sh @ 20869:aff67777d2ea
Better verification in assertSnippetKills.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 09 Apr 2015 15:04:09 +0200 |
parents | bab5cbf74b5f |
children |
rev | line source |
---|---|
0 | 1 #! /bin/sh |
2 # | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
3 # Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
0 | 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 # | |
6 # This code is free software; you can redistribute it and/or modify it | |
7 # under the terms of the GNU General Public License version 2 only, as | |
8 # published by the Free Software Foundation. | |
9 # | |
10 # This code is distributed in the hope that it will be useful, but WITHOUT | |
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 # version 2 for more details (a copy is included in the LICENSE file that | |
14 # accompanied this code). | |
15 # | |
16 # You should have received a copy of the GNU General Public License version | |
17 # 2 along with this work; if not, write to the Free Software Foundation, | |
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
19 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
21 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
196
diff
changeset
|
22 # questions. |
0 | 23 # |
24 # | |
25 | |
26 # Make sure the variable JAVA_HOME is set before running this script. | |
27 | |
28 set -u | |
29 | |
30 | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
31 if [ $# -lt 1 ]; then |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
32 echo "Usage : $0 BuildTarget [LP64=1] [BuildOptions]" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
33 echo " Server VM | Client VM" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
34 echo "BuildTarget : debug | debug1" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
35 echo " fastdebug | fastdebug1" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
36 echo " jvmg | jvmg1" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
37 echo " optimized | optimized1" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
38 echo " profiled | profiled1" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
39 echo " product | product1" |
0 | 40 exit 1 |
41 fi | |
42 | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
43 if [ "${JAVA_HOME-}" = "" -o ! -d "${JAVA_HOME-}" -o ! -d ${JAVA_HOME-}/jre/lib/ ]; then |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
44 echo "JAVA_HOME needs to be set to a valid JDK path" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
45 echo "JAVA_HOME: ${JAVA_HOME-}" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
46 exit 1 |
0 | 47 fi |
48 | |
49 # Just in case: | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
50 JAVA_HOME=`( cd $JAVA_HOME; pwd )` |
0 | 51 |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
52 if [ "${ALT_BOOTDIR-}" = "" -o ! -d "${ALT_BOOTDIR-}" -o ! -d ${ALT_BOOTDIR-}/jre/lib/ ]; then |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
53 ALT_BOOTDIR=${JAVA_HOME} |
0 | 54 fi |
55 | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
56 # build in current directory by default |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
57 if [ "${ALT_OUTPUTDIR-}" = "" -o ! -d "${ALT_OUTPUTDIR-}" ]; then |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
58 ALT_OUTPUTDIR=`(pwd)` |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
59 fi |
0 | 60 |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
61 HOTSPOT_SRC=`(dirname $0)`/.. |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
62 HOTSPOT_SRC=`(cd ${HOTSPOT_SRC}; pwd)` |
0 | 63 |
64 for gm in gmake gnumake | |
65 do | |
66 if [ "${GNUMAKE-}" != "" ]; then break; fi | |
67 ($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm | |
68 done | |
69 : ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'} | |
70 | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
71 # quiet build by default |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
72 Quiet="MAKE_VERBOSE=" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
73 |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
74 # no debug info by default |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
75 NoDebugInfo="ENABLE_FULL_DEBUG_SYMBOLS=" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
76 |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
77 LANG=C |
0 | 78 |
79 echo "### ENVIRONMENT SETTINGS:" | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
80 export HOTSPOT_SRC ; echo "HOTSPOT_SRC=$HOTSPOT_SRC" |
0 | 81 export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME" |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
82 export ALT_BOOTDIR ; echo "ALT_BOOTDIR=$ALT_BOOTDIR" |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
83 export ALT_OUTPUTDIR ; echo "ALT_OUTPUTDIR=$ALT_OUTPUTDIR" |
0 | 84 export GNUMAKE ; echo "GNUMAKE=$GNUMAKE" |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
85 export LANG ; echo "LANG=$LANG" |
0 | 86 echo "###" |
87 | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
88 BuildOptions="$Quiet $NoDebugInfo $*" |
0 | 89 |
90 echo \ | |
8879
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
91 ${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC} |
bab5cbf74b5f
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
1552
diff
changeset
|
92 ${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC} |