Mercurial > hg > truffle
annotate make/windows/create_obj_files.sh @ 11865:3d97040060d4
SchedulePhase: bail out with SchedulingError if scheduled block is not dominated by earliest
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Wed, 02 Oct 2013 11:16:21 +0200 |
parents | f2110083203d |
children | 31f3b1e1c5e5 |
rev | line source |
---|---|
1972 | 1 # |
7951 | 2 # Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. |
1972 | 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 | |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
54 COMMONSRC_REL=src |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
55 ALTSRC_REL=src/closed # Change this to pick up alt sources from somewhere else |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
56 |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
57 COMMONSRC=${WorkSpace}/${COMMONSRC_REL} |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
58 ALTSRC=${WorkSpace}/${ALTSRC_REL} |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
59 |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
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`" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
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 \)`" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
62 |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
63 for sd in \ |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
64 share/vm/gc_implementation/shared \ |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
65 os/${Platform_os_family}/vm \ |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
66 cpu/${Platform_arch}/vm \ |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
67 os_cpu/${Platform_os_arch}/vm; do |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
68 if [ -d "${ALTSRC}/${sd}" ]; then |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
69 BASE_PATHS="${BASE_PATHS} ${ALTSRC}/${sd}" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
70 fi |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
71 BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/${sd}" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
72 done |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
73 |
10405 | 74 BASE_PATHS="${BASE_PATHS} ${GENERATED}/jvmtifiles ${GENERATED}/tracefiles" |
1972 | 75 |
4800
94ec88ca68e2
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
2426
diff
changeset
|
76 if [ -d "${ALTSRC}/share/vm/jfr" ]; then |
10405 | 77 BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr" |
78 BASE_PATHS="${BASE_PATHS} ${ALTSRC}/share/vm/jfr/buffers" | |
4800
94ec88ca68e2
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
2426
diff
changeset
|
79 fi |
94ec88ca68e2
7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents:
2426
diff
changeset
|
80 |
5978
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
4800
diff
changeset
|
81 BASE_PATHS="${BASE_PATHS} ${COMMONSRC}/share/vm/prims/wbtestmethods" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
4800
diff
changeset
|
82 |
1972 | 83 CORE_PATHS="${BASE_PATHS}" |
84 # shared is already in BASE_PATHS. Should add vm/memory but that one is also in BASE_PATHS. | |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
85 if [ -d "${ALTSRC}/share/vm/gc_implementation" ]; then |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
86 CORE_PATHS="${CORE_PATHS} `$FIND ${ALTSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
87 fi |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
88 CORE_PATHS="${CORE_PATHS} `$FIND ${COMMONSRC}/share/vm/gc_implementation ! -name gc_implementation -prune -type d \! -name shared`" |
1972 | 89 |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
90 if [ -d "${ALTSRC}/share/vm/c1" ]; then |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
91 COMPILER1_PATHS="${ALTSRC}/share/vm/c1" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
92 fi |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
93 COMPILER1_PATHS="${COMPILER1_PATHS} ${COMMONSRC}/share/vm/c1" |
1972 | 94 |
2199
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
95 if [ -d "${ALTSRC}/share/vm/opto" ]; then |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
96 COMPILER2_PATHS="${ALTSRC}/share/vm/opto" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
97 fi |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
98 COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/opto" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
99 if [ -d "${ALTSRC}/share/vm/libadt" ]; then |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
100 COMPILER2_PATHS="${COMPILER2_PATHS} ${ALTSRC}/share/vm/libadt" |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
101 fi |
d8a72fbc4be7
7003401: Implement VM error-reporting functionality on erroneous termination
kamg
parents:
2026
diff
changeset
|
102 COMPILER2_PATHS="${COMPILER2_PATHS} ${COMMONSRC}/share/vm/libadt" |
1972 | 103 COMPILER2_PATHS="${COMPILER2_PATHS} ${GENERATED}/adfiles" |
104 | |
105 # Include dirs per type. | |
106 case "${TYPE}" in | |
107 "core") Src_Dirs="${CORE_PATHS}" ;; | |
108 "compiler1") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS}" ;; | |
109 "compiler2") Src_Dirs="${CORE_PATHS} ${COMPILER2_PATHS}" ;; | |
110 "tiered") Src_Dirs="${CORE_PATHS} ${COMPILER1_PATHS} ${COMPILER2_PATHS}" ;; | |
111 "zero") Src_Dirs="${CORE_PATHS}" ;; | |
112 "shark") Src_Dirs="${CORE_PATHS}" ;; | |
113 esac | |
114 | |
10111 | 115 COMPILER2_SPECIFIC_FILES="opto libadt bcEscapeAnalyzer.cpp c2_* runtime_*" |
1972 | 116 COMPILER1_SPECIFIC_FILES="c1_*" |
117 SHARK_SPECIFIC_FILES="shark" | |
118 ZERO_SPECIFIC_FILES="zero" | |
119 | |
120 # Always exclude these. | |
121 Src_Files_EXCLUDE="jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp" | |
122 | |
123 # Exclude per type. | |
124 case "${TYPE}" in | |
125 "core") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; | |
126 "compiler1") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; | |
127 "compiler2") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;; | |
128 "tiered") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${ZERO_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES}" ;; | |
129 "zero") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${SHARK_SPECIFIC_FILES} ciTypeFlow.cpp" ;; | |
130 "shark") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} ${COMPILER1_SPECIFIC_FILES} ${COMPILER2_SPECIFIC_FILES} ${ZERO_SPECIFIC_FILES}" ;; | |
131 esac | |
132 | |
133 # Special handling of arch model. | |
134 case "${Platform_arch_model}" in | |
135 "x86_32") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_64*" ;; | |
136 "x86_64") Src_Files_EXCLUDE="${Src_Files_EXCLUDE} *x86_32*" ;; | |
137 esac | |
138 | |
2026
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
1972
diff
changeset
|
139 # Locate all source files in the given directory, excluding files in Src_Files_EXCLUDE. |
1972 | 140 function findsrc { |
2026
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
1972
diff
changeset
|
141 $FIND ${1}/. ! -name . -prune \ |
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
1972
diff
changeset
|
142 -a \( -name \*.c -o -name \*.cpp -o -name \*.s \) \ |
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
1972
diff
changeset
|
143 -a \! \( -name ${Src_Files_EXCLUDE// / -o -name } \) \ |
e7ad5f6f4d29
7006659: temporary adlc files are added to the build variables
stefank
parents:
1972
diff
changeset
|
144 | sed 's/.*\/\(.*\)/\1/'; |
1972 | 145 } |
146 | |
147 Src_Files= | |
148 for e in ${Src_Dirs}; do | |
149 Src_Files="${Src_Files}`findsrc ${e}` " | |
150 done | |
151 | |
152 Obj_Files= | |
153 for e in ${Src_Files}; do | |
154 Obj_Files="${Obj_Files}${e%\.[!.]*}.obj " | |
155 done | |
156 | |
157 echo Obj_Files=${Obj_Files} |