Skip to content

Commit

Permalink
WIP use stock qemu
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrtonm committed Nov 12, 2024
1 parent f63ca17 commit 9e022fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
libclang-15-dev
zlib1g-dev
libcapstone-dev
qemu-user-static
version: 1.0 # version of cache to load
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -181,7 +182,7 @@ jobs:
-I${rtlibs_dir}/include/c++/v1"
export LDFLAGS="-L/usr/aarch64-linux-gnu/lib"
cmake .. \
-DCMAKE_CROSSCOMPILING_EMULATOR=${{ github.workspace }}/qemu/build/qemu-aarch64 \
-DCMAKE_CROSSCOMPILING_EMULATOR=qemu-aarch64-static \
-DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64-toolchain.cmake \
-DCMAKE_C_COMPILER=`pwd`/../llvm-project/build/bin/clang-19 \
-DCMAKE_CXX_COMPILER=`pwd`/../llvm-project/build/bin/clang-19 \
Expand Down
3 changes: 1 addition & 2 deletions cmake/define-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,11 @@ function(define_test)
# unless natively AArch64, default to running tests with qemu-aarch64 and a custom LD_LIBRARY_PATH
if (NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL aarch64)
if (NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64 -E LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib:/usr/aarch64-linux-gnu/lib64)
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64-static -E LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib:/usr/aarch64-linux-gnu/lib64)
endif()
endif()
add_test(NAME ${TEST_NAME}
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR}
"-one-insn-per-tb"
"-L" "${CMAKE_BINARY_DIR}/external/glibc/sysroot/usr/"
"-E" "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/external/glibc/sysroot/usr/lib:/usr/aarch64-linux-gnu/lib:/usr/aarch64-linux-gnu/lib64"
${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}
Expand Down

0 comments on commit 9e022fb

Please sign in to comment.