Skip to content

Commit

Permalink
Fix config=aarch64_sysroot build (pixie-io#857)
Browse files Browse the repository at this point in the history
Summary: To get aarch64 images to work I added a select on cpu:x86_64
for the java agent. I put this select in the wrong place, because it
causes test builds to fail.
This PR moves the select to where its only used for the image and not
for the tests.

Type of change: /kind cleanup

Test Plan: Ran `bazel test --config=aarch64_sysroot //...` and saw only
7 failed tests as expected.

Signed-off-by: James Bartlett <jamesbartlett@pixielabs.ai>
  • Loading branch information
JamesMBartlett authored Feb 13, 2023
1 parent 1670180 commit cf9d343
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ cc_binary(
"-msan",
],
linkstatic = True,
target_compatible_with = ["@platforms//cpu:x86_64"],
)
6 changes: 4 additions & 2 deletions src/stirling/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ gen_timeconst(name = "stirling_linux_timeconst_files")
# Used by stirling runtime to provide symbolization for Java application profiling.
stirling_java_profiling_tools = [
"//src/stirling/source_connectors/perf_profiler/java/px_jattach:px_jattach",
"//src/stirling/source_connectors/perf_profiler/java/agent:agent",
]
] + select({
"@platforms//cpu:x86_64": ["//src/stirling/source_connectors/perf_profiler/java/agent:agent"],
"//conditions:default": [],
})

# Use this binary to dynamically turn on/off Stirling runtime's debug logging.
# See src/stirling/e2e_tests/stirling_signal_test.sh for its usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ cc_static_musl_binary(

filegroup(
name = "agent",
srcs = select({
"@platforms//cpu:aarch64": [],
"//conditions:default": ["px-java-agent"],
}),
srcs = ["px-java-agent"],
visibility = [
# Add visibility at top-level so that we can include
# the lib in the pem image.
Expand Down

0 comments on commit cf9d343

Please sign in to comment.