Skip to content

Commit

Permalink
Quiet more warnings from com.google.protobuf.UnsafeUtil
Browse files Browse the repository at this point in the history
See #6151
See also #5978 (comment).

PiperOrigin-RevId: 213216870
  • Loading branch information
cushon authored and Copybara-Service committed Sep 17, 2018
1 parent 5233993 commit efdb3f6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ java_library(
java_binary(
name = "ImportDepsChecker",
srcs = ["Main.java"],
jvm_flags = [
# quiet warnings from com.google.protobuf.UnsafeUtil,
# see: https://github.com/google/protobuf/issues/3781
"-XX:+IgnoreUnrecognizedVMOptions",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
],
main_class = "com.google.devtools.build.importdeps.Main",
visibility = [
"//src/java_tools/import_deps_checker:__subpackages__",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ java_import(
java_binary(
name = "ImportDepsChecker_embedded",
main_class = "com.google.devtools.build.importdeps.Main",
jvm_flags = [
# quiet warnings from com.google.protobuf.UnsafeUtil,
# see: https://github.com/google/protobuf/issues/3781
"-XX:+IgnoreUnrecognizedVMOptions",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
],
runtime_deps = [
":import_deps_checker_deploy_jar"
],
Expand Down
2 changes: 2 additions & 0 deletions src/main/cpp/blaze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,9 @@ static vector<string> GetArgumentArray(
// see: https://github.com/google/protobuf/issues/3781

// quiet warnings from com.google.protobuf.UnsafeUtil,
// see: https://github.com/google/protobuf/issues/3781
result.push_back("--add-opens=java.base/java.nio=ALL-UNNAMED");
result.push_back("--add-opens=java.base/java.lang=ALL-UNNAMED");
}

result.push_back("-Xverify:none");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ java_import(

java_binary(
name = "ResourceProcessorBusyBox",
jvm_flags = [
# quiet warnings from com.google.protobuf.UnsafeUtil,
# see: https://github.com/google/protobuf/issues/3781
"-XX:+IgnoreUnrecognizedVMOptions",
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
],
data = select({
"//src/conditions:windows": ["//src/main/native/windows:windows_jni.dll"],
"//conditions:default": [],
Expand Down

0 comments on commit efdb3f6

Please sign in to comment.