Skip to content

Commit

Permalink
Add support for running aarch64 tests natively on aarch64 hardware (#278
Browse files Browse the repository at this point in the history
)

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
  • Loading branch information
hawkinsw committed Jun 7, 2023
1 parent 96569a0 commit 05aba0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ execute_process(
RESULT_VARIABLE CLANG_RETURN_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL aarch64))
set(PREFIX qemu-aarch64 -L /usr/aarch64-linux-gnu)
else()
set(PREFIX)
Expand Down
2 changes: 1 addition & 1 deletion ubpf_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ else()
message(STATUS "Using custom bpf_conformance_runner: ${BPF_CONFORMANCE_RUNNER}")
endif()

if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL aarch64))
set(PLUGIN_JIT --plugin_path ${CMAKE_BINARY_DIR}/bin/run-jit.sh)
set(PLUGIN_INTERPRET --plugin_path ${CMAKE_BINARY_DIR}/bin/run-interpret.sh)
else()
Expand Down

0 comments on commit 05aba0e

Please sign in to comment.