author | sherman |
Thu, 31 Jan 2013 13:13:14 -0800 | |
changeset 15516 | c2241c14b970 |
parent 13728 | 882756847a04 |
child 15432 | 9d976ca484d8 |
permissions | -rw-r--r-- |
7397 | 1 |
# |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12262
diff
changeset
|
2 |
# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. |
7397 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
7 |
# published by the Free Software Foundation. |
|
8 |
# |
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
# accompanied this code). |
|
14 |
# |
|
15 |
# You should have received a copy of the GNU General Public License version |
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
# |
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
# or visit www.oracle.com if you need additional information or have any |
|
21 |
# questions. |
|
22 |
# |
|
23 |
# |
|
24 |
||
25 |
set -e |
|
26 |
||
27 |
# Note that we currently do not have a way to set HotSpotMksHome in |
|
28 |
# the batch build, but so far this has not seemed to be a problem. The |
|
29 |
# reason this environment variable is necessary is that it seems that |
|
30 |
# Windows truncates very long PATHs when executing shells like MKS's |
|
31 |
# sh, and it has been found that sometimes `which sh` fails. |
|
32 |
||
33 |
if [ "x$HotSpotMksHome" != "x" ]; then |
|
34 |
TOOL_DIR="$HotSpotMksHome" |
|
35 |
else |
|
36 |
# HotSpotMksHome is not set so use the directory that contains "sh". |
|
37 |
# This works with both MKS and Cygwin. |
|
38 |
SH=`which sh` |
|
39 |
TOOL_DIR=`dirname "$SH"` |
|
40 |
fi |
|
41 |
||
42 |
DIRNAME="$TOOL_DIR/dirname" |
|
43 |
FIND="$TOOL_DIR/find" |
|
44 |
||
45 |
TYPE=$1 |
|
46 |
Platform_arch=$2 |
|
47 |
Platform_arch_model=$3 |
|
48 |
Platform_os_family=windows |
|
49 |
Platform_os_arch=windows_$Platform_arch |
|
50 |
||
51 |
WorkSpace=$4 |
|
52 |
GENERATED=$5 |
|
53 |
||
8114
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
54 |
COMMONSRC_REL=src |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
55 |
ALTSRC_REL=src/closed # Change this to pick up alt sources from somewhere else |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
56 |
|
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
57 |
COMMONSRC=${WorkSpace}/${COMMONSRC_REL} |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
58 |
ALTSRC=${WorkSpace}/${ALTSRC_REL} |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
59 |
|
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
60 |
BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \); fi`" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
61 |
BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
62 |
|
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
63 |
for sd in \ |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
64 |
share/vm/gc_implementation/shared \ |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
65 |
os/${Platform_os_family}/vm \ |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
66 |
cpu/${Platform_arch}/vm \ |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
67 |
os_cpu/${Platform_os_arch}/vm; do |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
68 |
if [ -d "${ALTSRC}/${sd}" ]; then |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
69 |
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/${sd}" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
70 |
fi |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
71 |
BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/${sd}" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
72 |
done |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
73 |
|
7397 | 74 |
BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles" |
75 |
||
11480
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
76 |
if [ -d "${ALTSRC}/share/vm/jfr" ]; then |
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
77 |
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr/agent" |
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
78 |
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr/agent/isolated_deps/util" |
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
79 |
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr/jvm" |
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
80 |
BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr" |
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
81 |
fi |
1bf714e8adb4
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
8921
diff
changeset
|
82 |
|
12262
fb3b9fede660
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
11480
diff
changeset
|
83 |
BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/share/vm/prims/wbtestmethods" |
fb3b9fede660
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
11480
diff
changeset
|
84 |
|
7397 | 85 |
CORE_PATHS="${BASE_PATHS}" |
86 |
# shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS. |
|
8114
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
87 |
if [ -d "${ALTSRC}/share/vm/gc_implementation" ]; then |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
88 |
CORE_PATHS="${CORE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
89 |
fi |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
90 |
CORE_PATHS="${CORE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`" |
7397 | 91 |
|
8114
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
92 |
if [ -d "${ALTSRC}/share/vm/c1" ]; then |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
93 |
COMPILER1_PATHS="${ALTSRC}/share/vm/c1" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
94 |
fi |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
95 |
COMPILER1_PATHS="${COMPILER1_PATHS} ${COMMONSRC}/share/vm/c1" |
7397 | 96 |
|
8114
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
97 |
if [ -d "${ALTSRC}/share/vm/opto" ]; then |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
98 |
COMPILER2_PATHS="${ALTSRC}/share/vm/opto" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
99 |
fi |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
100 |
COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/opto" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
101 |
if [ -d "${ALTSRC}/share/vm/libadt" ]; then |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
102 |
COMPILER2_PATHS="${COMPILER2_PATHS} ${ALTSRC}/share/vm/libadt" |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
103 |
fi |
340b5b8b544b
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
7451
diff
changeset
|
104 |
COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/libadt" |
7397 | 105 |
COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles" |
106 |
||
107 |
# Include dirs per type. |
|
108 |
case "${TYPE}" in |
|
109 |
"core") Src_Dirs="${CORE_PATHS}" ;; |
|
110 |
"kernel") Src_Dirs="${BASE_PATHS} ${COMPILER1_PATHS}" ;; |
|
111 |
"compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;; |
|
112 |
"compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;; |
|
113 |
"tiered") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;; |
|
114 |
"zero") Src_Dirs="${CORE_PATHS}" ;; |
|
115 |
"shark") Src_Dirs="${CORE_PATHS}" ;; |
|
116 |
esac |
|
117 |
||
118 |
COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp chaitin* c2_* runtime_*" |
|
119 |
COMPILER1_SPECIFIC_FILES="c1_*" |
|
120 |
SHARK_SPECIFIC_FILES="shark" |
|
121 |
ZERO_SPECIFIC_FILES="zero" |
|
122 |
||
123 |
# These files need to be excluded when building the kernel target. |
|
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
12262
diff
changeset
|
124 |
KERNEL_EXCLUDED_FILES="attachListener.cpp attachListener_windows.cpp metaspaceShared_${Platform_arch_model}.cpp forte.cpp fprofiler.cpp heapDumper.cpp heapInspection.cpp jniCheck.cpp jvmtiCodeBlobEvents.cpp jvmtiExtensions.cpp jvmtiImpl.cpp jvmtiRawMonitor.cpp jvmtiTagMap.cpp jvmtiTrace.cpp vmStructs.cpp g1MemoryPool.cpp psMemoryPool.cpp gcAdaptivePolicyCounters.cpp concurrentGCThread.cpp metaspaceShared.cpp mutableNUMASpace.cpp allocationStats.cpp gSpaceCounters.cpp immutableSpace.cpp mutableSpace.cpp spaceCounters.cpp yieldingWorkgroup.cpp" |
7397 | 125 |
|
126 |
# Always exclude these. |
|
127 |
Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp" |
|
128 |
||
129 |
# Exclude per type. |
|
130 |
case "${TYPE}" in |
|
131 |
"core") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; |
|
132 |
"kernel") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ${KERNEL_EXCLUDED_FILES} ciTypeFlow.cpp" ;; |
|
133 |
"compiler1") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; |
|
134 |
"compiler2") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;; |
|
135 |
"tiered") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;; |
|
136 |
"zero") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; |
|
137 |
"shark") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES}" ;; |
|
138 |
esac |
|
139 |
||
140 |
# Special handling of arch model. |
|
141 |
case "${Platform_arch_model}" in |
|
142 |
"x86_32") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_64*" ;; |
|
143 |
"x86_64") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_32*" ;; |
|
144 |
esac |
|
145 |
||
7451
cc12e11b1e07
7006659: temporary adlc files are added to the build variables
stefank
parents:
7397
diff
changeset
|
146 |
# Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. |
7397 | 147 |
function findsrc { |
7451
cc12e11b1e07
7006659: temporary adlc files are added to the build variables
stefank
parents:
7397
diff
changeset
|
148 |
$FIND ${1}/. ! -name . -prune \ |
cc12e11b1e07
7006659: temporary adlc files are added to the build variables
stefank
parents:
7397
diff
changeset
|
149 |
-a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ |
cc12e11b1e07
7006659: temporary adlc files are added to the build variables
stefank
parents:
7397
diff
changeset
|
150 |
-a \! \( -name ${Src_Files_EXCLUDE// / -o -name } \) \ |
cc12e11b1e07
7006659: temporary adlc files are added to the build variables
stefank
parents:
7397
diff
changeset
|
151 |
| sed 's/.*\/\(.*\)/\1/'; |
7397 | 152 |
} |
153 |
||
154 |
Src_Files= |
|
155 |
for e in ${Src_Dirs}; do |
|
156 |
Src_Files="${Src_Files}`findsrc ${e}` " |
|
157 |
done |
|
158 |
||
159 |
Obj_Files= |
|
160 |
for e in ${Src_Files}; do |
|
161 |
Obj_Files="${Obj_Files}${e%\.[!.]*}.obj " |
|
162 |
done |
|
163 |
||
164 |
echo Obj_Files=${Obj_Files} |