Skip to content

Commit

Permalink
Always build the benchmark with -c opt
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Apr 17, 2024
1 parent 54d40cb commit c0ead06
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 30 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ bazel_dep(name = "rules_jvm_external", version = "6.0")
bazel_dep(name = "rules_python", version = "0.28.0")
bazel_dep(name = "rules_testing", version = "0.0.4")
bazel_dep(name = "googletest", version = "1.14.0", repo_name = "com_google_googletest")
bazel_dep(name = "with_cfg.bzl", version = "0.2.4")

# TODO(pcloudy): Add remoteapis and googleapis as Bazel modules in the BCR.
bazel_dep(name = "remoteapis", version = "")
Expand Down
88 changes: 59 additions & 29 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/test/java/com/google/devtools/build/lib/vfs/bazel/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@rules_java//java:defs.bzl", "java_library", "java_test")
load(":java_opt_binary.bzl", "java_opt_binary")

package(
default_applicable_licenses = ["//:license"],
Expand Down Expand Up @@ -44,7 +45,7 @@ java_test(
],
)

java_binary(
java_opt_binary(
name = "BazelHashFunctionsBenchmark",
srcs = ["BazelHashFunctionsBenchmark.java"],
main_class = "org.openjdk.jmh.Main",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
load("@with_cfg.bzl", "with_cfg")

java_opt_binary, _java_opt_binary = with_cfg(native.java_binary).set("compilation_mode", "opt").build()
Loading

0 comments on commit c0ead06

Please sign in to comment.