JEP 541: 弃用 macOS/x64 移植以供移除
总结
弃用 macOS/x64 移植版,计划在未来版本中将其移除,以降低维护成本。
动机
Apple 已将其硬件产品过渡到 AArch64 处理器架构,并正在逐步停止对 x64 的支持。因此,Oracle 工程师将自 JDK 27 起停止维护 macOS/x64 移植版。维护该移植版是一项重大负担。
描述
尝试配置 macOS/x64 构建将产生:
$ bash ./configure
...
checking compilation type... native
configure: error: The macOS/x64 port is deprecated and may be removed in a future release. Use --enable-deprecated-ports to suppress this error.
configure exiting with result code 1
$
新的构建配置选项 --enable-deprecated-ports 将抑制该错误并继续:
$ bash ./configure --enable-deprecated-ports
...
checking compilation type... native
configure: WARNING: The macOS/x64 port is deprecated and may be removed in a future release.
...
Build performance summary:
* Cores to use: 32
* Memory limit: 96601 MB
The following warnings were produced. Repeated here for convenience:
WARNING: The macOS/x64 port is deprecated and may be removed in a future release.
$
无法保证该移植版本能够构建,更不用说运行了。
为了不阻塞主线开发,macOS/x64 将在 JDK 仓库的 GitHub actions 中默认禁用。
此外,macOS/x64 移植版以及相关移植版特有的功能,将在相关 JDK 文档中注明为已弃用并将移除。
替代方案
与之前的移植版本弃用情况一样,一个替代方案是让一组可信赖的开发者明确表达出未来继续维护该移植版本的意愿。如果这在本 JEP 集成之前发生,那么本 JEP 可以撤回。如果这在本 JEP 集成之后、但在移植版本移除之前发生,那么可以通过后续的 JEP 撤销弃用。