Skip to content

Commit

Permalink
[GR-29664] Fix updategraalinopenjdk for JDK17.
Browse files Browse the repository at this point in the history
PullRequest: graal/8687
  • Loading branch information
teshull committed Apr 7, 2021
2 parents 3757b7a + 49709a5 commit 8926902
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions compiler/mx.compiler/mx_updategraalinopenjdk.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -374,13 +374,18 @@ def single_column_with_continuation(line):
def do_nothing(line):
pass

# Update jdk.internal.vm.compiler.EXCLUDES in make/CompileJavaModules.gmk
# to exclude all test, benchmark and annotation processor packages.
CompileJavaModules_gmk = join(jdkrepo, 'make', 'CompileJavaModules.gmk') # pylint: disable=invalid-name
# Exclude all test, benchmark and annotation processor packages.
if args.version >= 17:
# See JDK-8258407
CompileJavaModules_gmk = join(jdkrepo, 'make', 'modules', 'jdk.internal.vm.compiler', 'Java.gmk') # pylint: disable=invalid-name
begin_lines = ['EXCLUDES += \\']
else:
CompileJavaModules_gmk = join(jdkrepo, 'make', 'CompileJavaModules.gmk') # pylint: disable=invalid-name
begin_lines = ['jdk.internal.vm.compiler_EXCLUDES += \\']

new_lines = []
for pkg in sorted(jdk_internal_vm_compiler_EXCLUDES):
new_lines.append(pkg + ' \\\n')
begin_lines = ['jdk.internal.vm.compiler_EXCLUDES += \\']
end_line = '#'
old_line_check = single_column_with_continuation
replace_lines(CompileJavaModules_gmk, begin_lines, end_line, new_lines, old_line_check, preserve_indent=True)
Expand Down

0 comments on commit 8926902

Please sign in to comment.