Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Add --disable-warnings-as-errors option to build_labsjdk.py #7

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ python build_labsjdk.py
This will produce a labsjdk installation under `build/labsjdks/release` along with 2 archives in the same
directory; one for the JDK itself and a separate one for the debug symbols.

NOTE: if you want to pass options for `configure` in OpenJDK, you can pass the file location which lists them in each line to `--configure-options` on `build_labsjdk.py`.

You can verify the labsjdk build with:
```
./build/labsjdks/release/java_home/bin/java -version
Expand Down
6 changes: 6 additions & 0 deletions build_labsjdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ def main():
parser.add_argument('--jdk-debug-level', action='store', help='value for --with-debug-level JDK config option', default='release', choices=['release', 'fastdebug','slowdebug'])
parser.add_argument('--devkit', action='store', help='value for --with-devkit configure option', default=env.get('DEVKIT', ''), metavar='<path>')
parser.add_argument('--jvmci-version', action='store', help='JVMCI version (e.g., 19.3-b03)', metavar='<version>')
parser.add_argument('--configure-options', action='store', help='Reads and passes options to configure script from a specified file.', metavar='<path>')

opts = parser.parse_args()
build_os = get_os()
Expand Down Expand Up @@ -317,6 +318,11 @@ def main():
# If we are building on musl, some warnings are produced which would abort the compilation
configure_options.append("--disable-warnings-as-errors")

if opts.configure_options:
with open(opts.configure_options, 'r') as conf:
for line in conf:
configure_options.append(line)

check_call(["sh", "configure"] + configure_options, cwd=jdk_src_dir)
check_call([opts.make, "LOG=info", "CONF=" + conf_name, "product-bundles", "static-libs-bundles"], cwd=jdk_src_dir)

Expand Down