-
Notifications
You must be signed in to change notification settings - Fork 0
/
intellij-riscv64.patch
423 lines (394 loc) · 19.4 KB
/
intellij-riscv64.patch
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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
From 629f526535825e7f133e9a9e6f89bdb4302efb46 Mon Sep 17 00:00:00 2001
From: Cryolitia PukNgae <[email protected]>
Date: Tue, 15 Oct 2024 03:37:16 +0800
Subject: [PATCH 1/2] port to riscv64
---
native/LinuxGlobalMenu/CMakeLists.txt | 6 ++--
.../build/dependencies/JdkDownloader.kt | 13 ++++----
.../intellij/build/JvmArchitecture.kt | 4 ++-
.../intellij/build/impl/BuildTasksImpl.kt | 1 +
.../intellij/build/impl/BundledRuntimeImpl.kt | 3 +-
.../build/impl/LinuxDistributionBuilder.kt | 33 +------------------
.../build/impl/MacDistributionBuilder.kt | 1 +
.../intellij/build/impl/nativeLib.kt | 2 ++
.../impl/sbom/SoftwareBillOfMaterialsImpl.kt | 7 ++--
.../intellij/build/product-info.schema.json | 2 +-
platform/jps-bootstrap/jps-bootstrap.sh | 29 ++++------------
platform/sqlite/make.sh | 2 +-
.../src/com/intellij/util/system/CpuArch.java | 4 ++-
13 files changed, 37 insertions(+), 70 deletions(-)
diff --git a/native/LinuxGlobalMenu/CMakeLists.txt b/native/LinuxGlobalMenu/CMakeLists.txt
index b0890cb6a892f..391c2d23f16f2 100644
--- a/native/LinuxGlobalMenu/CMakeLists.txt
+++ b/native/LinuxGlobalMenu/CMakeLists.txt
@@ -29,10 +29,10 @@ MESSAGE("LIB_GIO: " ${LIB_GIO})
find_library(LIB_GOBJ NAMES libgobject-2.0.so.0)
MESSAGE("LIB_GOBJ: " ${LIB_GOBJ})
-# use patched library, you may build it from https://github.com/JetBrains/libdbusmenu
-set(LIB_DBUSMENU "${PROJECT_SOURCE_DIR}/libdbusmenu-glib.a")
+find_library(LIB_DBUSMENU NAMES libdbusmenu-glib.so.4)
+MESSAGE("LIB_DBUSMENU: " ${LIB_DBUSMENU})
-set(GLIB_INCLUDE_DIRS /usr/include/glib-2.0 /usr/lib64/glib-2.0/include)
+set(GLIB_INCLUDE_DIRS /usr/include/glib-2.0 /usr/lib64/glib-2.0/include /usr/lib/glib-2.0/include)
set(DBUSMENU_GLIB_INCLUDE_DIRS /usr/include/libdbusmenu-glib-0.4)
include_directories(
diff --git a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
index ba2eade41bc2b..69bf0d93d7834 100644
--- a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
+++ b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
@@ -4,9 +4,11 @@ package org.jetbrains.intellij.build.dependencies
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import org.jetbrains.intellij.build.downloadFileToCacheLocation
+import java.lang.System;
import java.net.URI
import java.nio.file.Files
import java.nio.file.Path
+import java.nio.file.Paths
import java.util.logging.Logger
/**
@@ -41,11 +43,7 @@ object JdkDownloader {
infoLog: (String) -> Unit,
): Path {
val jdkUrl = getUrl(communityRoot = communityRoot, os = os, arch = arch, jdkBuildNumber = jdkBuildNumber, variation = variation)
- val jdkArchive = downloadFileToCacheLocation(url = jdkUrl.toString(), communityRoot = communityRoot)
- val jdkExtracted = BuildDependenciesDownloader.extractFileToCacheLocation(communityRoot = communityRoot,
- archiveFile = jdkArchive,
- BuildDependenciesExtractOptions.STRIP_ROOT)
- val jdkHome = if (os == OS.MACOSX) jdkExtracted.resolve("Contents").resolve("Home") else jdkExtracted
+ val jdkHome: Path = Paths.get(System.getenv("JAVA_HOME"))
infoLog("JPS-bootstrap JDK (jdkHome=$jdkHome, executable=${getJavaExecutable(jdkHome)})")
return jdkHome
}
@@ -71,6 +69,7 @@ object JdkDownloader {
val archString: String = when (arch) {
Arch.X86_64 -> "x64"
Arch.ARM64 -> "aarch64"
+ Arch.RISCV64 -> "riscv64"
}
val variationSuffix = if (variation == null) "" else "_$variation"
@@ -112,7 +111,8 @@ object JdkDownloader {
enum class Arch {
X86_64,
- ARM64;
+ ARM64,
+ RISCV64;
companion object {
val current: Arch
@@ -120,6 +120,7 @@ object JdkDownloader {
val arch = System.getProperty("os.arch").lowercase()
if ("x86_64" == arch || "amd64" == arch) return X86_64
if ("aarch64" == arch || "arm64" == arch) return ARM64
+ if ("riscv64" == arch) return RISCV64
throw IllegalStateException("Only X86_64 and ARM64 are supported, current arch: $arch")
}
}
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/JvmArchitecture.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/JvmArchitecture.kt
index 455345f27a4e6..1923d5d63fe46 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/JvmArchitecture.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/JvmArchitecture.kt
@@ -6,7 +6,8 @@ import com.intellij.util.system.CpuArch
@Suppress("EnumEntryName")
enum class JvmArchitecture(@JvmField val archName: String, @JvmField val fileSuffix: String, @JvmField val dirName: String) {
x64("X86_64", "64", "amd64"),
- aarch64("AArch64", "aarch64", "aarch64");
+ aarch64("AArch64", "aarch64", "aarch64"),
+ riscv64("RISC-V64", "riscv64", "riscv64");
companion object {
@JvmField
@@ -16,6 +17,7 @@ enum class JvmArchitecture(@JvmField val archName: String, @JvmField val fileSuf
val currentJvmArch: JvmArchitecture = when {
CpuArch.isArm64() -> aarch64
CpuArch.isIntel64() -> x64
+ CpuArch.isRiscv64() -> riscv64
else -> throw IllegalStateException("Unsupported arch: " + CpuArch.CURRENT)
}
}
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildTasksImpl.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildTasksImpl.kt
index c46cba367e49e..b4fa094251bbe 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildTasksImpl.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BuildTasksImpl.kt
@@ -132,6 +132,7 @@ val SUPPORTED_DISTRIBUTIONS: List<SupportedDistribution> = listOf(
SupportedDistribution(os = OsFamily.WINDOWS, arch = JvmArchitecture.aarch64),
SupportedDistribution(os = OsFamily.LINUX, arch = JvmArchitecture.x64),
SupportedDistribution(os = OsFamily.LINUX, arch = JvmArchitecture.aarch64),
+ SupportedDistribution(os = OsFamily.LINUX, arch = JvmArchitecture.riscv64),
)
fun createIdeaPropertyFile(context: BuildContext): CharSequence {
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BundledRuntimeImpl.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BundledRuntimeImpl.kt
index b25db89cbec85..807c6001d81fb 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BundledRuntimeImpl.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/BundledRuntimeImpl.kt
@@ -166,6 +166,7 @@ private fun getArchSuffix(arch: JvmArchitecture): String {
return when (arch) {
JvmArchitecture.x64 -> "x64"
JvmArchitecture.aarch64 -> "aarch64"
+ JvmArchitecture.riscv64 -> "riscv64"
}
}
@@ -221,4 +222,4 @@ private fun fixPermissions(destinationDir: Path, forWin: Boolean) {
return FileVisitResult.CONTINUE
}
})
-}
\ No newline at end of file
+}
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
index bda39cdcacdc0..5aad50656e3b2 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
@@ -52,7 +52,7 @@ class LinuxDistributionBuilder(
val distBinDir = targetPath.resolve("bin")
val sourceBinDir = context.paths.communityHomeDir.resolve("bin/linux")
addNativeLauncher(distBinDir, targetPath, arch)
- copyFileToDir(NativeBinaryDownloader.getRestarter(context, OsFamily.LINUX, arch), distBinDir)
+ copyFileToDir(sourceBinDir.resolve("../../native/restarter/target/release/restarter"), distBinDir)
copyFileToDir(sourceBinDir.resolve("${arch.dirName}/fsnotifier"), distBinDir)
copyFileToDir(sourceBinDir.resolve("${arch.dirName}/libdbm.so"), distBinDir)
generateBuildTxt(context, targetPath)
@@ -101,37 +101,6 @@ class LinuxDistributionBuilder(
}
}
}
-
- val runtimeDir = context.bundledRuntime.extract(os = OsFamily.LINUX, arch = arch)
- updateExecutablePermissions(runtimeDir, executableFileMatchers)
- val tarGzPath: Path? = context.executeStep(
- spanBuilder("Build Linux .tar.gz with bundled Runtime")
- .setAttribute("arch", arch.name)
- .setAttribute("runtimeDir", runtimeDir.toString()),
- "linux_tar_gz_${arch.name}"
- ) { _ ->
- buildTarGz(arch, runtimeDir, osAndArchSpecificDistPath, suffix(arch))
- }
- launch {
- if (arch == JvmArchitecture.x64) {
- buildSnapPackage(runtimeDir, osAndArchSpecificDistPath, arch)
- }
- else {
- // TODO: Add snap for aarch64
- Span.current().addEvent("skip building Snap packages for non-x64 arch")
- }
- }
-
- if (tarGzPath != null && !context.isStepSkipped(BuildOptions.REPAIR_UTILITY_BUNDLE_STEP)) {
- val tempTar = Files.createTempDirectory(context.paths.tempDir, "tar-")
- try {
- unTar(tarGzPath, tempTar)
- RepairUtilityBuilder.generateManifest(context, unpackedDistribution = tempTar.resolve(rootDirectoryName), OsFamily.LINUX, arch)
- }
- finally {
- NioFiles.deleteRecursively(tempTar)
- }
- }
}
}
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/MacDistributionBuilder.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/MacDistributionBuilder.kt
index 47b7d84e908ea..45d358ab11fe3 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/MacDistributionBuilder.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/MacDistributionBuilder.kt
@@ -460,6 +460,7 @@ class MacDistributionBuilder(
val architecture = when (arch) {
JvmArchitecture.x64 -> "x86_64"
JvmArchitecture.aarch64 -> "arm64"
+ JvmArchitecture.riscv64 -> "riscv64"
}
val todayYear = LocalDate.now().year.toString()
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/nativeLib.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/nativeLib.kt
index aa2621e35bdae..ac444999a9432 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/nativeLib.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/nativeLib.kt
@@ -215,6 +215,7 @@ private fun extractFileToDisk(file: Path, zipFile: ZipFile, pathWithPackage: Str
private enum class NativeFileArchitecture(@JvmField val jvmArch: JvmArchitecture?) {
X_64(JvmArchitecture.x64),
AARCH_64(JvmArchitecture.aarch64),
+ RISCV_64(JvmArchitecture.riscv64),
// universal native file can be used by any platform
UNIVERSAL(null);
@@ -230,6 +231,7 @@ private fun determineArch(os: OsFamily, path: CharSequence): NativeFileArchitect
return when {
osAndArch.endsWith("-aarch64") || path.contains("/aarch64/") -> AARCH_64
path.contains("x86-64") || path.contains("x86_64") -> X_64
+ osAndArch.endsWith("-riscv64") || path.contains("/riscv64/") -> RISCV_64
os == OsFamily.MACOS && path.count { it == '/' } == 1 -> UNIVERSAL
!osAndArch.contains('-') && path.count { it == '/' } == 1 -> X_64
else -> null
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
index 0dfa6b2cf15c5..cc78807a8386f 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
@@ -267,14 +267,17 @@ internal class SoftwareBillOfMaterialsImpl(
OsFamily.LINUX -> when (arch) {
JvmArchitecture.aarch64 -> "linuxarm64"
JvmArchitecture.x64 -> "linux64"
+ JvmArchitecture.riscv64 -> "linuxriscv64"
}
OsFamily.MACOS -> when (arch) {
JvmArchitecture.aarch64 -> "macosarm64"
JvmArchitecture.x64 -> "macosx64"
+ JvmArchitecture.riscv64 -> "macosriscv64"
}
OsFamily.WINDOWS -> when (arch) {
JvmArchitecture.aarch64 -> "windowsarm64"
JvmArchitecture.x64 -> "windows64"
+ JvmArchitecture.riscv64 -> "windowsriscv64"
}
}
val cefArchive = "cef_binary_${cefVersion}_$cefSuffix.tar.bz2"
@@ -342,7 +345,7 @@ internal class SoftwareBillOfMaterialsImpl(
document.documentDescribes.add(rootPackage)
generate(
document, rootPackage,
- runtimePackage = document.runtimePackage(os, arch),
+ runtimePackage = null,
distributionDir = distributionDir,
// distributions weren't built
claimContainedFiles = false
@@ -1006,4 +1009,4 @@ internal class SoftwareBillOfMaterialsImpl(
)
}
}
-}
\ No newline at end of file
+}
diff --git a/platform/build-scripts/src/org/jetbrains/intellij/build/product-info.schema.json b/platform/build-scripts/src/org/jetbrains/intellij/build/product-info.schema.json
index 162ae046c1906..097f393403037 100644
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/product-info.schema.json
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/product-info.schema.json
@@ -59,7 +59,7 @@
"arch": {
"description": "CPU Architecture this launch method is supposed to be used for",
"type": "string",
- "enum": ["amd64", "aarch64"]
+ "enum": ["amd64", "aarch64", "riscv64"]
},
"launcherPath": {
"description": "Path to an executable file which starts the IDE (relative to the parent directory of this file, '/' as a separator, may start with '../'), e.g. 'bin/idea.sh'",
diff --git a/platform/jps-bootstrap/jps-bootstrap.sh b/platform/jps-bootstrap/jps-bootstrap.sh
index 12d610dfe8f4a..ebe181bf6c532 100755
--- a/platform/jps-bootstrap/jps-bootstrap.sh
+++ b/platform/jps-bootstrap/jps-bootstrap.sh
@@ -84,6 +84,9 @@ if [ "$darwin" = "true" ]; then
arm64)
JBR_ARCH=osx-aarch64
;;
+ riscv64)
+ JBR_ARCH=osx-riscv64
+ ;;
*)
die "Unknown architecture $(uname -m)"
;;
@@ -96,6 +99,9 @@ else
aarch64)
JBR_ARCH=linux-aarch64
;;
+ riscv64)
+ JBR_ARCH=linux-riscv64
+ ;;
*)
die "Unknown architecture $(uname -m)"
;;
@@ -111,31 +117,10 @@ if [ -e "$JVM_TARGET_DIR/.flag" ] && [ -n "$(ls "$JVM_TARGET_DIR")" ] && [ "x$(c
# Everything is up-to-date in $JVM_TARGET_DIR, do nothing
true
else
- JVM_TEMP_FILE=$(mktemp "$JPS_BOOTSTRAP_PREPARE_DIR/jvm.tar.gz.XXXXXXXXX")
- trap 'echo "Removing $JVM_TEMP_FILE"; rm -f "$JVM_TEMP_FILE"; trap - EXIT' EXIT INT HUP
-
- warn "Downloading $JVM_URL to $JVM_TEMP_FILE"
-
- if command -v curl >/dev/null 2>&1; then
- if [ -t 1 ]; then CURL_PROGRESS="--progress-bar"; else CURL_PROGRESS=""; fi
- CURL_OPTIONS="-fsSL"
- if [ "${JBR_DOWNLOAD_CURL_VERBOSE:-false}" = "true" ]; then CURL_OPTIONS="-fvL"; fi
- # CURL_PROGRESS may be empty, with quotes this interpreted by curl as malformed URL
- # shellcheck disable=SC2086
- expBackOffRetry curl "$CURL_OPTIONS" $CURL_PROGRESS --output "${JVM_TEMP_FILE}" "$JVM_URL"
- elif command -v wget >/dev/null 2>&1; then
- if [ -t 1 ]; then WGET_PROGRESS=""; else WGET_PROGRESS="-nv"; fi
- expBackOffRetry wget $WGET_PROGRESS -O "${JVM_TEMP_FILE}" "$JVM_URL"
- else
- die "ERROR: Please install wget or curl"
- fi
-
- warn "Extracting $JVM_TEMP_FILE to $JVM_TARGET_DIR"
rm -rf "$JVM_TARGET_DIR"
mkdir -p "$JVM_TARGET_DIR"
- tar -x -f "$JVM_TEMP_FILE" -C "$JVM_TARGET_DIR"
- rm -f "$JVM_TEMP_FILE"
+ ln -sf /usr/lib/jvm/java-17-openjdk "$JVM_TARGET_DIR"
echo "$JVM_URL" >"$JVM_TARGET_DIR/.flag"
fi
diff --git a/platform/sqlite/make.sh b/platform/sqlite/make.sh
index 8f6c48291ca11..bb498539f8548 100755
--- a/platform/sqlite/make.sh
+++ b/platform/sqlite/make.sh
@@ -27,7 +27,7 @@ elif [ "$OS" == "linux" ]; then
libFilename="libsqliteij.so"
# cannot compile arm - unable to find library -lgcc, so, use dock cross
- if [ "$ARCH" == "aarch64" ]; then
+ if [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "riscv64" ]; then
linkFlags+=" -shared"
else
cFlags+=" --target=$ARCH-unknown-linux-gnu --sysroot=target/linux-$ARCH"
diff --git a/platform/util/src/com/intellij/util/system/CpuArch.java b/platform/util/src/com/intellij/util/system/CpuArch.java
index 6c1ddfff40929..263e9573c3140 100644
--- a/platform/util/src/com/intellij/util/system/CpuArch.java
+++ b/platform/util/src/com/intellij/util/system/CpuArch.java
@@ -12,7 +12,7 @@
import org.jetbrains.annotations.Nullable;
public enum CpuArch {
- X86(32), X86_64(64), ARM32(32), ARM64(64), OTHER(0), UNKNOWN(0);
+ X86(32), X86_64(64), ARM32(32), ARM64(64), RISCV64(64), OTHER(0), UNKNOWN(0);
/**
* Machine word size, in bits.
@@ -40,6 +40,7 @@ public enum CpuArch {
if ("x86_64".equals(arch) || "amd64".equals(arch)) return X86_64;
if ("i386".equals(arch) || "x86".equals(arch)) return X86;
if ("aarch64".equals(arch) || "arm64".equals(arch)) return ARM64;
+ if ("riscv64".equals(arch)) return RISCV64;
return arch == null || arch.trim().isEmpty() ? UNKNOWN : OTHER;
}
@@ -47,6 +48,7 @@ public enum CpuArch {
public static boolean isIntel64() { return CURRENT == X86_64; }
public static boolean isArm32() { return CURRENT == ARM32; }
public static boolean isArm64() { return CURRENT == ARM64; }
+ public static boolean isRiscv64() { return CURRENT == RISCV64; }
public static boolean is32Bit() { return CURRENT.width == 32; }
From 8257068541305939eec22f55a2a70fabbb823a24 Mon Sep 17 00:00:00 2001
From: "Dmitriy.Panov" <[email protected]>
Date: Mon, 29 Jul 2024 14:26:53 +0200
Subject: [PATCH 2/2] IJI-2074 release version 7 is not supported starting with
javac 20
```
javac 19.0.2
...
--release <release>
Compile for the specified Java SE release. Supported releases: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
```
```
javac 20.0.2.1
...
--release <release>
Compile for the specified Java SE release. Supported releases: 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
```
GitOrigin-RevId: a274c375c843563eb5194b8dccaabc312a7c4ecb
(cherry picked from commit 3263d797c3db720124875c998a647f2b3350c777)
---
.../src/org/jetbrains/jps/incremental/java/JavaBuilder.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java b/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java
index d5451a4ef6a7b..e124fc45d0a9f 100644
--- a/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java
+++ b/jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java
@@ -707,7 +707,10 @@ private static boolean isTargetReleaseSupported(int compilerVersion, int targetP
if (compilerVersion <= 11) {
return targetPlatformVersion >= 6;
}
- return targetPlatformVersion >= 7;
+ if (compilerVersion <= 19) {
+ return targetPlatformVersion >= 7;
+ }
+ return targetPlatformVersion >= 8;
}
private static boolean isJavac(final JavaCompilingTool compilingTool) {