From 3dc2742501b9129ca1f7cf6c6f39c6ca9f3ab84a Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 9 Apr 2026 10:51:07 -0700 Subject: [PATCH] Suppress JDK 24 warnings when running java version of closure compiler --- tools/building.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/building.py b/tools/building.py index 0405a8813dcef..49ee29fb81e32 100644 --- a/tools/building.py +++ b/tools/building.py @@ -523,6 +523,8 @@ def get_closure_compiler_and_env(user_args): # This can happen, for example, on arm64 macOS machines that do not have Rosetta installed. logger.warning('falling back to java version of closure compiler') user_args.append('--platform=java') + if 'JAVA_TOOL_OPTIONS' not in env: + env['JAVA_TOOL_OPTIONS'] = '--sun-misc-unsafe-memory-access=allow' check_closure_compiler(closure_cmd, user_args, env, allowed_to_fail=False) return closure_cmd, env