aboutsummaryrefslogtreecommitdiffstats
path: root/build/platform/java/jdk/ya.make
blob: 909ae36e18a2a6f9853de119290cf935f8a6f9d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
RESOURCES_LIBRARY()
OWNER(heretic)

INCLUDE(resources.inc)

IF(JDK_VERSION == "17")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK17_DARWIN} FOR DARWIN
        ${JDK17_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK17_LINUX} FOR LINUX
        ${JDK17_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK17)
    ENDIF()
ELSEIF(JDK_VERSION == "16")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK16_DARWIN} FOR DARWIN
        ${JDK16_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK16_LINUX} FOR LINUX
        ${JDK16_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK16)
    ENDIF()
ELSEIF(JDK_VERSION == "15")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK15_DARWIN} FOR DARWIN
        ${JDK15_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK15_LINUX} FOR LINUX
        ${JDK15_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK15)
    ENDIF()
ELSEIF(JDK_VERSION == "14")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK14_DARWIN} FOR DARWIN
        ${JDK14_LINUX} FOR LINUX
        ${JDK14_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK14)
    ENDIF()
ELSEIF(JDK_VERSION == "13")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK13_DARWIN} FOR DARWIN
        ${JDK13_LINUX} FOR LINUX
        ${JDK13_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK13)
    ENDIF()
ELSEIF(JDK_VERSION == "12")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK12_DARWIN} FOR DARWIN
        ${JDK12_LINUX} FOR LINUX
        ${JDK12_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK12)
    ENDIF()
ELSEIF(JDK_VERSION == "11")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK11_DARWIN} FOR DARWIN
        ${JDK11_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK11_LINUX} FOR LINUX
        ${JDK11_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK11)
    ENDIF()
ELSEIF(JDK_VERSION == "10")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK10_DARWIN} FOR DARWIN
        ${JDK10_LINUX} FOR LINUX
        ${JDK10_WINDOWS} FOR WIN32
    )
ELSEIF(JDK_VERSION == "8")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK_DEFAULT
        ${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK8_DARWIN} FOR DARWIN
        ${JDK8_LINUX} FOR LINUX
        ${JDK8_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK8)
    ENDIF()
ELSE()
    MESSAGE(FATAL_ERROR Unsupported JDK version)
ENDIF()

IF(USE_SYSTEM_JDK)
    MESSAGE(WARNING System JDK $USE_SYSTEM_JDK will be used)
ELSEIF(JDK_VERSION == "17")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK17_DARWIN} FOR DARWIN
        ${JDK17_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK17_LINUX} FOR LINUX
        ${JDK17_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK17)
    ENDIF()

    IF(OS_DARWIN AND ARCH_ARM64)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_DARWIN_ARM64})
    ELSEIF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK17_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "16")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK16_DARWIN} FOR DARWIN
        ${JDK16_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK16_LINUX} FOR LINUX
        ${JDK16_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK16)
    ENDIF()

    IF(OS_DARWIN AND ARCH_ARM64)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_DARWIN_ARM64})
    ELSEIF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK16_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "15")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK15_DARWIN} FOR DARWIN
        ${JDK15_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK15_LINUX} FOR LINUX
        ${JDK15_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK15)
    ENDIF()

    IF(OS_DARWIN AND ARCH_ARM64)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_DARWIN_ARM64})
    ELSEIF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK15_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "14")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK14_DARWIN} FOR DARWIN
        ${JDK14_LINUX} FOR LINUX
        ${JDK14_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK14)
    ENDIF()

    IF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK14_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "13")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK13_DARWIN} FOR DARWIN
        ${JDK13_LINUX} FOR LINUX
        ${JDK13_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK13)
    ENDIF()
    IF(SANITIZER_TYPE == "address")
        IF(HOST_OS_LINUX)
            DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS ${JDK13_LINUX_ASAN})
        ELSE()
            MESSAGE(FATAL_ERROR Unsupported platform for JDK13 with asan)
        ENDIF()
    ENDIF()

    IF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK13_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "12")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK12_DARWIN} FOR DARWIN
        ${JDK12_LINUX} FOR LINUX
        ${JDK12_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK12)
    ENDIF()

    IF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK12_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "11")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK11_DARWIN} FOR DARWIN
        ${JDK11_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK11_LINUX} FOR LINUX
        ${JDK11_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK11)
    ENDIF()
    IF(SANITIZER_TYPE == "address")
        IF(HOST_OS_LINUX)
            DECLARE_EXTERNAL_RESOURCE(JDK_FOR_TESTS ${JDK11_LINUX_ASAN})
        ELSE()
            MESSAGE(FATAL_ERROR Unsupported platform for JDK11 with asan)
        ENDIF()
    ENDIF()

    IF(OS_DARWIN AND ARCH_ARM64)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_DARWIN_ARM64})
    ELSEIF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK11_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "10")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK10_DARWIN} FOR DARWIN
        ${JDK10_LINUX} FOR LINUX
        ${JDK10_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK10)
    ENDIF()

    IF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK10_WINDOWS})
    ENDIF()
ELSEIF(JDK_VERSION == "8")
    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
        JDK
        ${JDK8_DARWIN_ARM64} FOR DARWIN-ARM64
        ${JDK8_DARWIN} FOR DARWIN
        ${JDK8_LINUX} FOR LINUX
        ${JDK8_WINDOWS} FOR WIN32
    )
    IF(NOT HOST_OS_LINUX AND NOT HOST_OS_WINDOWS AND NOT HOST_OS_DARWIN)
        MESSAGE(FATAL_ERROR Unsupported platform for JDK8)
    ENDIF()

    IF(OS_DARWIN AND ARCH_ARM64)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_DARWIN_ARM64})
    ELSEIF(OS_DARWIN)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_DARWIN})
    ELSEIF(OS_LINUX)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_LINUX})
    ELSEIF(OS_WINDOWS)
        DECLARE_EXTERNAL_RESOURCE(WITH_JDK ${JDK8_WINDOWS})
    ENDIF()
ELSE()
    MESSAGE(FATAL_ERROR Unsupported JDK version)
ENDIF()

END()

RECURSE(
    jdk8
    jdk10
    jdk11
    jdk12
    jdk13
    jdk14
    jdk15
    jdk16
    jdk17
)