Mac下OpenJdk源码环境搭建

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hjtlovelife/article/details/91456761

1、Mac安装Mercurial

brew install mercurial 

2、下载openjdk

(1) ideal

(2) hg clone

hg clone http://hg.openjdk.java.net/jdk10/master

3、安装freetype ccache编译时使用

brew install freetype ccache

4、、配置编译参数

扫描二维码关注公众号,回复: 6426167 查看本文章

参考:在Mac上编译OpenJDK10源码

--with-debug-level=slowdebug 启用slowdebug级别调试
--enable-dtrace 启用dtrace
--with-jvm-variants=server 编译server类型JVM
--with-target-bits=64 指定JVM为64位
--enable-ccache 启用ccache,加快编译
--with-num-cores=8 编译使用CPU核心数
--with-memory-size=8000 编译使用内存
--disable-warnings-as-errors 忽略警告  , mac 使用 xcode 编译, 官方要求加上这个参数.
--with-freetype  设置freetype的路径

$ bash configure --with-debug-level=slowdebug --enable-dtrace --with-jvm-variants=server --with-target-bits=64 --enable-ccache --with-num-cores=8 --with-memory-size=8000 --disable-warnings-as-errors --with-freetype=/usr/local/Cellar/freetype/2.10.0

猜你喜欢

转载自blog.csdn.net/hjtlovelife/article/details/91456761