Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,14 @@ option(
"During checkout, apply optional downstream patches to
llvm-project to improve performance."
)
option(
ENABLE_QEMU_TESTING
"Enable tests that use QEMU. This option is ON by default."
ON
)
option(
ENABLE_FVP_TESTING
"Tests using FVP need to be explictly enabled."
"Enable tests that use FVPs. This option is OFF by default."
)
set(
FVP_INSTALL_DIR
Expand Down Expand Up @@ -596,6 +601,7 @@ if(NOT PREBUILT_TARGET_LIBRARIES)
-DENABLE_VARIANTS=${ENABLE_VARIANTS_PASSTHROUGH}
-DLIBC_HDRGEN=${LIBC_HDRGEN}
-DFVP_INSTALL_DIR=${FVP_INSTALL_DIR}
-DENABLE_QEMU_TESTING=${ENABLE_QEMU_TESTING}
-DENABLE_FVP_TESTING=${ENABLE_FVP_TESTING}
-DFVP_CONFIG_DIR=${CMAKE_CURRENT_SOURCE_DIR}/fvp/config
-DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT}
Expand Down
13 changes: 9 additions & 4 deletions arm-multilib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.")
set_property(CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib llvmlibc)
set(LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain build or install root.")
set(LIBC_HDRGEN "" CACHE PATH "Path to prebuilt lbc-hdrgen if not included in LLVM binaries set by LLVM_BINARY_DIR")
option(
ENABLE_QEMU_TESTING
"Enable tests that use QEMU. This option is ON by default."
ON
)
option(
ENABLE_FVP_TESTING
"Tests using FVP need to be explictly enabled."
"Enable tests that use FVPs. This option is OFF by default."
)
set(
FVP_INSTALL_DIR
Expand Down Expand Up @@ -162,9 +167,9 @@ foreach(lib_idx RANGE ${lib_count_dec})
file(READ ${variant_json_file} variant_json_str)
string(JSON test_executor GET ${variant_json_str} "args" "common" "TEST_EXECUTOR")

# FVP testing should default to off, so override any
# settings from the JSON.
if(test_executor STREQUAL "fvp" AND NOT ${ENABLE_FVP_TESTING})
# The multilib project can be configured to disable QEMU and/or FVP
# testing, which will need to override the settings from the json.
if((test_executor STREQUAL "qemu" AND NOT ${ENABLE_QEMU_TESTING}) OR (test_executor STREQUAL "fvp" AND NOT ${ENABLE_FVP_TESTING}))
list(APPEND additional_cmake_args "-DENABLE_LIBC_TESTS=OFF" "-DENABLE_COMPILER_RT_TESTS=OFF" "-DENABLE_LIBCXX_TESTS=OFF")
set(read_ENABLE_LIBC_TESTS "OFF")
set(read_ENABLE_COMPILER_RT_TESTS "OFF")
Expand Down
4 changes: 4 additions & 0 deletions docs/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ $ brew install llvm python3 git make ninja qemu cmake
$ pip install meson
```

Testing with QEMU is enabled by default, but can be disabled using the
`-DENABLE_QEMU_TESTING=OFF` CMake option if testing is not required or QEMU is
not installed.

Some recent targets are not supported by QEMU, for these the Arm FVP models are
used instead. These models are available free-of-change but are not
open-source, and come with their own licenses.
Expand Down
Loading