diff --git a/.gitignore b/.gitignore index 3f86a8e9..ffa3e9a3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ __pycache__ # IDEs .vscode compile_commands.json + +# Downloaded FVPs +/fvp/download/ +/fvp/install/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 277507cc..0befa72b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- Armv8.1-M PACBTI library variants (#489). + +### Changed +- -nostartfiles required when using crt0-semihosting (#460). + +## [19.0.0] + +### Added +- AArch32 v8-A and v8-R can now be targeted (#484) (#486). +- Experimental support for building llvm-libc overlay package (#452). +- Additional library variants for Armv7 (#464) (#491) (#494). +- Additional multilib mappings for v7ve and Thumb target triples (#479) (#481). +- Omax and OmaxLTO config files (#454). + ### Changed - Use unstable libc++ ABI (#294). +- Merge v7-M and v7E-M library variants (#482). +- AArch64 A-profile library made distinct (#468). + +## [18.0.0] + +### Added + +- Documentation for the newlib overlay package (#399). +- Support for C++ exceptions and RTTI added in the standard libraries (#339). ## [17.0.0] diff --git a/CMakeLists.txt b/CMakeLists.txt index 83047a53..ba926a70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,9 @@ # If you prefer you can check out and patch the repos manually and use those: # mkdir repos # git -C repos clone https://github.com/llvm/llvm-project.git -# git -C repos/llvm-project am -k ../../patches/llvm-project/*.patch +# git -C repos/llvm-project am -k $PWD/patches/llvm-project/*.patch # git -C repos clone https://github.com/picolibc/picolibc.git -# git -C repos/picolibc apply ../../patches/picolibc.patch +# git -C repos/picolibc am -k $PWD/patches/picolibc/*.patch # mkdir build # cd build # cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc @@ -123,9 +123,13 @@ set(TARGET_LIBRARIES_DIR "lib/clang-runtimes" CACHE STRING "Directory containing the target libraries." ) +set(LLVM_TOOLCHAIN_MULTILIB_JSON + "${CMAKE_CURRENT_SOURCE_DIR}/arm-multilib/json/multilib.json" CACHE STRING + "JSON file defining the multilib." +) set(LLVM_TOOLCHAIN_LIBRARY_VARIANTS - "" CACHE STRING - "Build only the specified library variants. If not specified then build all variants." + "all" CACHE STRING + "Build only the specified library variants, or \"all\"." ) option( LIBS_DEPEND_ON_TOOLS @@ -134,15 +138,74 @@ option( the tools every time you update llvm-project." ON ) - +option( + LIBS_USE_COMPILER_LAUNCHER + "Pass CMAKE_C_COMPILER_LAUNCHER and CMAKE_CXX_COMPILER_LAUNCHER + down to the library builds, so that programs such as ccache can + be used to speed up repeated builds. This is not done by default, + as it can also make the inital build slower due to the cold cache." +) +option( + APPLY_LLVM_PERFORMANCE_PATCHES + "During checkout, apply optional downstream patches to + llvm-project to improve performance." +) +option( + ENABLE_PARALLEL_LIB_CONFIG + "Run the library variant configuration steps in parallel." + ON +) +option( + ENABLE_PARALLEL_LIB_BUILD + "Run the library variant build steps in parallel." + OFF +) +set(PARALLEL_LIB_BUILD_LEVELS + "1" CACHE STRING + "If ENABLE_PARALLEL_LIB_BUILD is ON, this number of processes will be assigned to each variant built." +) +option( + ENABLE_QEMU_TESTING + "Enable tests that use QEMU. This option is ON by default." + ON +) +option( + ENABLE_FVP_TESTING + "Enable tests that use FVPs. This option is OFF by default." +) +set( + FVP_INSTALL_DIR + "${CMAKE_CURRENT_SOURCE_DIR}/fvp/install" CACHE STRING + "The directory in which the FVP models are installed. These are not + included in this repository, but can be downloaded by the script + fvp/get_fvps.sh" +) +set(FVP_CONFIG_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fvp/config") set(LLVM_TOOLCHAIN_C_LIBRARY "picolibc" CACHE STRING "Which C library to use." ) set_property(CACHE LLVM_TOOLCHAIN_C_LIBRARY - PROPERTY STRINGS picolibc newlib) -option(LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL - "Make cpack build an overlay package that can be unpacked over the main toolchain to install a secondary set of libraries based on newlib.") + PROPERTY STRINGS picolibc newlib llvmlibc) + +# Previously, the LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL option was +# called LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL. Detect a setting of +# that name, in case it's in an existing CMakeCache.txt or command +# line, and use it to set the default for the more general option +# name. +if(LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) + set(overlay_install_default ON) +else() + set(overlay_install_default OFF) +endif() +option(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL + "Make cpack build an overlay package that can be unpacked over the main toolchain to install a secondary set of libraries based on newlib or llvm-libc." + ${overlay_install_default}) +if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) + if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL "picolibc") + message(FATAL_ERROR "LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL is only permitted for C libraries other than the default picolibc") + endif() +endif() set(BUG_REPORT_URL "https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/issues" CACHE STRING "") set(LLVM_DISTRIBUTION_COMPONENTS @@ -163,6 +226,7 @@ set(LLVM_DISTRIBUTION_COMPONENTS llvm-readelf llvm-readobj llvm-size + llvm-strings llvm-strip llvm-symbolizer LTO @@ -227,95 +291,32 @@ include(ProcessorCount) # # If you want to stop cmake updating the repos then run # cmake . -DFETCHCONTENT_FULLY_DISCONNECTED=ON +include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fetch_llvm.cmake) +if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fetch_picolibc.cmake) +endif() +if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/fetch_newlib.cmake) +endif() -# Read which revisions of the repos to use. -file(READ versions.json VERSIONS_JSON) -function(read_repo_version output_variable_prefix repo) - string(JSON tag GET ${VERSIONS_JSON} "repos" "${repo}" "tag") - string(JSON tagType GET ${VERSIONS_JSON} "repos" "${repo}" "tagType") - if(tagType STREQUAL "commithash") - # GIT_SHALLOW doesn't work with commit hashes. - set(shallow OFF) - elseif(tagType STREQUAL "branch") - set(shallow ON) - # CMake docs recommend that "branch names and tags should - # generally be specified as remote names" - set(tag "origin/${tag}") - elseif(tagType STREQUAL "tag") - set(shallow ON) - else() - message(FATAL_ERROR "Unrecognised tagType ${tagType}") - endif() - - set(${output_variable_prefix}_TAG "${tag}" PARENT_SCOPE) - set(${output_variable_prefix}_SHALLOW "${shallow}" PARENT_SCOPE) -endfunction() -read_repo_version(llvmproject llvm-project) -read_repo_version(${LLVM_TOOLCHAIN_C_LIBRARY} ${LLVM_TOOLCHAIN_C_LIBRARY}) - -# The patches are generated from custom branch, with followin command: -# git format-patch -k origin/main -# The patches apply cleanly against llvm-project commit -# ed551e0778a35f00ab60f1c80d83ea8274d8d400. -set( - llvm_project_patches - ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-two-remaining-tests.patch - ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch - ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch - ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0004-libc-tests-with-picolibc-mark-sort-test-as-long-one.patch - ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0005-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch - ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project/0006-libc-tests-with-picolibc-mark-two-more-large-tests.patch -) -FetchContent_Declare(llvmproject - GIT_REPOSITORY https://github.com/llvm/llvm-project.git - GIT_TAG "${llvmproject_TAG}" - GIT_SHALLOW "${llvmproject_SHALLOW}" - GIT_PROGRESS TRUE - PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git am -k --ignore-whitespace --3way ${llvm_project_patches} - # Add the llvm subdirectory later to ensure that - # LLVMEmbeddedToolchainForArm is the first project declared. - # Otherwise CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT - # can't be used. - SOURCE_SUBDIR do_not_add_llvm_subdir_yet -) - -FetchContent_Declare(picolibc - GIT_REPOSITORY https://github.com/picolibc/picolibc.git - GIT_TAG "${picolibc_TAG}" - GIT_SHALLOW "${picolibc_SHALLOW}" - GIT_PROGRESS TRUE - PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc.patch - # We only want to download the content, not configure it at this - # stage. picolibc will be built in many configurations using - # ExternalProject_Add using the sources that are checked out here. - SOURCE_SUBDIR do_not_add_picolibc_subdir -) - -FetchContent_Declare(newlib - GIT_REPOSITORY https://sourceware.org/git/newlib-cygwin.git - GIT_TAG "${newlib_TAG}" - GIT_SHALLOW "${newlib_SHALLOW}" - GIT_PROGRESS TRUE - PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/newlib.patch - # Similarly to picolibc, we don't do the configuration here. - SOURCE_SUBDIR do_not_add_newlib_subdir -) - -FetchContent_MakeAvailable(llvmproject) -FetchContent_MakeAvailable(${LLVM_TOOLCHAIN_C_LIBRARY}) - +################################################################################################## +# We set all project properties later, this call is just to enable the +# CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT check +project(LLVMEmbeddedToolchainForArm) # We generally want to install to a local directory to see what the # output will look like rather than install into the system, so change # the default accordingly. # See https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html -# Note that this code only works after the first call to project so it -# can't be moved after the add_subdirectory command below. +# Note that THIS CODE ONLY WORKS AFTER THE FIRST CALL TO PROJECT so it +# can't be moved after the add_subdirectory() command below as it will be too late - +# the llvm project will set it to the default system install directory. if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE ) endif() +################################################################################################## if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) install( @@ -326,6 +327,43 @@ if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) ) endif() +install( + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/Omax.cfg + ${CMAKE_CURRENT_SOURCE_DIR}/OmaxLTO.cfg + DESTINATION bin + COMPONENT llvm-toolchain-config-files +) + +if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc) + install( + FILES + ${CMAKE_CURRENT_SOURCE_DIR}/llvmlibc.cfg + DESTINATION bin + COMPONENT llvm-toolchain-llvmlibc-configs + ) + + install( + DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR}/llvmlibc-samples/src + DESTINATION samples + COMPONENT llvm-toolchain-llvmlibc-configs + ) + + # LLVM libc lacks a configuration for AArch64, but the AArch32 one works + # fine. However, setting the configuration for both architectures to the + # arm config directory means the baremetal config.json is never loaded, + # as it resides in the directory above. To ensure both are used, copy + # them to the same location and point libc to that. + set(LIBC_CFG_DIR ${CMAKE_BINARY_DIR}/llvmlibc-config) + file(COPY + ${llvmproject_SOURCE_DIR}/libc/config/baremetal/config.json + ${llvmproject_SOURCE_DIR}/libc/config/baremetal/arm/. + DESTINATION + ${LIBC_CFG_DIR} + ) +endif() + add_subdirectory( ${llvmproject_SOURCE_DIR}/llvm llvm ) @@ -357,10 +395,10 @@ if(DEFINED LLVM_TOOLCHAIN_VERSION_SUFFIX) endif() # Restrict which LLVM components are installed. -if(LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) +if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) set(CPACK_COMPONENTS_ALL llvm-toolchain-libs - llvm-toolchain-newlib-configs + llvm-toolchain-${LLVM_TOOLCHAIN_C_LIBRARY}-configs llvm-toolchain-third-party-licenses) elseif(LLVM_TOOLCHAIN_CROSS_BUILD_MINGW) set(CPACK_COMPONENTS_ALL ${LLVM_TOOLCHAIN_DISTRIBUTION_COMPONENTS} llvm-toolchain-mingw) @@ -372,10 +410,10 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL TRUE) # Don't create a separate archive for each component. set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE) # When extracting the files put them in an ArmCompiler-.../ directory. -# Exception: the newlib overlay package does not do this, because it has +# Exception: the overlay packages do not do this, because they have # to be able to unpack over the top of an existing installation on all # platforms, and each platform has a different top-level directory name. -if(LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) +if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY FALSE) else() set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY TRUE) @@ -418,8 +456,8 @@ endif() set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION}) -if(LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) - set(PACKAGE_FILE_NAME ${PACKAGE_NAME}-newlib-overlay-${PACKAGE_VERSION}) +if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) + set(PACKAGE_FILE_NAME ${PACKAGE_NAME}-${LLVM_TOOLCHAIN_C_LIBRARY}-overlay-${PACKAGE_VERSION}) else() set(PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}) endif() @@ -435,15 +473,6 @@ llvm_install_symlink(LLVM llvm-ranlib llvm-ar ALWAYS_GENERATE) llvm_install_symlink(LLVM llvm-readelf llvm-readobj ALWAYS_GENERATE) llvm_install_symlink(LLVM llvm-strip llvm-objcopy ALWAYS_GENERATE) -if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) - # For building picolibc use Meson. - # Although picolibc has support for building with CMake, the Meson code - # is more mature and works better with LLVM. - find_program(MESON_EXECUTABLE meson REQUIRED) -endif() - -include(cmake/to_meson_list.cmake) - # Generate VERSION.txt # Use add_custom_target instead of add_custom_command so that the target # is always considered out-of-date, ensuring that VERSION.txt will be @@ -455,7 +484,7 @@ add_custom_target( -DLLVMEmbeddedToolchainForArm_VERSION=${LLVMEmbeddedToolchainForArm_VERSION} -DLLVMEmbeddedToolchainForArm_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -Dllvmproject_SOURCE_DIR=${llvmproject_SOURCE_DIR} - # only one of picolibc and newlib source dirs is needed, but easiest to + # at most one of picolibc and newlib source dirs is needed, but easiest to # specify both definitions -Dpicolibc_SOURCE_DIR=${picolibc_SOURCE_DIR} -Dnewlib_SOURCE_DIR=${newlib_SOURCE_DIR} @@ -478,20 +507,6 @@ add_custom_target(llvm-toolchain ALL) # Groups all the runtime targets add_custom_target(llvm-toolchain-runtimes) -# Groups all C++ runtime libraries tests -add_custom_target(check-llvm-toolchain-runtimes) -add_custom_target(check-compiler-rt) -add_custom_target(check-cxxabi) -add_custom_target(check-unwind) -add_custom_target(check-cxx) - -add_dependencies( - check-llvm-toolchain-runtimes - check-cxxabi - check-unwind - check-cxx -) - if(NOT LLVM_TOOLCHAIN_CROSS_BUILD_MINGW) add_dependencies( llvm-toolchain @@ -505,1159 +520,156 @@ add_dependencies( version_txt ) -foreach(variant ${LLVM_TOOLCHAIN_LIBRARY_VARIANTS}) - set(enable_${variant} TRUE) -endforeach() - -if(LIBS_DEPEND_ON_TOOLS) - set(lib_tool_dependencies - clang - lld - llvm-ar - llvm-config - llvm-nm - llvm-ranlib - llvm-strip - ) -endif() - -set(picolibc_specific_runtimes_options - -DLIBCXXABI_ENABLE_THREADS=OFF - -DLIBCXX_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++-picolibc.cfg.in - -DLIBCXXABI_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++abi-picolibc.cfg.in - -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF - -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF - -DLIBCXX_ENABLE_THREADS=OFF - -DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF - -DLIBUNWIND_ENABLE_THREADS=OFF - -DLIBUNWIND_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libunwind-picolibc.cfg.in -) - -set(newlib_specific_runtimes_options - -DLIBCXXABI_ENABLE_THREADS=OFF - -DLIBCXX_ENABLE_THREADS=OFF - -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF - -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF - -DLIBCXX_ENABLE_WIDE_CHARACTERS=ON - -DLIBCXX_ENABLE_LOCALIZATION=OFF - -DLIBUNWIND_ENABLE_THREADS=OFF -) - -if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib AND - LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) - # If we're building newlib with the intention of installing it as - # an overlay on the main package archive, then all of newlib's - # includes, libraries and multilib.yaml go in a subdirectory of - # lib/clang-runtimes. Configuration files in the bin directory - # will make it easy to reset the sysroot to point at that subdir. - set(library_subdir "/newlib") -else() - set(library_subdir "") -endif() - -add_custom_target(check-picolibc) # Set LLVM_DEFAULT_EXTERNAL_LIT to the directory of clang # which was build in previous step. This path is not exported # by add_subdirectory of llvm project set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_BINARY_DIR}/bin/llvm-lit") -add_custom_target(check-newlib) # FIXME: put things in this - -function(get_test_executor_params target_triple qemu_machine qemu_cpu qemu_params) - if(target_triple MATCHES "^aarch64") - set(qemu_command "qemu-system-aarch64") - else() - set(qemu_command "qemu-system-arm") - endif() - - # Use colon as a separator because comma and semicolon are used for - # other purposes in CMake. - string(REPLACE " " ":" qemu_params_list "${qemu_params}") +add_custom_target(check-llvm-toolchain-runtimes) +add_custom_target(check-${LLVM_TOOLCHAIN_C_LIBRARY}) +add_custom_target(check-compiler-rt) +add_custom_target(check-cxx) +add_custom_target(check-cxxabi) +add_custom_target(check-unwind) - set( - test_executor_params - --qemu-command ${qemu_command} - --qemu-machine ${qemu_machine}) - if(qemu_cpu) - list(APPEND test_executor_params --qemu-cpu ${qemu_cpu}) - endif() - if(qemu_params_list) - list(APPEND test_executor_params "--qemu-params=${qemu_params_list}") - endif() - set(test_executor_params "${test_executor_params}" PARENT_SCOPE) -endfunction() - -function( - add_picolibc - directory - variant - target_triple - flags - build_type - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size -) - if(CMAKE_INSTALL_MESSAGE STREQUAL NEVER) - set(MESON_INSTALL_QUIET "--quiet") +if(NOT PREBUILT_TARGET_LIBRARIES) + if(LIBS_DEPEND_ON_TOOLS) + set(lib_tool_dependencies + clang + lld + llvm-ar + llvm-config + llvm-nm + llvm-ranlib + llvm-strip + ) endif() - if(target_triple MATCHES "^aarch64") - set(cpu_family aarch64) - set(enable_long_double_test false) - else() - set(cpu_family arm) - set(enable_long_double_test true) - endif() - if(build_type MATCHES "minsize") - set(newlib_nano_malloc "true") + add_dependencies( + check-llvm-toolchain-runtimes + check-${LLVM_TOOLCHAIN_C_LIBRARY} + check-compiler-rt + check-cxx + check-cxxabi + check-unwind + ) + + if(LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) + # If we're building a non-default libc with the intention of + # installing it as an overlay on the main package archive, then + # all of its includes, libraries and multilib.yaml go in a + # subdirectory of lib/clang-runtimes. Configuration files in the + # bin directory will make it easy to reset the sysroot to point at + # that subdir. + set(library_subdir "/${LLVM_TOOLCHAIN_C_LIBRARY}") else() - set(newlib_nano_malloc "false") + set(library_subdir "") endif() - ExternalProject_Add( - picolibc_${variant} - SOURCE_DIR ${picolibc_SOURCE_DIR} - INSTALL_DIR "${LLVM_BINARY_DIR}/${directory}" - PREFIX picolibc/${variant} - DEPENDS ${lib_tool_dependencies} - CONFIGURE_COMMAND - ${MESON_EXECUTABLE} - setup - -Dincludedir=include - -Dlibdir=lib - -Dspecsdir=none - -Dmultilib=false - -Dtests-enable-stack-protector=false - -Dtest-long-double=${enable_long_double_test} - -Dnewlib-nano-malloc=${newlib_nano_malloc} - --prefix - --cross-file /meson-cross-build.txt - --buildtype=${build_type} - - BUILD_COMMAND ${MESON_EXECUTABLE} configure -Dtests=false - COMMAND ${MESON_EXECUTABLE} compile - INSTALL_COMMAND ${MESON_EXECUTABLE} install ${MESON_INSTALL_QUIET} - TEST_COMMAND - ${Python3_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/test-support/run-picolibc-tests.py - --meson-command ${MESON_EXECUTABLE} - --picolibc-build-dir - --picolibc-source-dir - --variant ${variant} - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - TEST_EXCLUDE_FROM_MAIN TRUE - STEP_TARGETS install test - ) - - # Set meson_c_args to a comma-separated list of the clang path - # and flags e.g. 'path/to/clang', '--target=armv6m-none-eabi', - # '-march=armv6m' - separate_arguments(flags) - list(PREPEND flags "${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}") - list(APPEND flags --sysroot "${LLVM_BINARY_DIR}/${directory}") - to_meson_list("${flags}" meson_c_args) - - set(test_executor_bin ${CMAKE_CURRENT_SOURCE_DIR}/test-support/picolibc-test-wrapper.py) - to_meson_list("${test_executor_params}" test_executor_params) - - ExternalProject_Get_Property(picolibc_${variant} BINARY_DIR) - configure_file(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/cmake/meson-cross-build.txt.in ${BINARY_DIR}/meson-cross-build.txt @ONLY) - - # Building picolibc tests requires compiler_rt to be installed. - # Building compiler_rt tests requires picolibc to be installed. - # To solve this compiler_rt relies on picolibc to be just installed, not on - # the full target, which would include tests. Picolibc tests, are enabled - # only in tests step, otherwise, they would be built before install. - ExternalProject_Add_StepDependencies(picolibc_${variant} test compiler_rt_${variant}-install) - - add_custom_target(check-picolibc-${variant}) - add_dependencies(check-picolibc-${variant} picolibc_${variant}-test) - add_dependencies(check-picolibc check-picolibc-${variant}) - add_dependencies(llvm-toolchain-runtimes picolibc_${variant}) -endfunction() - -function( - add_newlib - directory - variant - target_triple - flags - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size -) - if(target_triple MATCHES "^aarch64") - set(cpu_family aarch64) - else() - set(cpu_family arm) + if(LIBS_USE_COMPILER_LAUNCHER) + if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") + endif() + if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") + endif() endif() - set(sysroot "${LLVM_BINARY_DIR}/${directory}") - - set(build_env - "CC_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang -target ${target_triple} -ffreestanding" - "CXX_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang++ -target ${target_triple} -ffreestanding" - "AR_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ar" - "AS_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-as" - "NM_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-nm" - "OBJDUMP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-objdump" - "RANLIB_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ranlib" - "READELF_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-readelf" - "STRIP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-strip" - "CFLAGS_FOR_TARGET=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${sysroot}" - "CCASFLAGS=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -UHAVE_INIT_FINI__ -U_HAVE_INIT_FINI__ -UHAVE_INIT_FINI --sysroot ${sysroot}" - ) - - set(make_flags) - ProcessorCount(nproc) - if(NOT nproc EQUAL 0) - set(make_flags -j${nproc}) - endif() + # ENABLE_VARIANTS expects a semi-colon separated list. + # To prevent CMake expanding it automatically while passing it + # down, switch to comma separated. Enabling the ExternalProject + # LIST_SEPARATOR option will handle switching it back. + string(REPLACE ";" "," ENABLE_VARIANTS_PASSTHROUGH "${LLVM_TOOLCHAIN_LIBRARY_VARIANTS}") ExternalProject_Add( - newlib_${variant} - SOURCE_DIR ${newlib_SOURCE_DIR} - INSTALL_DIR "${LLVM_BINARY_DIR}/${directory}" - PREFIX newlib/${variant} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + PREFIX ${CMAKE_BINARY_DIR}/multilib-builds + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/arm-multilib + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir} DEPENDS ${lib_tool_dependencies} - CONFIGURE_COMMAND - ${CMAKE_COMMAND} -E env ${build_env} - /configure - --target=${target_triple} - --prefix "${sysroot}" - --exec_prefix /tmpinstall - --enable-newlib-io-long-long - --enable-newlib-register-fini - --disable-newlib-supplied-syscalls - --enable-newlib-io-c99-formats - --disable-nls - --enable-lite-exit - --disable-multilib - --enable-newlib-retargetable-locking - BUILD_COMMAND - ${CMAKE_COMMAND} -E env ${build_env} - make ${make_flags} - && - "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs - /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a - /${target_triple}/libgloss/${cpu_family}/rdimon-crt0.o - && - "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs - /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a - /${target_triple}/libgloss/${cpu_family}/crt0.o - INSTALL_COMMAND - make install - && - ${CMAKE_COMMAND} -E copy_directory - /tmpinstall/${target_triple} - ${sysroot} - && - ${CMAKE_COMMAND} -E copy - /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a - ${sysroot}/lib - && - ${CMAKE_COMMAND} -E copy - /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a - ${sysroot}/lib - # FIXME: TEST_COMMAND? - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - TEST_EXCLUDE_FROM_MAIN TRUE - STEP_TARGETS install # FIXME: test? - ) - - add_dependencies( - llvm-toolchain-runtimes - newlib_${variant} - ) -endfunction() - -macro( - add_libc - directory - variant - target_triple - flags - picolibc_build_type - test_executor_params - default_boot_flash_addr - default_boot_flash_size - default_flash_addr - default_flash_size - default_ram_addr - default_ram_size - default_stack_size -) - # It would be nice to just pass ${ARGN} to both the underlying functions, - # but that has the side effect of expanding any list arguments (e.g. - # test_executor_params) into lots of separate words - the same bug that - # $* has in POSIX sh. We want the analogue of "$@" here, but I don't know - # of one for cmake. - if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) - add_picolibc( - "${directory}" - "${variant}" - "${target_triple}" - "${flags}" - "${picolibc_build_type}" - "${test_executor_params}" - "${default_boot_flash_addr}" - "${default_boot_flash_size}" - "${default_flash_addr}" - "${default_flash_size}" - "${default_ram_addr}" - "${default_ram_size}" - "${default_stack_size}" - ) - elseif(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) - add_newlib( - "${directory}" - "${variant}" - "${target_triple}" - "${flags}" - "${test_executor_params}" - "${default_boot_flash_addr}" - "${default_boot_flash_size}" - "${default_flash_addr}" - "${default_flash_size}" - "${default_ram_addr}" - "${default_ram_size}" - "${default_stack_size}" - ) - endif() -endmacro() - -function(get_runtimes_flags directory flags) - set(runtimes_flags "${flags} -ffunction-sections -fdata-sections -fno-ident --sysroot ${LLVM_BINARY_DIR}/${directory}" PARENT_SCOPE) -endfunction() - -function( - add_compiler_rt - directory - variant - target_triple - flags - test_executor - libc_target -) - # We can't always put the exact target - # architecture in the triple, because compiler-rt's cmake - # system doesn't recognize every possible Arm architecture - # version. So mostly we just say 'arm' and control the arch - # version via -march=armv7m (or whatever). - # Exceptions are architectures pre-armv7, which compiler-rt expects to - # see in the triple because that's where it looks to decide whether to - # use specific assembly sources. - if(NOT target_triple MATCHES "^(aarch64-none-elf|arm-none-eabi|armv[4-6])") - message(FATAL_ERROR "\ -Target triple name \"${target_triple}\" not compatible with compiler-rt. -Use -march to specify the architecture.") - endif() - # Also, compiler-rt looks in the ABI component of the - # triple to decide whether to use the hard float ABI. - if(flags MATCHES "-mfloat-abi=hard" AND NOT target_triple MATCHES "-eabihf$") - message(FATAL_ERROR "\ -Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\"") - endif() - string(REPLACE "-none-" "-unknown-none-" normalized_target_triple ${target_triple}) - - get_runtimes_flags("${directory}" "${flags}") - - set(compiler_rt_test_flags "${runtimes_flags} -fno-exceptions -fno-rtti -lcrt0-semihost -lsemihost -T picolibcpp.ld") - if(variant STREQUAL "armv6m_soft_nofp") - set(compiler_rt_test_flags "${compiler_rt_test_flags} -fomit-frame-pointer") - endif() - - ExternalProject_Add( - compiler_rt_${variant} - SOURCE_DIR ${llvmproject_SOURCE_DIR}/compiler-rt - PREFIX compiler-rt/${variant} - INSTALL_DIR compiler-rt/${variant}/install - DEPENDS ${lib_tool_dependencies} ${libc_target} CMAKE_ARGS - -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_ASM_COMPILER_TARGET=${target_triple} - -DCMAKE_ASM_FLAGS=${runtimes_flags} - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_CXX_COMPILER_TARGET=${target_triple} - -DCMAKE_CXX_FLAGS=${runtimes_flags} - -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_C_COMPILER_TARGET=${target_triple} - -DCMAKE_C_FLAGS=${runtimes_flags} - -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + ${compiler_launcher_cmake_args} + -DC_LIBRARY=${LLVM_TOOLCHAIN_C_LIBRARY} + -DLLVM_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/llvm + -DMULTILIB_JSON=${LLVM_TOOLCHAIN_MULTILIB_JSON} + -DENABLE_VARIANTS=${ENABLE_VARIANTS_PASSTHROUGH} + -DENABLE_PARALLEL_LIB_CONFIG=${ENABLE_PARALLEL_LIB_CONFIG} + -DENABLE_PARALLEL_LIB_BUILD=${ENABLE_PARALLEL_LIB_BUILD} + -DPARALLEL_LIB_BUILD_LEVELS=${PARALLEL_LIB_BUILD_LEVELS} + -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} + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=${FETCHCONTENT_SOURCE_DIR_PICOLIBC} + -DFETCHCONTENT_SOURCE_DIR_NEWLIB=${FETCHCONTENT_SOURCE_DIR_NEWLIB} -DCMAKE_INSTALL_PREFIX= - -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} - # Let CMake know we're cross-compiling - -DCMAKE_SYSTEM_NAME=Generic - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - -DCOMPILER_RT_BAREMETAL_BUILD=ON - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF - -DCOMPILER_RT_BUILD_PROFILE=OFF - -DCOMPILER_RT_BUILD_SANITIZERS=OFF - -DCOMPILER_RT_BUILD_XRAY=OFF - -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON - -DCOMPILER_RT_INCLUDE_TESTS=ON - -DCOMPILER_RT_EMULATOR=${test_executor} - -DCOMPILER_RT_TEST_COMPILER=${LLVM_BINARY_DIR}/bin/clang - -DCOMPILER_RT_TEST_COMPILER_CFLAGS=${compiler_rt_test_flags} - -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} - -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}/lib/cmake/llvm - -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON - STEP_TARGETS build install - USES_TERMINAL_CONFIGURE FALSE - USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE - USES_TERMINAL_TEST TRUE - LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE - CONFIGURE_HANDLED_BY_BUILD TRUE - INSTALL_COMMAND ${CMAKE_COMMAND} --install . - # Copy compiler-rt lib directory, moving libraries out of their - # target-specific subdirectory. - COMMAND - ${CMAKE_COMMAND} - -E copy_directory - /lib/${normalized_target_triple} - "${LLVM_BINARY_DIR}/${directory}/lib" - ) - - add_dependencies( - llvm-toolchain-runtimes - compiler_rt_${variant} - ) -endfunction() - -function( - add_libcxx_libcxxabi_libunwind - directory - variant - target_triple - flags - test_executor - libc_target - extra_cmake_options - enable_exceptions - enable_rtti -) - get_runtimes_flags("${directory}" "${flags}") - set(target_name "libcxx_libcxxabi_libunwind_${variant}") - set(prefix "libcxx_libcxxabi_libunwind/${variant}") - set(instal_dir "${LLVM_BINARY_DIR}/${directory}") - if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL picolibc) - list( - APPEND extra_cmake_options - -DLIBCXXABI_ENABLE_EXCEPTIONS=${enable_exceptions} - -DLIBCXXABI_ENABLE_STATIC_UNWINDER=${enable_exceptions} - -DLIBCXX_ENABLE_EXCEPTIONS=${enable_exceptions} - -DLIBCXX_ENABLE_RTTI=${enable_rtti} - ) - endif() - - ExternalProject_Add( - ${target_name} - SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes - INSTALL_DIR ${instal_dir} - PREFIX ${prefix} - DEPENDS ${lib_tool_dependencies} compiler_rt_${variant} ${libc_target} - CMAKE_ARGS - -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_ASM_FLAGS=${runtimes_flags} - -DCMAKE_BUILD_TYPE=MinSizeRel - -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_CXX_COMPILER_TARGET=${target_triple} - -DCMAKE_CXX_FLAGS=${runtimes_flags} - -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_C_COMPILER_TARGET=${target_triple} - -DCMAKE_C_FLAGS=${runtimes_flags} - -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} - -DCMAKE_INSTALL_PREFIX=${instal_dir} - -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} - -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} - # Let CMake know we're cross-compiling - -DCMAKE_SYSTEM_NAME=Generic - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - -DLIBC_LINKER_SCRIPT=picolibcpp.ld - -DLIBCXXABI_BAREMETAL=ON - -DLIBCXXABI_ENABLE_ASSERTIONS=OFF - -DLIBCXXABI_ENABLE_SHARED=OFF - -DLIBCXXABI_ENABLE_STATIC=ON - -DLIBCXXABI_LIBCXX_INCLUDES="${LLVM_BINARY_DIR}/${directory}/include/c++/v1" - -DLIBCXXABI_USE_COMPILER_RT=ON - -DLIBCXXABI_USE_LLVM_UNWINDER=ON - -DLIBCXXABI_TEST_PARAMS=executor=${test_executor} - -DLIBCXX_ABI_UNSTABLE=ON - -DLIBCXX_CXX_ABI=libcxxabi - -DLIBCXX_ENABLE_FILESYSTEM=OFF - -DLIBCXX_ENABLE_SHARED=OFF - -DLIBCXX_ENABLE_STATIC=ON - -DLIBCXX_INCLUDE_BENCHMARKS=OFF - -DLIBCXX_TEST_PARAMS=executor=${test_executor} - -DLIBUNWIND_ENABLE_SHARED=OFF - -DLIBUNWIND_ENABLE_STATIC=ON - -DLIBUNWIND_IS_BAREMETAL=ON - -DLIBUNWIND_REMEMBER_HEAP_ALLOC=ON - -DLIBUNWIND_USE_COMPILER_RT=ON - -DLIBUNWIND_TEST_PARAMS=executor=${test_executor} - -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} - -DLLVM_ENABLE_RUNTIMES=libcxxabi,libcxx,libunwind - -DRUNTIME_TEST_ARCH_FLAGS=${flags} - -DRUNTIME_VARIANT_NAME=${variant} - ${extra_cmake_options} - STEP_TARGETS build - USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_CONFIGURE TRUE USES_TERMINAL_BUILD TRUE - USES_TERMINAL_INSTALL TRUE - USES_TERMINAL_TEST TRUE LIST_SEPARATOR , - # Always run the build command so that incremental builds are correct. - BUILD_ALWAYS TRUE CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS build install ) add_dependencies( llvm-toolchain-runtimes - ${target_name} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) -endfunction() -function(add_compiler_rt_tests variant) - ExternalProject_Add_Step( - compiler_rt_${variant} - check-compiler-rt - COMMAND "${CMAKE_COMMAND}" --build --target check-compiler-rt - USES_TERMINAL TRUE - EXCLUDE_FROM_MAIN TRUE - ALWAYS TRUE - ) - ExternalProject_Add_StepTargets(compiler_rt_${variant} check-compiler-rt) - ExternalProject_Add_StepDependencies( - compiler_rt_${variant} - check-compiler-rt - compiler_rt_${variant}-build - ) - add_custom_target(check-compiler-rt-${variant}) - add_dependencies(check-compiler-rt-${variant} compiler_rt_${variant}-check-compiler-rt) - add_dependencies(check-compiler-rt check-compiler-rt-${variant}) - add_dependencies(check-llvm-toolchain-runtimes-${variant} check-compiler-rt-${variant}) -endfunction() - -function(add_libcxx_libcxxabi_libunwind_tests variant) - set(target_name "libcxx_libcxxabi_libunwind_${variant}") - set(variant_with_extensions "${variant}") - foreach(check_target check-cxxabi check-unwind check-cxx) + foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) ExternalProject_Add_Step( - ${target_name} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target} COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} USES_TERMINAL TRUE EXCLUDE_FROM_MAIN TRUE ALWAYS TRUE ) - ExternalProject_Add_StepTargets(${target_name} ${check_target}) + ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}) ExternalProject_Add_StepDependencies( - ${target_name} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target} - ${target_name}-build - ) - add_custom_target(${check_target}-${variant_with_extensions}) - add_dependencies(${check_target}-${variant_with_extensions} ${target_name}-${check_target}) - add_dependencies(${check_target} ${target_name}-${check_target}) - add_dependencies(check-llvm-toolchain-runtimes-${variant} ${check_target}-${variant_with_extensions}) - endforeach() -endfunction() - -function(get_compiler_rt_target_triple target_arch flags) - if(target_arch STREQUAL "aarch64") - set(target_triple "aarch64-none-elf") - else() - # Choose the target triple so that compiler-rt will do the - # right thing. We can't always put the exact target - # architecture in the triple, because compiler-rt's cmake - # system doesn't recognize every possible Arm architecture - # version. So mostly we just say 'arm' and control the arch - # version via -march=armv7m (or whatever). - # Exceptions are architectures pre-armv7, which compiler-rt expects to - # see in the triple because that's where it looks to decide whether to - # use specific assembly sources. - if(target_arch MATCHES "^armv[4-6]") - set(target_triple "${target_arch}-none-eabi") - else() - set(target_triple "arm-none-eabi") - endif() - if(flags MATCHES "-mfloat-abi=hard") - # Also, compiler-rt looks in the ABI component of the - # triple to decide whether to use the hard float ABI. - set(target_triple "${target_triple}hf") - endif() - endif() - set(target_triple "${target_triple}" PARENT_SCOPE) -endfunction() - -function(add_library_variant target_arch) - set( - one_value_args - SUFFIX - COMPILE_FLAGS - MULTILIB_FLAGS - PICOLIBC_BUILD_TYPE - QEMU_MACHINE - QEMU_CPU - QEMU_PARAMS - BOOT_FLASH_ADDRESS - BOOT_FLASH_SIZE - FLASH_ADDRESS - FLASH_SIZE - RAM_ADDRESS - RAM_SIZE - STACK_SIZE - ENABLE_EXCEPTIONS - ENABLE_RTTI - ) - cmake_parse_arguments(VARIANT "" "${one_value_args}" "" ${ARGN}) - - if(VARIANT_SUFFIX) - set(variant "${target_arch}_${VARIANT_SUFFIX}") - else() - set(variant "${target_arch}") - endif() - - if(NOT VARIANT_ENABLE_EXCEPTIONS) - set(VARIANT_MULTILIB_FLAGS "${VARIANT_MULTILIB_FLAGS} -fno-exceptions") - endif() - - if(NOT VARIANT_ENABLE_RTTI) - set(VARIANT_MULTILIB_FLAGS "${VARIANT_MULTILIB_FLAGS} -fno-rtti") - endif() - - if(LLVM_TOOLCHAIN_LIBRARY_VARIANTS) - if(NOT enable_${variant}) - message("Disabling library variant ${variant}") - return() - else() - message("Enabling library variant ${variant}") - endif() - endif() - - if(target_arch STREQUAL "aarch64") - set(parent_dir_name aarch64-none-elf) - else() - set(parent_dir_name arm-none-eabi) - endif() - - get_compiler_rt_target_triple("${target_arch}" "${VARIANT_COMPILE_FLAGS}") - - set(directory "${TARGET_LIBRARIES_DIR}${library_subdir}/${parent_dir_name}/${variant}") - set(VARIANT_COMPILE_FLAGS "--target=${target_triple} ${VARIANT_COMPILE_FLAGS}") - get_test_executor_params( - "${target_triple}" - "${VARIANT_QEMU_MACHINE}" - "${VARIANT_QEMU_CPU}" - "${VARIANT_QEMU_PARAMS}" - ) - set( - lit_test_executor - ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py - ${test_executor_params} - ) - list(JOIN lit_test_executor " " lit_test_executor) - if(NOT PREBUILT_TARGET_LIBRARIES) - add_libc( - "${directory}" - "${variant}" - "${target_triple}" - "${VARIANT_COMPILE_FLAGS}" - "${VARIANT_PICOLIBC_BUILD_TYPE}" - "${test_executor_params}" - "${VARIANT_BOOT_FLASH_ADDRESS}" - "${VARIANT_BOOT_FLASH_SIZE}" - "${VARIANT_FLASH_ADDRESS}" - "${VARIANT_FLASH_SIZE}" - "${VARIANT_RAM_ADDRESS}" - "${VARIANT_RAM_SIZE}" - "${VARIANT_STACK_SIZE}" - ) - add_compiler_rt( - "${directory}" - "${variant}" - "${target_triple}" - "${VARIANT_COMPILE_FLAGS}" - "${lit_test_executor}" - "${LLVM_TOOLCHAIN_C_LIBRARY}_${variant}-install" + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install ) - add_libcxx_libcxxabi_libunwind( - "${directory}" - "${variant}" - "${target_triple}" - "${VARIANT_COMPILE_FLAGS}" - "${lit_test_executor}" - "${LLVM_TOOLCHAIN_C_LIBRARY}_${variant}-install" - "${${LLVM_TOOLCHAIN_C_LIBRARY}_specific_runtimes_options}" - ${VARIANT_ENABLE_EXCEPTIONS} - ${VARIANT_ENABLE_RTTI} - ) - if(VARIANT_COMPILE_FLAGS MATCHES "-march=armv8") - message("C++ runtime libraries tests disabled for ${variant}") - else() - add_custom_target(check-llvm-toolchain-runtimes-${variant}) - add_dependencies(check-llvm-toolchain-runtimes check-llvm-toolchain-runtimes-${variant}) - add_compiler_rt_tests("${variant}") - add_libcxx_libcxxabi_libunwind_tests("${variant}") - endif() - endif() - - string(APPEND multilib_yaml_content "- Dir: ${parent_dir_name}/${variant}\n") - - string(APPEND multilib_yaml_content " Flags:\n") - string(REPLACE " " ";" multilib_flags_list ${VARIANT_MULTILIB_FLAGS}) - foreach(flag ${multilib_flags_list}) - string(APPEND multilib_yaml_content " - ${flag}\n") + add_dependencies(${check_target} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}) endforeach() - string(APPEND multilib_yaml_content " Group: stdlibs\n") - install( - DIRECTORY "${LLVM_BINARY_DIR}/${directory}/" - DESTINATION "${directory}" - COMPONENT llvm-toolchain-libs - ) - set(multilib_yaml_content "${multilib_yaml_content}" PARENT_SCOPE) -endfunction() - -function(add_library_variants_for_cpu target_arch) - set( - one_value_args - SUFFIX - COMPILE_FLAGS - MULTILIB_FLAGS - PICOLIBC_BUILD_TYPE - QEMU_MACHINE - QEMU_CPU - QEMU_PARAMS - BOOT_FLASH_ADDRESS - BOOT_FLASH_SIZE - FLASH_ADDRESS - FLASH_SIZE - RAM_ADDRESS - RAM_SIZE - STACK_SIZE - ) - cmake_parse_arguments(VARIANT "" "${one_value_args}" "" ${ARGN}) - - # Variant with no exceptions needs to come later in multilib.yaml to - # take priority. - foreach(enable_exceptions_and_rtti IN ITEMS ON OFF) - set(SUFFIXES) - if(VARIANT_SUFFIX) - list(APPEND SUFFIXES ${VARIANT_SUFFIX}) - endif() - if(enable_exceptions_and_rtti) - list(APPEND SUFFIXES "exn") - list(APPEND SUFFIXES "rtti") - endif() - list(JOIN SUFFIXES "_" COMBINED_SUFFIX) - - add_library_variant( - "${target_arch}" - SUFFIX "${COMBINED_SUFFIX}" - COMPILE_FLAGS "${VARIANT_COMPILE_FLAGS}" - MULTILIB_FLAGS "${VARIANT_MULTILIB_FLAGS}" - PICOLIBC_BUILD_TYPE "${VARIANT_PICOLIBC_BUILD_TYPE}" - QEMU_MACHINE "${VARIANT_QEMU_MACHINE}" - QEMU_CPU "${VARIANT_QEMU_CPU}" - QEMU_PARAMS "${VARIANT_QEMU_PARAMS}" - BOOT_FLASH_ADDRESS "${VARIANT_BOOT_FLASH_ADDRESS}" - BOOT_FLASH_SIZE "${VARIANT_BOOT_FLASH_SIZE}" - FLASH_ADDRESS "${VARIANT_FLASH_ADDRESS}" - FLASH_SIZE "${VARIANT_FLASH_SIZE}" - RAM_ADDRESS "${VARIANT_RAM_ADDRESS}" - RAM_SIZE "${VARIANT_RAM_SIZE}" - STACK_SIZE "${VARIANT_STACK_SIZE}" - ENABLE_EXCEPTIONS "${enable_exceptions_and_rtti}" - ENABLE_RTTI "${enable_exceptions_and_rtti}" - ) + # Read the json to generate variant specific target names for convenience. + file(READ ${LLVM_TOOLCHAIN_MULTILIB_JSON} multilib_json_str) + string(JSON multilib_defs GET ${multilib_json_str} "libs") + + string(JSON lib_count LENGTH ${multilib_defs}) + math(EXPR lib_count_dec "${lib_count} - 1") + + foreach(lib_idx RANGE ${lib_count_dec}) + string(JSON lib_def GET ${multilib_defs} ${lib_idx}) + string(JSON variant GET ${lib_def} "variant") + foreach(check_target check-${LLVM_TOOLCHAIN_C_LIBRARY} check-compiler-rt check-cxx check-cxxabi check-unwind) + ExternalProject_Add_Step( + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target}-${variant} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target}-${variant} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(multilib-${LLVM_TOOLCHAIN_C_LIBRARY} ${check_target}-${variant}) + ExternalProject_Add_StepDependencies( + multilib-${LLVM_TOOLCHAIN_C_LIBRARY} + ${check_target}-${variant} + multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-install + ) + add_custom_target(${check_target}-${variant}) + add_dependencies(${check_target}-${variant} multilib-${LLVM_TOOLCHAIN_C_LIBRARY}-${check_target}-${variant}) + endforeach() endforeach() - - set(multilib_yaml_content "${multilib_yaml_content}" PARENT_SCOPE) -endfunction() - -set(multilib_yaml_content "") - -# Define which library variants to build and which flags to use. -# For most variants, the "flash" memory is placed in address range, where -# simulated boards have RAM. This is because code for some tests does not fit -# the real flash. -add_library_variants_for_cpu( - aarch64 - COMPILE_FLAGS "-march=armv8-a" - MULTILIB_FLAGS "--target=aarch64-unknown-none-elf" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "virt" - QEMU_CPU "cortex-a57" - BOOT_FLASH_ADDRESS 0x40000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x40001000 - FLASH_SIZE 0xfff000 - RAM_ADDRESS 0x41000000 - RAM_SIZE 0x1000000 - STACK_SIZE 8K -) -# For AArch32, clang uses different defaults for FPU selection than GCC, both -# when "+fp" or "+fp.dp" are used and when no FPU specifier is provided in -# "-march=". Using "-mfpu=" explicitly. -add_library_variants_for_cpu( - armv4t - COMPILE_FLAGS "-march=armv4t -mfpu=none" - MULTILIB_FLAGS "--target=armv4t-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "none" - QEMU_CPU "ti925t" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv5te - COMPILE_FLAGS "-march=armv5te -mfpu=none" - MULTILIB_FLAGS "--target=armv5e-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "none" - QEMU_CPU "arm926" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv6m - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv6m -mfpu=none" - MULTILIB_FLAGS "--target=thumbv6m-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an385" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7a - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7a -mfpu=none" - MULTILIB_FLAGS "--target=armv7-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-a7" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7a - SUFFIX hard_vfpv3_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16" - MULTILIB_FLAGS "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-a8" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7r - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7r -mfpu=none" - MULTILIB_FLAGS "--target=armv7r-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-r5f" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7r - SUFFIX hard_vfpv3_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16" - MULTILIB_FLAGS "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "none" - QEMU_CPU "cortex-r5f" - QEMU_PARAMS "-m 1G" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x20000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x21000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7m - SUFFIX soft_fpv4_sp_d16 - COMPILE_FLAGS "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16" - MULTILIB_FLAGS "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an386" - QEMU_CPU "cortex-m4" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7m - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7m -mfpu=none" - MULTILIB_FLAGS "--target=thumbv7m-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an385" - QEMU_CPU "cortex-m3" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7em - SUFFIX hard_fpv4_sp_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7em -mfpu=fpv4-sp-d16" - MULTILIB_FLAGS "--target=thumbv7em-unknown-none-eabihf -mfpu=fpv4-sp-d16" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an386" - QEMU_CPU "cortex-m4" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv7em - SUFFIX hard_fpv5_d16 - COMPILE_FLAGS "-mfloat-abi=hard -march=armv7em -mfpu=fpv5-d16" - MULTILIB_FLAGS "--target=thumbv7em-unknown-none-eabihf -mfpu=fpv5-d16" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an500" - QEMU_CPU "cortex-m7" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x60600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -# When no -mfpu=none is specified, the compiler internally adds all other -# possible fpu settings before searching for matching variants. So for the -# no-fpu variant to win, it has to be in multilab.yaml after all other -# fpu variants. The order of variants in multilab.yaml depends on the order -# of the add_library_variant calls. So the add_library_variant that adds -# the soft_nofp for armv7em is placed after all other armv7em variants. -add_library_variants_for_cpu( - armv7em - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv7em -mfpu=none" - MULTILIB_FLAGS "--target=thumbv7em-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "minsize" - QEMU_MACHINE "mps2-an386" - QEMU_CPU "cortex-m4" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x21000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x21600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8m.main - SUFFIX soft_nofp - COMPILE_FLAGS "-mfloat-abi=soft -march=armv8m.main -mfpu=none" - MULTILIB_FLAGS "--target=thumbv8m.main-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps2-an505" - QEMU_CPU "cortex-m33" - BOOT_FLASH_ADDRESS 0x10000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x80000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x80600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8m.main - SUFFIX hard_fp - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8m.main -mfpu=fpv5-sp-d16" - MULTILIB_FLAGS "--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps2-an505" - QEMU_CPU "cortex-m33" - BOOT_FLASH_ADDRESS 0x10000000 - BOOT_FLASH_SIZE 0x1000 - FLASH_ADDRESS 0x80000000 - FLASH_SIZE 0x600000 - RAM_ADDRESS 0x80600000 - RAM_SIZE 0xa00000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX soft_nofp_nomve - COMPILE_FLAGS "-mfloat-abi=soft -march=armv8.1m.main+nomve -mfpu=none" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_fp_nomve - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-sp-d16" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_fpdp_nomve - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-d16" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) -add_library_variants_for_cpu( - armv8.1m.main - SUFFIX hard_nofp_mve - COMPILE_FLAGS "-mfloat-abi=hard -march=armv8.1m.main+mve -mfpu=none" - MULTILIB_FLAGS "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none" - PICOLIBC_BUILD_TYPE "release" - QEMU_MACHINE "mps3-an547" - QEMU_CPU "cortex-m55" - BOOT_FLASH_ADDRESS 0x00000000 - BOOT_FLASH_SIZE 512K - FLASH_ADDRESS 0x60000000 - FLASH_SIZE 0x1000000 - RAM_ADDRESS 0x61000000 - RAM_SIZE 0x1000000 - STACK_SIZE 4K -) - - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/cmake/multilib.yaml.in - ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml - @ONLY -) - -set(multilib_yaml_depends - "${CMAKE_CURRENT_SOURCE_DIR}/multilib-fpus.py" - "${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml" -) -if(LIBS_DEPEND_ON_TOOLS) - list(APPEND multilib_yaml_depends clang) endif() -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml - ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml - COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/multilib-fpus.py" - "--clang=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}" - "--llvm-source=${llvmproject_SOURCE_DIR}" - >> "${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml" - DEPENDS ${multilib_yaml_depends} -) -add_custom_target(multilib_yaml ALL DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml) -add_dependencies(llvm-toolchain-runtimes multilib_yaml) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/llvm/${TARGET_LIBRARIES_DIR}${library_subdir}/multilib.yaml - DESTINATION ${TARGET_LIBRARIES_DIR}${library_subdir} + DIRECTORY ${LLVM_BINARY_DIR}/${TARGET_LIBRARIES_DIR}/. + DESTINATION ${TARGET_LIBRARIES_DIR} COMPONENT llvm-toolchain-libs ) @@ -1680,18 +692,18 @@ if(LLVM_TOOLCHAIN_CROSS_BUILD_MINGW) endif() configure_file(cmake/THIRD-PARTY-LICENSES.txt.in THIRD-PARTY-LICENSES.txt) -if(NOT LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) +if(NOT LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) set(third_party_license_summary_install_dir .) set(third_party_license_files_install_dir third-party-licenses) else() # If we're building an overlay archive, put all the license files - # one level down in third-party-licenses/newlib, so that + # one level down in third-party-licenses/, so that # COPYING.NEWLIB doesn't collide with the file of the same name # from picolibc, and the LLVM license files are also duplicated # (in case the overlay archive is used with a non-matching version # of the main toolchain). - set(third_party_license_summary_install_dir third-party-licenses/newlib) - set(third_party_license_files_install_dir third-party-licenses/newlib) + set(third_party_license_summary_install_dir third-party-licenses/${LLVM_TOOLCHAIN_C_LIBRARY}) + set(third_party_license_files_install_dir third-party-licenses/${LLVM_TOOLCHAIN_C_LIBRARY}) endif() install( @@ -1721,6 +733,11 @@ if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL newlib) ${newlib_SOURCE_DIR}/COPYING.LIBGLOSS COPYING.LIBGLOSS ) endif() +if(LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc) + list(APPEND third_party_license_files + ${llvmproject_SOURCE_DIR}/libc/LICENSE.TXT LIBC-LICENSE.TXT + ) +endif() while(third_party_license_files) list(POP_FRONT third_party_license_files source_file destination_name) @@ -1792,7 +809,7 @@ if(LLVM_TOOLCHAIN_CROSS_BUILD_MINGW OR WIN32) set(cpack_generator ZIP) set(package_filename_extension ".zip") elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" - AND NOT LLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL) + AND NOT LLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL) set(cpack_generator DragNDrop) set(package_filename_extension ".dmg") else() diff --git a/Omax.cfg b/Omax.cfg new file mode 100644 index 00000000..78bec9fb --- /dev/null +++ b/Omax.cfg @@ -0,0 +1,11 @@ +-O3 -ffast-math \ +-mllvm -inline-threshold=500 \ +-mllvm -unroll-threshold=450 \ +-mllvm -unroll-partial-threshold=450 \ +-mllvm -unroll-max-iteration-count-to-analyze=20 \ +-mllvm -lsr-complexity-limit=1073741823 \ +-mllvm -force-attribute=main:norecurse \ +-mllvm -enable-dfa-jump-thread \ +-mllvm -enable-loop-flatten \ +-mllvm -enable-unroll-and-jam \ +-mllvm -enable-inline-memcpy-ld-st diff --git a/OmaxLTO.cfg b/OmaxLTO.cfg new file mode 100644 index 00000000..57c7b031 --- /dev/null +++ b/OmaxLTO.cfg @@ -0,0 +1,12 @@ +-flto=full \ +-fuse-linker-plugin \ +-fvirtual-function-elimination \ +-fwhole-program-vtables \ +-Wl,-plugin-opt=-extra-LTO-loop-unroll=true \ +-Wl,-plugin-opt=-inline-threshold=500 \ +-Wl,-plugin-opt=-unroll-threshold=450 \ +-Wl,-plugin-opt=-unroll-partial-threshold=450 \ +-Wl,-plugin-opt=-unroll-max-iteration-count-to-analyze=20 \ +-Wl,-plugin-opt=-lsr-complexity-limit=1073741823 \ +-Wl,-plugin-opt=-force-attribute=main:norecurse \ + diff --git a/README.md b/README.md index 802085fc..f05f1419 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ +> [!WARNING] +> This repository is deprecated! +> +> LLVM Embedded Toolchain for Arm is now +> [Arm Toolchain for Embedded](https://github.com/arm/arm-toolchain/tree/arm-software/arm-software/embedded) +> maintained in the unified Arm Toolchain [repository](https://github.com/arm/arm-toolchain) +> hosting embedded and Linux toolchains. +> +> 19.1.5 is the last release of the LLVM Embedded Toolchain for Arm. +> Use Arm Toolchain for Embedded [releases](https://github.com/arm/arm-toolchain/releases) for LLVM 20 and later. + # LLVM Embedded Toolchain for Arm This repository contains build scripts and auxiliary material for building a @@ -7,7 +18,7 @@ bare-metal LLVM based toolchain targeting Arm based on: * libc++abi * libc++ * compiler-rt -* picolibc, or optionally newlib +* picolibc, or optionally newlib or LLVM's libc ## Goal @@ -26,7 +37,11 @@ embedded and realtime operating systems. - Armv4T (experimental) - Armv5TE (experimental) - Armv6 (experimental, using the Armv5TE library variant) -- AArch64 armv8.0 (experimental) +- Armv7-A +- Armv7-R +- AArch32 Armv8-A +- AArch32 Armv8-R +- AArch64 Armv8-A ## C++ support @@ -50,12 +65,20 @@ picolibc | https://github.com/picolibc/picolibc ## License -Content of this repository is licensed under Apache-2.0. See -[LICENSE.txt](LICENSE.txt). +Content of this repository is licensed under Apache-2.0, see +[LICENSE.txt](LICENSE.txt). Individual patch files under the +[patches](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/tree/main/patches) +folder may contain code under the upstream project license, if they are +cherry-picks of upstream commits into the LLVM Embedded Toolchain for Arm +release branches, see corresponding pull requests for references. The resulting binaries are covered under their respective open source licenses, see component links above. +Testing for some targets uses the freely-available but not open-source Arm FVP +models, which have their own licenses. These are not used by default, see +[Building from source](docs/building-from-source.md) for details. + ## Host platforms LLVM Embedded Toolchain for Arm is built and tested on Ubuntu 18.04 LTS. @@ -73,6 +96,10 @@ Download a release of the toolchain for your platform from [Github releases](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases) and extract the archive into an arbitrary directory. +### Pre-requisite for using toolchain on Windows + +Install appropriate latest supported Microsoft Visual C++ Redistributable package, such as from [Microsoft Visual C++ Redistributable latest supported downloads](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170). + ### Using the toolchain > *Note:* If you are using the toolchain in a shared environment with untrusted input, @@ -83,6 +110,8 @@ To use the toolchain, on the command line you need to provide the following opti * The FPU to use. * Disabling/enabling C++ exceptions and RTTI. * The C runtime library: either `crt0` or `crt0-semihost`. + `crt0` will be linked automatically, but this can be suppressed + with the `-nostartfiles` option so that `crt0-semihost` can be used. * The semihosting library, if using `crt0-semihost`. * A [linker script]( https://sourceware.org/binutils/docs/ld/Scripts.html) specified with `-T`. @@ -98,6 +127,7 @@ $ clang \ -mfpu=none \ -fno-exceptions \ -fno-rtti \ +-nostartfiles \ -lcrt0-semihost \ -lsemihost \ -T picolibc.ld \ @@ -126,6 +156,7 @@ $ clang \ -mfpu=none \ -fno-exceptions \ -fno-rtti \ +-nostartfiles \ -lcrt0-semihost \ -lsemihost \ -T picolibc.ld \ @@ -135,6 +166,29 @@ $ clang \ The FPU selection can be skipped, but it is not recommended to as the defaults are different to GCC ones. + +The builds of the toolchain come packaged with two config files, Omax.cfg and OmaxLTO.cfg. +When used, these config files enable several build optimisation flags to achieve highest performance on typical embedded benchmarks. OmaxLTO.cfg enables link-time optimisation (LTO) specific flags. +These configs can be optionally passed using the `--config` flag. For example: + +``` +$ clang \ +example.c \ +... +--config=Omax.cfg \ +--config=OmaxLTO.cfg \ +-o example +``` + +Users should be warned that Omax.cfg enables `-ffast-math` which breaks IEEE compliance and +enables maths optimisations which can affect code correctness. LTOs are +kept separately in OmaxLTO.cfg as users may not want LTOs due to potential increase in link time +and/or increased memory usage during linking. Some of the options in the config files are undocumented internal LLVM options. For these undocumented options please see the source code of the +corresponding optimisation passes in the [LLVM project](https://github.com/llvm/llvm-project) +to find out more. Users are also encouraged to create their own configs and tune their own +flag parameters. +Information on LLVM Embedded Toolchain for Arm specific optimization flags is available in [Optimization Flags](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/blob/main/docs/optimization-flags.md) + Binary releases of the LLVM Embedded Toolchain for Arm are based on release branches of the upstream LLVM Project, thus can safely be used with all tools provided by LLVM [releases](https://github.com/llvm/llvm-project/releases) diff --git a/arm-multilib/CMakeLists.txt b/arm-multilib/CMakeLists.txt new file mode 100644 index 00000000..e1568714 --- /dev/null +++ b/arm-multilib/CMakeLists.txt @@ -0,0 +1,384 @@ +# +# Copyright (c) 2024, Arm Limited and affiliates. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# CMake build for a multilib layout of library variants, with each +# variant in a subdirectory and a multilib.yaml file to map flags to +# a variant. + +cmake_minimum_required(VERSION 3.20) + +project(arm-multilib) + +# Root directory of the repo. +set(TOOLCHAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) + +# Cache variables to be set by user +set(MULTILIB_JSON "" CACHE STRING "JSON file to load library definitions from.") +set(ENABLE_VARIANTS "all" CACHE STRING "Semicolon separated list of variants to build, or \"all\". Must match entries in the json.") +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.") +option( + ENABLE_QEMU_TESTING + "Enable tests that use QEMU. This option is ON by default." + ON +) +option( + ENABLE_FVP_TESTING + "Enable tests that use FVPs. This option is OFF by default." +) +set( + FVP_INSTALL_DIR + "" CACHE STRING + "The directory in which the FVP models are installed. These are not + included in this repository, but can be downloaded by the script + fvp/get_fvps.sh" +) +set(FVP_CONFIG_DIR "${TOOLCHAIN_SOURCE_DIR}/fvp/config" CACHE STRING "The directory in which the FVP models are installed.") +option( + ENABLE_PARALLEL_LIB_CONFIG + "Run the library variant configuration steps in parallel." + ON +) +option( + ENABLE_PARALLEL_LIB_BUILD + "Run the library variant build steps in parallel." + OFF +) +set(PARALLEL_LIB_BUILD_LEVELS + "1" CACHE STRING + "If ENABLE_PARALLEL_LIB_BUILD is ON, this number of processes will be assigned to each variant built." +) +if(NOT CMAKE_GENERATOR MATCHES "Ninja") + if (ENABLE_PARALLEL_LIB_CONFIG OR ENABLE_PARALLEL_LIB_BUILD) + message(WARNING "Library build parallelization should only be enabled with the Ninja generator.") + endif() +endif() + +# If a compiler launcher such as ccache has been set, it should be +# passed down to each subproject build. +set(compiler_launcher_cmake_args "") +if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") +endif() +if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") +endif() + +# Arguments to pass down to the library projects. +foreach(arg + LLVM_BINARY_DIR + FVP_INSTALL_DIR + FVP_CONFIG_DIR +) + if(${arg}) + list(APPEND passthrough_dirs "-D${arg}=${${arg}}") + endif() +endforeach() + +find_package(Python3 REQUIRED COMPONENTS Interpreter) # needed by fetch_*.cmake + +include(ExternalProject) +include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_llvm.cmake) +list(APPEND passthrough_dirs "-DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT}") +if(C_LIBRARY STREQUAL picolibc) + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_picolibc.cmake) + list(APPEND passthrough_dirs "-DFETCHCONTENT_SOURCE_DIR_PICOLIBC=${FETCHCONTENT_SOURCE_DIR_PICOLIBC}") +elseif(C_LIBRARY STREQUAL newlib) + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_newlib.cmake) + list(APPEND passthrough_dirs "-DFETCHCONTENT_SOURCE_DIR_NEWLIB=${FETCHCONTENT_SOURCE_DIR_NEWLIB}") +endif() + +# Target for any dependencies to build the runtimes project. +add_custom_target(runtimes-depends) + +# Create one target to run all the tests. +add_custom_target(check-${C_LIBRARY}) +add_custom_target(check-compiler-rt) +add_custom_target(check-cxx) +add_custom_target(check-cxxabi) +add_custom_target(check-unwind) + +add_custom_target(check-all) +add_dependencies( + check-all + check-${C_LIBRARY} + check-compiler-rt + check-cxx + check-cxxabi + check-unwind +) + +if(ENABLE_PARALLEL_LIB_CONFIG OR ENABLE_PARALLEL_LIB_BUILD) + # Additional targets to build the variant subprojects in parallel. + # The build steps can use multible jobs to compile in parallel, but + # the configuration steps are largely single threaded. This creates a + # bottleneck if each variant is built in series. + # It is significantly faster to run all the subproject configuration + # steps in parallel, run the build steps, then run the next set of + # configuration steps in parallel, etc. + set( + subtargets + compiler_rt-configure + compiler_rt-build + clib-configure + clib-build + cxxlibs-configure + cxxlibs-build + ) + set(subtarget_deps none ${subtargets}) + list(REMOVE_AT subtarget_deps 6) + + foreach(subtarget subtarget_dep IN ZIP_LISTS subtargets subtarget_deps) + add_custom_target(${subtarget}-all) + if(NOT subtarget_dep STREQUAL "none") + add_dependencies(${subtarget}-all ${subtarget_dep}-all) + endif() + endforeach() +endif() + +# Read the JSON file to load a multilib configuration. +file(READ ${MULTILIB_JSON} multilib_json_str) +string(JSON multilib_defs GET ${multilib_json_str} "libs") + +string(JSON lib_count LENGTH ${multilib_defs}) +math(EXPR lib_count_dec "${lib_count} - 1") + +foreach(lib_idx RANGE ${lib_count_dec}) + string(JSON lib_def GET ${multilib_defs} ${lib_idx}) + string(JSON variant GET ${lib_def} "variant") + set(additional_cmake_args "") + + # If a variant doesn't support all possible C library + # options, check if it should be skipped. + string(JSON variant_support ERROR_VARIABLE json_error GET ${lib_def} "libraries_supported") + if(NOT variant_support STREQUAL "libraries_supported-NOTFOUND") + # Replace colons with semi-colons so CMake comprehends the list. + string(REPLACE "," ";" variant_support ${variant_support}) + if(NOT C_LIBRARY IN_LIST variant_support) + continue() + endif() + endif() + + if(variant IN_LIST ENABLE_VARIANTS OR ENABLE_VARIANTS STREQUAL "all") + string(JSON variant_multilib_flags GET ${lib_def} "flags") + # Placeholder libraries won't have a json, so store the error in + # a variable so a fatal error isn't generated. + string(JSON variant_json ERROR_VARIABLE json_error GET ${lib_def} "json") + + if(NOT variant_json STREQUAL "json-NOTFOUND") + # Sort by target triple + if(variant MATCHES "^aarch64") + set(parent_dir_name aarch64-none-elf) + else() + set(parent_dir_name arm-none-eabi) + endif() + set(destination_directory "${CMAKE_CURRENT_BINARY_DIR}/multilib/${parent_dir_name}/${variant}") + install( + DIRECTORY ${destination_directory} + DESTINATION ${parent_dir_name} + ) + set(variant_json_file ${CMAKE_CURRENT_SOURCE_DIR}/json/variants/${variant_json}) + + # Read info from the variant specific json. + file(READ ${variant_json_file} variant_json_str) + string(JSON test_executor GET ${variant_json_str} "args" "common" "TEST_EXECUTOR") + + # 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") + set(read_ENABLE_LIBCXX_TESTS "OFF") + else() + # From the json, check which tests are enabled. + foreach(test_enable_var + ENABLE_LIBC_TESTS + ENABLE_COMPILER_RT_TESTS + ENABLE_LIBCXX_TESTS + ) + string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" ${C_LIBRARY} ${test_enable_var}) + if(read_${test_enable_var} STREQUAL "json-NOTFOUND") + string(JSON read_${test_enable_var} ERROR_VARIABLE json_error GET ${variant_json_str} "args" "common" ${test_enable_var}) + if(read_${test_enable_var} STREQUAL "json-NOTFOUND") + set(read_${test_enable_var} "OFF") + endif() + endif() + endforeach() + endif() + + ExternalProject_Add( + runtimes-${variant} + PREFIX ${CMAKE_BINARY_DIR}/lib-builds + SOURCE_DIR ${TOOLCHAIN_SOURCE_DIR}/arm-runtimes + INSTALL_DIR ${destination_directory} + DEPENDS runtimes-depends + CMAKE_ARGS + ${compiler_launcher_cmake_args} + ${passthrough_dirs} + ${additional_cmake_args} + -DVARIANT_JSON=${variant_json_file} + -DC_LIBRARY=${C_LIBRARY} + -DCMAKE_INSTALL_PREFIX= + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE FALSE + USES_TERMINAL_BUILD TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + ) + + if(ENABLE_PARALLEL_LIB_CONFIG OR ENABLE_PARALLEL_LIB_BUILD) + # Create additional steps to configure/build the subprojects. + # These are collected to be run together, so that all the + # configuration steps can be run in parallel. + # Each step should depend on the previous, with the first depending on the pre-defined + # 'configure' step, and the pre-defined 'build' step depending on the last. + set(subtarget_deps configure ${subtargets} build) + list(SUBLIST subtarget_deps 0 6 subtarget_dependees) + list(SUBLIST subtarget_deps 2 6 subtarget_dependers) + + # First loop to add the steps and targets. + foreach(subtarget subtarget_dependee IN ZIP_LISTS subtargets subtarget_dependees) + # Enabling USES_TERMINAL puts the step in Ninja's "console" job pool, which + # prevents the steps from being run in parallel since each must be given + # exclusive access to the terminal. When disabled, the console won't be updated + # with any output from the step until it completes. + set(step_uses_terminal ON) + set(step_extra_env "") + if(${subtarget} MATCHES "-configure$" AND ENABLE_PARALLEL_LIB_CONFIG) + set(step_uses_terminal OFF) + elseif(${subtarget} MATCHES "-build$" AND ENABLE_PARALLEL_LIB_BUILD) + set(step_uses_terminal OFF) + set(step_extra_env ${CMAKE_COMMAND} -E env CMAKE_BUILD_PARALLEL_LEVEL=${PARALLEL_LIB_BUILD_LEVELS}) + endif() + ExternalProject_Add_Step( + runtimes-${variant} + ${subtarget} + COMMAND ${step_extra_env} ${CMAKE_COMMAND} --build --target ${subtarget} + DEPENDEES ${subtarget_dependee} + DEPENDERS build + USES_TERMINAL ${step_uses_terminal} + ) + ExternalProject_Add_StepTargets(runtimes-${variant} ${subtarget}) + add_dependencies(${subtarget}-all runtimes-${variant}-${subtarget}) + endforeach() + + # Second loop to set the steps that will depend on the new targets. + foreach(subtarget subtarget_depender IN ZIP_LISTS subtargets subtarget_dependers) + ExternalProject_Add_StepDependencies( + runtimes-${variant} + ${subtarget_depender} + ${subtarget}-all + ) + endforeach() + endif() + + # Add custom check targets. + set(check_targets "") + if(read_ENABLE_LIBC_TESTS) + list(APPEND check_targets check-${C_LIBRARY}) + endif() + if(read_ENABLE_COMPILER_RT_TESTS) + list(APPEND check_targets check-compiler-rt) + endif() + if(read_ENABLE_LIBCXX_TESTS) + list(APPEND check_targets check-cxx) + list(APPEND check_targets check-cxxabi) + list(APPEND check_targets check-unwind) + endif() + foreach(check_target ${check_targets}) + ExternalProject_Add_Step( + runtimes-${variant} + ${check_target} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(runtimes-${variant} ${check_target}) + ExternalProject_Add_StepDependencies( + runtimes-${variant} + ${check_target} + runtimes-${variant}-build + ) + add_custom_target(${check_target}-${variant}) + add_dependencies(${check_target} runtimes-${variant}-${check_target}) + add_dependencies(${check_target}-${variant} runtimes-${variant}-${check_target}) + endforeach() + + # Add the variant to the multilib yaml + string(APPEND multilib_yaml_content "- Dir: ${parent_dir_name}/${variant}\n") + string(APPEND multilib_yaml_content " Flags:\n") + string(REPLACE " " ";" multilib_flags_list ${variant_multilib_flags}) + foreach(flag ${multilib_flags_list}) + string(APPEND multilib_yaml_content " - ${flag}\n") + endforeach() + string(APPEND multilib_yaml_content " Group: stdlibs\n") + else() + # In place of a json, an error message is expected. + string(JSON variant_error_msg GET ${lib_def} "error") + + string(APPEND multilib_yaml_content "- Error: \"${variant_error_msg}\"\n") + string(APPEND multilib_yaml_content " Flags:\n") + string(REPLACE " " ";" multilib_flags_list ${variant_multilib_flags}) + foreach(flag ${multilib_flags_list}) + string(APPEND multilib_yaml_content " - ${flag}\n") + endforeach() + string(APPEND multilib_yaml_content " Group: stdlibs\n") + endif() + endif() + +endforeach() + +# Multilib file is generated in two parts. +# 1. Template is filled with multilib flags from json +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/multilib.yaml.in + ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml + @ONLY +) + +# 2. multilib-generate.py maps compiler command line options to flags +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml + COMMAND ${Python3_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/multilib-generate.py" + "--clang=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}" + "--llvm-source=${FETCHCONTENT_SOURCE_DIR_LLVMPROJECT}" + >> ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml +) + +# Combine the two parts. +add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml + COMMAND + ${CMAKE_COMMAND} -E cat + ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml + ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml + > ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/multilib-without-fpus.yaml + ${CMAKE_CURRENT_BINARY_DIR}/multilib-fpus.yaml +) + +add_custom_target(multilib-yaml ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/multilib/multilib.yaml + DESTINATION . +) diff --git a/arm-multilib/json/multilib.json b/arm-multilib/json/multilib.json new file mode 100644 index 00000000..06d36616 --- /dev/null +++ b/arm-multilib/json/multilib.json @@ -0,0 +1,423 @@ +{ + "libs": [ + { + "variant": "aarch64a_exn_rtti", + "json": "aarch64a_exn_rtti.json", + "flags": "--target=aarch64-unknown-none-elf" + }, + { + "variant": "aarch64a", + "json": "aarch64a.json", + "flags": "--target=aarch64-unknown-none-elf -fno-exceptions -fno-rtti" + }, + { + "variant": "aarch64a_be_exn_rtti", + "json": "aarch64a_be_exn_rtti.json", + "flags": "--target=aarch64_be-unknown-none-elf" + }, + { + "variant": "aarch64a_be", + "json": "aarch64a_be.json", + "flags": "--target=aarch64_be-unknown-none-elf -fno-exceptions -fno-rtti" + }, + { + "variant": "aarch64a_strictalign_exn_rtti", + "json": "aarch64a_strictalign_exn_rtti.json", + "flags": "--target=aarch64-unknown-none-elf -mno-unaligned-access" + }, + { + "variant": "aarch64a_strictalign", + "json": "aarch64a_strictalign.json", + "flags": "--target=aarch64-unknown-none-elf -mno-unaligned-access -fno-exceptions -fno-rtti" + }, + { + "variant": "aarch64a_soft_nofp_exn_rtti", + "json": "aarch64a_soft_nofp_exn_rtti.json", + "flags": "--target=aarch64-unknown-none-elf -march=armvX+nofp -march=armvX+nosimd -mabi=aapcs-soft", + "libraries_supported": "picolibc,newlib" + }, + { + "variant": "aarch64a_soft_nofp", + "json": "aarch64a_soft_nofp.json", + "flags": "--target=aarch64-unknown-none-elf -march=armvX+nofp -march=armvX+nosimd -mabi=aapcs-soft -fno-exceptions -fno-rtti", + "libraries_supported": "picolibc,newlib" + }, + { + "variant": "aarch64a_be_soft_nofp_exn_rtti", + "json": "aarch64a_be_soft_nofp_exn_rtti.json", + "flags": "--target=aarch64_be-unknown-none-elf -march=armvX+nofp -march=armvX+nosimd -mabi=aapcs-soft", + "libraries_supported": "picolibc,newlib" + }, + { + "variant": "aarch64a_be_soft_nofp", + "json": "aarch64a_be_soft_nofp.json", + "flags": "--target=aarch64_be-unknown-none-elf -march=armvX+nofp -march=armvX+nosimd -mabi=aapcs-soft -fno-exceptions -fno-rtti", + "libraries_supported": "picolibc,newlib" + }, + { + "variant": "armv4t_exn_rtti", + "json": "armv4t_exn_rtti.json", + "flags": "--target=armv4t-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv4t", + "json": "armv4t.json", + "flags": "--target=armv4t-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv5te_exn_rtti", + "json": "armv5te_exn_rtti.json", + "flags": "--target=armv5e-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv5te", + "json": "armv5te.json", + "flags": "--target=armv5e-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv6m_soft_nofp_exn_rtti_unaligned", + "json": "armv6m_soft_nofp_exn_rtti_unaligned.json", + "flags": "--target=thumbv6m-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv6m_soft_nofp_exn_rtti", + "json": "armv6m_soft_nofp_exn_rtti.json", + "flags": "--target=thumbv6m-unknown-none-eabi -mfpu=none -mno-unaligned-access" + }, + { + "variant": "armv6m_soft_nofp_unaligned", + "json": "armv6m_soft_nofp_unaligned.json", + "flags": "--target=thumbv6m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv6m_soft_nofp", + "json": "armv6m_soft_nofp.json", + "flags": "--target=thumbv6m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armebv6m_soft_nofp_exn_rtti", + "json": "armebv6m_soft_nofp_exn_rtti.json", + "flags": "--target=thumbebv6m-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armebv6m_soft_nofp", + "json": "armebv6m_soft_nofp.json", + "flags": "--target=thumbebv6m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_soft_nofp_exn_rtti_unaligned", + "json": "armv7a_soft_nofp_exn_rtti_unaligned.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv7a_soft_nofp_exn_rtti", + "json": "armv7a_soft_nofp_exn_rtti.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=none -mno-unaligned-access" + }, + { + "variant": "armv7a_soft_nofp_unaligned", + "json": "armv7a_soft_nofp_unaligned.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_soft_nofp", + "json": "armv7a_soft_nofp.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7a_hard_vfpv3_d16_exn_rtti_unaligned", + "json": "armv7a_hard_vfpv3_d16_exn_rtti_unaligned.json", + "flags": "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16" + }, + { + "variant": "armv7a_hard_vfpv3_d16_exn_rtti", + "json": "armv7a_hard_vfpv3_d16_exn_rtti.json", + "flags": "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16 -mno-unaligned-access" + }, + { + "variant": "armv7a_hard_vfpv3_d16_unaligned", + "json": "armv7a_hard_vfpv3_d16_unaligned.json", + "flags": "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_hard_vfpv3_d16", + "json": "armv7a_hard_vfpv3_d16.json", + "flags": "--target=armv7-unknown-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7a_soft_vfpv3_d16_exn_rtti_unaligned", + "json": "armv7a_soft_vfpv3_d16_exn_rtti_unaligned.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16" + }, + { + "variant": "armv7a_soft_vfpv3_d16_exn_rtti", + "json": "armv7a_soft_vfpv3_d16_exn_rtti.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16 -mno-unaligned-access" + }, + { + "variant": "armv7a_soft_vfpv3_d16_unaligned", + "json": "armv7a_soft_vfpv3_d16_unaligned.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7a_soft_vfpv3_d16", + "json": "armv7a_soft_vfpv3_d16.json", + "flags": "--target=armv7-unknown-none-eabi -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7r_soft_nofp_exn_rtti_unaligned", + "json": "armv7r_soft_nofp_exn_rtti_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv7r_soft_nofp_exn_rtti", + "json": "armv7r_soft_nofp_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=none -mno-unaligned-access" + }, + { + "variant": "armv7r_soft_nofp_unaligned", + "json": "armv7r_soft_nofp_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_soft_nofp", + "json": "armv7r_soft_nofp.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7r_hard_vfpv3xd_exn_rtti_unaligned", + "json": "armv7r_hard_vfpv3xd_exn_rtti_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd" + }, + { + "variant": "armv7r_hard_vfpv3xd_exn_rtti", + "json": "armv7r_hard_vfpv3xd_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd -mno-unaligned-access" + }, + { + "variant": "armv7r_hard_vfpv3xd_unaligned", + "json": "armv7r_hard_vfpv3xd_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_hard_vfpv3xd", + "json": "armv7r_hard_vfpv3xd.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7r_hard_vfpv3_d16_exn_rtti_unaligned", + "json": "armv7r_hard_vfpv3_d16_exn_rtti_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16" + }, + { + "variant": "armv7r_hard_vfpv3_d16_exn_rtti", + "json": "armv7r_hard_vfpv3_d16_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16 -mno-unaligned-access" + }, + { + "variant": "armv7r_hard_vfpv3_d16_unaligned", + "json": "armv7r_hard_vfpv3_d16_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_hard_vfpv3_d16", + "json": "armv7r_hard_vfpv3_d16.json", + "flags": "--target=armv7r-unknown-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7r_soft_vfpv3xd_exn_rtti_unaligned", + "json": "armv7r_soft_vfpv3xd_exn_rtti_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd" + }, + { + "variant": "armv7r_soft_vfpv3xd_exn_rtti", + "json": "armv7r_soft_vfpv3xd_exn_rtti.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd -mno-unaligned-access" + }, + { + "variant": "armv7r_soft_vfpv3xd_unaligned", + "json": "armv7r_soft_vfpv3xd_unaligned.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7r_soft_vfpv3xd", + "json": "armv7r_soft_vfpv3xd.json", + "flags": "--target=armv7r-unknown-none-eabi -mfpu=vfpv3xd -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned", + "json": "armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16" + }, + { + "variant": "armv7m_soft_fpv4_sp_d16_exn_rtti", + "json": "armv7m_soft_fpv4_sp_d16_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16 -mno-unaligned-access" + }, + { + "variant": "armv7m_soft_fpv4_sp_d16_unaligned", + "json": "armv7m_soft_fpv4_sp_d16_unaligned.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_soft_fpv4_sp_d16", + "json": "armv7m_soft_fpv4_sp_d16.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7m_hard_fpv4_sp_d16_exn_rtti_unaligned", + "json": "armv7m_hard_fpv4_sp_d16_exn_rtti_unaligned.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16" + }, + { + "variant": "armv7m_hard_fpv4_sp_d16_exn_rtti", + "json": "armv7m_hard_fpv4_sp_d16_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16 -mno-unaligned-access" + }, + { + "variant": "armv7m_hard_fpv4_sp_d16_unaligned", + "json": "armv7m_hard_fpv4_sp_d16_unaligned.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_hard_fpv4_sp_d16", + "json": "armv7m_hard_fpv4_sp_d16.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv7m_hard_fpv5_d16_exn_rtti", + "json": "armv7m_hard_fpv5_d16_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv5-d16" + }, + { + "variant": "armv7m_hard_fpv5_d16", + "json": "armv7m_hard_fpv5_d16.json", + "flags": "--target=thumbv7m-unknown-none-eabihf -mfpu=fpv5-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_soft_nofp_exn_rtti_unaligned", + "json": "armv7m_soft_nofp_exn_rtti_unaligned.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv7m_soft_nofp_exn_rtti", + "json": "armv7m_soft_nofp_exn_rtti.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=none -mno-unaligned-access" + }, + { + "variant": "armv7m_soft_nofp_unaligned", + "json": "armv7m_soft_nofp_unaligned.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv7m_soft_nofp", + "json": "armv7m_soft_nofp.json", + "flags": "--target=thumbv7m-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access" + }, + { + "variant": "armv8m.main_soft_nofp_exn_rtti", + "json": "armv8m.main_soft_nofp_exn_rtti.json", + "flags": "--target=thumbv8m.main-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv8m.main_soft_nofp", + "json": "armv8m.main_soft_nofp.json", + "flags": "--target=thumbv8m.main-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8m.main_hard_fp_exn_rtti", + "json": "armv8m.main_hard_fp_exn_rtti.json", + "flags": "--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16" + }, + { + "variant": "armv8m.main_hard_fp", + "json": "armv8m.main_hard_fp.json", + "flags": "--target=thumbv8m.main-unknown-none-eabihf -mfpu=fpv5-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve_exn_rtti", + "json": "armv8.1m.main_soft_nofp_nomve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none" + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve", + "json": "armv8.1m.main_soft_nofp_nomve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve_exn_rtti", + "json": "armv8.1m.main_hard_fp_nomve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve", + "json": "armv8.1m.main_hard_fp_nomve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve_exn_rtti", + "json": "armv8.1m.main_hard_fpdp_nomve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve", + "json": "armv8.1m.main_hard_fpdp_nomve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve_exn_rtti", + "json": "armv8.1m.main_hard_nofp_mve_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve", + "json": "armv8.1m.main_hard_nofp_mve.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_softfp_nomve", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -march=thumbv8.1m.main+mve", + "error": "No library available for MVE with soft-float ABI. Try -mfloat-abi=hard." + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_soft_nofp_nomve_pacret_bti", + "json": "armv8.1m.main_soft_nofp_nomve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabi -mfpu=none -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_hard_fp_nomve_pacret_bti", + "json": "armv8.1m.main_hard_fp_nomve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_hard_fpdp_nomve_pacret_bti", + "json": "armv8.1m.main_hard_fpdp_nomve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti", + "json": "armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -mbranch-protection=pac-ret+bti" + }, + { + "variant": "armv8.1m.main_hard_nofp_mve_pacret_bti", + "json": "armv8.1m.main_hard_nofp_mve_pacret_bti.json", + "flags": "--target=thumbv8.1m.main-unknown-none-eabihf -march=thumbv8.1m.main+mve -mfpu=none -mbranch-protection=pac-ret+bti -fno-exceptions -fno-rtti" + } + ] +} diff --git a/arm-multilib/json/variants/aarch64a.json b/arm-multilib/json/variants/aarch64a.json new file mode 100644 index 00000000..0ab62191 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a", + "COMPILE_FLAGS": "-march=armv8-a", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "virt", + "QEMU_CPU": "cortex-a57", + "BOOT_FLASH_ADDRESS": "0x40000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x40001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x41000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/aarch64a_be.json b/arm-multilib/json/variants/aarch64a_be.json new file mode 100644 index 00000000..eba9806c --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_be.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_be", + "COMPILE_FLAGS": "-march=armv8-a -mbig-endian -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "aem-a", + "FVP_CONFIG": "v8a-aarch64 big-endian", + "BOOT_FLASH_ADDRESS": "0x80000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x81000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_be_exn_rtti.json b/arm-multilib/json/variants/aarch64a_be_exn_rtti.json new file mode 100644 index 00000000..33b77da5 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_be_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_be_exn_rtti", + "COMPILE_FLAGS": "-march=armv8-a -mbig-endian -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "aem-a", + "FVP_CONFIG": "v8a-aarch64 big-endian", + "BOOT_FLASH_ADDRESS": "0x80000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x81000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_be_soft_nofp.json b/arm-multilib/json/variants/aarch64a_be_soft_nofp.json new file mode 100644 index 00000000..378d6017 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_be_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_be_soft_nofp", + "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mbig-endian -mabi=aapcs-soft -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "aem-a", + "FVP_CONFIG": "v8a-aarch64 big-endian", + "BOOT_FLASH_ADDRESS": "0x80000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x81000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..f4fc47d0 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_be_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_be_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mbig-endian -mabi=aapcs-soft -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "aem-a", + "FVP_CONFIG": "v8a-aarch64 big-endian", + "BOOT_FLASH_ADDRESS": "0x80000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x81000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_exn_rtti.json b/arm-multilib/json/variants/aarch64a_exn_rtti.json new file mode 100644 index 00000000..c94e97ce --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_exn_rtti", + "COMPILE_FLAGS": "-march=armv8-a", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "virt", + "QEMU_CPU": "cortex-a57", + "BOOT_FLASH_ADDRESS": "0x40000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x40001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x41000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/aarch64a_soft_nofp.json b/arm-multilib/json/variants/aarch64a_soft_nofp.json new file mode 100644 index 00000000..4eb508a3 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_soft_nofp", + "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mabi=aapcs-soft -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "virt", + "QEMU_CPU": "cortex-a57", + "BOOT_FLASH_ADDRESS": "0x40000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x40001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x41000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..90e703e6 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-march=armv8-a+nofp+nosimd -mabi=aapcs-soft -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "virt", + "QEMU_CPU": "cortex-a57", + "BOOT_FLASH_ADDRESS": "0x40000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x40001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x41000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_strictalign.json b/arm-multilib/json/variants/aarch64a_strictalign.json new file mode 100644 index 00000000..98cc33c1 --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_strictalign.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_strictalign", + "COMPILE_FLAGS": "-march=armv8-a -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "aem-a", + "FVP_CONFIG": "v8a-aarch64", + "BOOT_FLASH_ADDRESS": "0x80000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x81000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/aarch64a_strictalign_exn_rtti.json b/arm-multilib/json/variants/aarch64a_strictalign_exn_rtti.json new file mode 100644 index 00000000..1f579b9c --- /dev/null +++ b/arm-multilib/json/variants/aarch64a_strictalign_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "aarch64a", + "VARIANT": "aarch64a_strictalign_exn_rtti", + "COMPILE_FLAGS": "-march=armv8-a -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "aem-a", + "FVP_CONFIG": "v8a-aarch64", + "BOOT_FLASH_ADDRESS": "0x80000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80001000", + "FLASH_SIZE": "0xfff000", + "RAM_ADDRESS": "0x81000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "8K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armebv6m_soft_nofp.json b/arm-multilib/json/variants/armebv6m_soft_nofp.json new file mode 100644 index 00000000..c7277cb7 --- /dev/null +++ b/arm-multilib/json/variants/armebv6m_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armebv6m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mbig-endian -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-big-endian m-nofp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armebv6m_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armebv6m_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..bea48b3d --- /dev/null +++ b/arm-multilib/json/variants/armebv6m_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armebv6m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mbig-endian -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-big-endian m-nofp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv4t.json b/arm-multilib/json/variants/armv4t.json new file mode 100644 index 00000000..83a4553d --- /dev/null +++ b/arm-multilib/json/variants/armv4t.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv4t", + "VARIANT": "armv4t", + "COMPILE_FLAGS": "-march=armv4t -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "ti925t", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv4t_exn_rtti.json b/arm-multilib/json/variants/armv4t_exn_rtti.json new file mode 100644 index 00000000..a3378033 --- /dev/null +++ b/arm-multilib/json/variants/armv4t_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv4t", + "VARIANT": "armv4t_exn_rtti", + "COMPILE_FLAGS": "-march=armv4t -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "ti925t", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv5te.json b/arm-multilib/json/variants/armv5te.json new file mode 100644 index 00000000..55c7b4a1 --- /dev/null +++ b/arm-multilib/json/variants/armv5te.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv5te", + "VARIANT": "armv5te", + "COMPILE_FLAGS": "-march=armv5te -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "arm926", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv5te_exn_rtti.json b/arm-multilib/json/variants/armv5te_exn_rtti.json new file mode 100644 index 00000000..1585384c --- /dev/null +++ b/arm-multilib/json/variants/armv5te_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv5te", + "VARIANT": "armv5te_exn_rtti", + "COMPILE_FLAGS": "-march=armv5te -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "arm926", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv6m_soft_nofp.json b/arm-multilib/json/variants/armv6m_soft_nofp.json new file mode 100644 index 00000000..36c55ca7 --- /dev/null +++ b/arm-multilib/json/variants/armv6m_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armv6m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an385", + "QEMU_CPU": "cortex-m3", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..0efd1605 --- /dev/null +++ b/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armv6m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an385", + "QEMU_CPU": "cortex-m3", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti_unaligned.json new file mode 100644 index 00000000..0821eb18 --- /dev/null +++ b/arm-multilib/json/variants/armv6m_soft_nofp_exn_rtti_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armv6m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an385", + "QEMU_CPU": "cortex-m3", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv6m_soft_nofp_unaligned.json b/arm-multilib/json/variants/armv6m_soft_nofp_unaligned.json new file mode 100644 index 00000000..f1548a50 --- /dev/null +++ b/arm-multilib/json/variants/armv6m_soft_nofp_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv6m", + "VARIANT": "armv6m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv6m -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an385", + "QEMU_CPU": "cortex-m3", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json new file mode 100644 index 00000000..66cc3b06 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_hard_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json new file mode 100644 index 00000000..db259c65 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_hard_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti_unaligned.json new file mode 100644 index 00000000..734461df --- /dev/null +++ b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_hard_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_unaligned.json b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_unaligned.json new file mode 100644 index 00000000..e801a409 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_hard_vfpv3_d16_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_hard_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_nofp.json b/arm-multilib/json/variants/armv7a_soft_nofp.json new file mode 100644 index 00000000..d75d85c6 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_nofp.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a7", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..e706f465 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a7", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti_unaligned.json new file mode 100644 index 00000000..2857e3f3 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_nofp_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a7", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_nofp_unaligned.json b/arm-multilib/json/variants/armv7a_soft_nofp_unaligned.json new file mode 100644 index 00000000..cb67b50d --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_nofp_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a7", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json new file mode 100644 index 00000000..ff464f0c --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json new file mode 100644 index 00000000..c5c08bd4 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti_unaligned.json new file mode 100644 index 00000000..bda4401a --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_unaligned.json b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_unaligned.json new file mode 100644 index 00000000..734945b6 --- /dev/null +++ b/arm-multilib/json/variants/armv7a_soft_vfpv3_d16_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7a", + "VARIANT": "armv7a_soft_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7a -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-a8", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json new file mode 100644 index 00000000..e3d3c8de --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv4_sp_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json new file mode 100644 index 00000000..09ac08ae --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv4_sp_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti_unaligned.json new file mode 100644 index 00000000..8c0d32f6 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_exn_rtti_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv4_sp_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_unaligned.json b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_unaligned.json new file mode 100644 index 00000000..443d3375 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv4_sp_d16_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv4_sp_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv5_d16.json b/arm-multilib/json/variants/armv7m_hard_fpv5_d16.json new file mode 100644 index 00000000..a2b708e6 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv5_d16.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv5_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv5-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an500", + "QEMU_CPU": "cortex-m7", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x60600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json b/arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json new file mode 100644 index 00000000..81c246e4 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_hard_fpv5_d16_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_hard_fpv5_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7m -mfpu=fpv5-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an500", + "QEMU_CPU": "cortex-m7", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x60600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json new file mode 100644 index 00000000..87765063 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_fpv4_sp_d16", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json new file mode 100644 index 00000000..aeab1910 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_fpv4_sp_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned.json new file mode 100644 index 00000000..a28dece2 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_fpv4_sp_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_unaligned.json b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_unaligned.json new file mode 100644 index 00000000..014a5c32 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_fpv4_sp_d16_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_fpv4_sp_d16", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7m -mfpu=fpv4-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_nofp.json b/arm-multilib/json/variants/armv7m_soft_nofp.json new file mode 100644 index 00000000..70cf7d6d --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7m -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..fdd35710 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7m -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti_unaligned.json new file mode 100644 index 00000000..f024ba55 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_nofp_exn_rtti_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7m -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7m_soft_nofp_unaligned.json b/arm-multilib/json/variants/armv7m_soft_nofp_unaligned.json new file mode 100644 index 00000000..0d2033a6 --- /dev/null +++ b/arm-multilib/json/variants/armv7m_soft_nofp_unaligned.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7m", + "VARIANT": "armv7m_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7m -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an386", + "QEMU_CPU": "cortex-m4", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x21000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x21600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "minsize", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json new file mode 100644 index 00000000..5a933877 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json new file mode 100644 index 00000000..7a376aa2 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16 -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti_unaligned.json new file mode 100644 index 00000000..148424be --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3_d16_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_unaligned.json b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_unaligned.json new file mode 100644 index 00000000..a3d4fc7d --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3_d16_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3_d16", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3xd.json b/arm-multilib/json/variants/armv7r_hard_vfpv3xd.json new file mode 100644 index 00000000..09a16606 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3xd.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3xd", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json new file mode 100644 index 00000000..b2a8273c --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3xd_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti_unaligned.json new file mode 100644 index 00000000..6b06f628 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3xd_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_hard_vfpv3xd_unaligned.json b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_unaligned.json new file mode 100644 index 00000000..3eeb40e9 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_hard_vfpv3xd_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_hard_vfpv3xd", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_nofp.json b/arm-multilib/json/variants/armv7r_soft_nofp.json new file mode 100644 index 00000000..411bbf8f --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_nofp.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7r -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..a25aefc3 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7r -mfpu=none -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti_unaligned.json new file mode 100644 index 00000000..e8973e3a --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_nofp_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7r -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7r_soft_nofp_unaligned.json b/arm-multilib/json/variants/armv7r_soft_nofp_unaligned.json new file mode 100644 index 00000000..20b04ba6 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_nofp_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7r -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} diff --git a/arm-multilib/json/variants/armv7r_soft_vfpv3xd.json b/arm-multilib/json/variants/armv7r_soft_vfpv3xd.json new file mode 100644 index 00000000..efcbb86c --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_vfpv3xd.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_vfpv3xd", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json new file mode 100644 index 00000000..219368fe --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_vfpv3xd_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd -mno-unaligned-access", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti_unaligned.json b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti_unaligned.json new file mode 100644 index 00000000..cbdf3924 --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_exn_rtti_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_vfpv3xd_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv7r_soft_vfpv3xd_unaligned.json b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_unaligned.json new file mode 100644 index 00000000..6940c0de --- /dev/null +++ b/arm-multilib/json/variants/armv7r_soft_vfpv3xd_unaligned.json @@ -0,0 +1,41 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv7r", + "VARIANT": "armv7r_soft_vfpv3xd", + "COMPILE_FLAGS": "-mfloat-abi=softfp -march=armv7r -mfpu=vfpv3xd", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "none", + "QEMU_CPU": "cortex-r5f", + "QEMU_PARAMS": "-m 1G", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x20000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x21000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "ON", + "ENABLE_LIBCXX_TESTS": "ON" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json new file mode 100644 index 00000000..ddbe52d2 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json new file mode 100644 index 00000000..6d02e766 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json new file mode 100644 index 00000000..8e9e8f78 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json new file mode 100644 index 00000000..ec4110e8 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-sp-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json new file mode 100644 index 00000000..fb28a2a7 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json new file mode 100644 index 00000000..b81fd001 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve -mfpu=fp-armv8-fullfp16-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json new file mode 100644 index 00000000..24fd0d09 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json new file mode 100644 index 00000000..cef3207b --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_fpdp_nomve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+nomve+pacbti -mfpu=fp-armv8-fullfp16-d16 -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-fp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json new file mode 100644 index 00000000..03133255 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json new file mode 100644 index 00000000..f4c7df92 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json new file mode 100644 index 00000000..3ac88c14 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-int", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json new file mode 100644 index 00000000..40b8811e --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8.1m.main+mve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-int", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json new file mode 100644 index 00000000..b9a7b0a7 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json new file mode 100644 index 00000000..0b898180 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps3-an547", + "QEMU_CPU": "cortex-m55", + "BOOT_FLASH_ADDRESS": "0x00000000", + "BOOT_FLASH_SIZE": "512K", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json new file mode 100644 index 00000000..711e65fc --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve_pacret_bti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json new file mode 100644 index 00000000..451889a4 --- /dev/null +++ b/arm-multilib/json/variants/armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8.1m.main", + "VARIANT": "armv8.1m.main_soft_nofp_nomve_pacret_bti_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8.1m.main+nomve+pacbti -mfpu=none -mbranch-protection=pac-ret+bti", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "fvp", + "FVP_MODEL": "corstone-310", + "FVP_CONFIG": "cortex-m85 m-pacbti m-nofp mve-none", + "BOOT_FLASH_ADDRESS": "0x01000000", + "BOOT_FLASH_SIZE": "2M", + "FLASH_ADDRESS": "0x60000000", + "FLASH_SIZE": "0x1000000", + "RAM_ADDRESS": "0x61000000", + "RAM_SIZE": "0x1000000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_hard_fp.json b/arm-multilib/json/variants/armv8m.main_hard_fp.json new file mode 100644 index 00000000..53f90ba2 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_hard_fp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_hard_fp", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8m.main -mfpu=fpv5-sp-d16", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json b/arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json new file mode 100644 index 00000000..da48ef18 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_hard_fp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_hard_fp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=hard -march=armv8m.main -mfpu=fpv5-sp-d16", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_soft_nofp.json b/arm-multilib/json/variants/armv8m.main_soft_nofp.json new file mode 100644 index 00000000..28f25720 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_soft_nofp.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_soft_nofp", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8m.main -mfpu=none", + "ENABLE_EXCEPTIONS": "OFF", + "ENABLE_RTTI": "OFF", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json b/arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json new file mode 100644 index 00000000..66b69701 --- /dev/null +++ b/arm-multilib/json/variants/armv8m.main_soft_nofp_exn_rtti.json @@ -0,0 +1,40 @@ +{ + "args": { + "common": { + "TARGET_ARCH": "armv8m.main", + "VARIANT": "armv8m.main_soft_nofp_exn_rtti", + "COMPILE_FLAGS": "-mfloat-abi=soft -march=armv8m.main -mfpu=none", + "ENABLE_EXCEPTIONS": "ON", + "ENABLE_RTTI": "ON", + "TEST_EXECUTOR": "qemu", + "QEMU_MACHINE": "mps2-an505", + "QEMU_CPU": "cortex-m33", + "BOOT_FLASH_ADDRESS": "0x10000000", + "BOOT_FLASH_SIZE": "0x1000", + "FLASH_ADDRESS": "0x80000000", + "FLASH_SIZE": "0x600000", + "RAM_ADDRESS": "0x80600000", + "RAM_SIZE": "0xa00000", + "STACK_SIZE": "4K" + }, + "picolibc": { + "PICOLIBC_BUILD_TYPE": "release", + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "ON", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "newlib": { + "ENABLE_CXX_LIBS": "ON", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + }, + "llvmlibc": { + "ENABLE_CXX_LIBS": "OFF", + "ENABLE_LIBC_TESTS": "OFF", + "ENABLE_COMPILER_RT_TESTS": "OFF", + "ENABLE_LIBCXX_TESTS": "OFF" + } + } +} \ No newline at end of file diff --git a/multilib-fpus.py b/arm-multilib/multilib-generate.py similarity index 64% rename from multilib-fpus.py rename to arm-multilib/multilib-generate.py index 992d4873..c7ea84c6 100755 --- a/multilib-fpus.py +++ b/arm-multilib/multilib-generate.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 -"""Auto-generate implications between -mfpu options for multilib.yaml.in. +"""Auto-generate implications between command-line options options for +multilib.yaml.in. Each FPU name that clang knows about is mapped to all the FPU names that clang considers to be a subset of it (determined by extracting @@ -21,6 +22,20 @@ d-registers, because the extra 16 d-registers are caller-saved, so setjmp and exceptions need not preserve them. Interrupt handlers would have to preserve them, but our libraries don't define any. + +For architecture extension modifiers on the -march option, we expand these into +options of the form -march=armvX+[no]feature, for each feature which is listed +as enabled or disabled in the input options. Each of these new options has +exactly one feature, so the multilib file can mark a library as depending on +any set of by matching multiple options. The "armvX" architecture version isn't +a valid option, but that doesn't matter to multilib, and means that we don't +need to repeat the matching for every minor version. + +For architecture versions, we expand -march=armvX.Y-a+features to include every +lower or equal architecture version, so that if, for example, a library +requires armv8.3-a, then a link command targeting any later version will be +able to select it. These generated options don't include the feature modifiers, +which can be matched separately if a library requires them. """ import argparse @@ -28,6 +43,7 @@ import os import shlex import subprocess +from dataclasses import dataclass def get_fpu_list(args): @@ -164,21 +180,7 @@ def get_target_features(args, fpu): return features -def main(): - parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - parser.add_argument( - "--clang", required=True, help="Path to clang executable." - ) - parser.add_argument( - "--llvm-source", - required=True, - help="Path to root of llvm-project source tree.", - ) - args = parser.parse_args() - +def generate_fpus(args): # Collect all the data: make the list of FPU names, and the set of # features that LLVM maps each one to. fpu_features = { @@ -208,7 +210,113 @@ def main(): print(" Flags:") for sub_fpu in subsets: print(" - -mfpu=" + sub_fpu) + print() + + +def get_extension_list(clang, triple): + """Extract the list of architecture extension flags from clang, by running + it with the --print-supported-extensions option.""" + + command = [ + clang, + "--target=" + triple, + "--print-supported-extensions", + ] + + output = subprocess.check_output( + command, stderr=subprocess.STDOUT + ).decode() + + for line in output.split("\n"): + parts = line.split(maxsplit=1) + # The feature lines will look like this, ignore everything else: + # aes FEAT_AES, FEAT_PMULL Enable AES support + if len(parts) == 2 and parts[1].startswith("FEAT_"): + yield parts[0] + + +def generate_extensions(args): + aarch64_features = get_extension_list(args.clang, "aarch64-none-eabi") + aarch32_features = get_extension_list(args.clang, "arm-none-eabi") + all_features = list(aarch64_features) + # Combine the aarch64 and aarch32 lists without duplication. + # Casting to sets and merging would be simpler, but creates + # non-deterministic output. + all_features.extend(feat for feat in list(aarch32_features) if feat not in all_features) + + print("# Expand -march=...+[no]feature... into individual options we can match") + print("# on. We use 'armvX' to represent a feature applied to any architecture, so") + print("# that these don't need to be repeated for every version. Libraries which") + print("# require a particular architecture version or profile should also match on the") + print("# original option to check that.") + + for feature in all_features: + print(f"- Match: -march=armv.*\\+{feature}($|\\+.*)") + print(f" Flags:") + print(f" - -march=armvX+{feature}") + print(f"- Match: -march=armv.*\\+no{feature}($|\\+.*)") + print(f" Flags:") + print(f" - -march=armvX+no{feature}") + print() + + +@dataclass +class Version: + major: int + minor: int + profile: int + + def __str__(self): + if self.minor == 0: + return f"armv{self.major}-{self.profile}" + else: + return f"armv{self.major}.{self.minor}-{self.profile}" + + @property + def all_compatible(self): + yield self + for compat_minor in range(self.minor): + yield Version(self.major, compat_minor, self.profile) + if self.major == 9: + for compat_minor in range(self.minor + 5 + 1): + yield Version(self.major - 1, compat_minor, self.profile) + +def generate_versions(args): + """Generate match blocks which allow selecting a library build for a + lower-version architecture, for the v8.x-A and v9.x-A minor versions.""" + versions = ( + [Version(8, minor, "a") for minor in range(10)] + + [Version(9, minor, "a") for minor in range(6)] + + [Version(8, minor, "r") for minor in range(1)] + ) + + for match_ver in versions: + print(f"- Match: -march={match_ver}.*") + print(f" Flags:") + for compat_ver in match_ver.all_compatible: + print(f" - -march={compat_ver}") + print() + + + +def main(): + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + parser.add_argument( + "--clang", required=True, help="Path to clang executable." + ) + parser.add_argument( + "--llvm-source", + required=True, + help="Path to root of llvm-project source tree.", + ) + args = parser.parse_args() + generate_fpus(args) + generate_extensions(args) + generate_versions(args) if __name__ == "__main__": main() diff --git a/cmake/multilib.yaml.in b/arm-multilib/multilib.yaml.in similarity index 75% rename from cmake/multilib.yaml.in rename to arm-multilib/multilib.yaml.in index 17bf8ab3..5e7c38ba 100644 --- a/cmake/multilib.yaml.in +++ b/arm-multilib/multilib.yaml.in @@ -107,23 +107,57 @@ Mappings: - Match: --target=thumbv7em-unknown-none-eabihf Flags: - --target=thumbv7m-unknown-none-eabihf + +# v7-A and v7-R include the ISA in the triple, but that doesn't matter for +# library selection, so canonicalise Thumb triples to ARM ones. - Match: --target=thumbv7r-unknown-none-eabi Flags: - --target=armv7r-unknown-none-eabi +- Match: --target=thumbv7r-unknown-none-eabihf + Flags: + - --target=armv7r-unknown-none-eabihf +- Match: --target=thumbv7-unknown-none-eabi + Flags: + - --target=armv7-unknown-none-eabi +- Match: --target=thumbv7-unknown-none-eabihf + Flags: + - --target=armv7-unknown-none-eabihf - Match: --target=thumbv4t-unknown-none-eabi Flags: - --target=armv4t-unknown-none-eabi +- Match: --target=thumbv4t-unknown-none-eabihf + Flags: + - --target=armv4t-unknown-none-eabihf - Match: --target=thumbv5e-unknown-none-eabi Flags: - --target=armv5e-unknown-none-eabi +- Match: --target=thumbv5e-unknown-none-eabihf + Flags: + - --target=armv5e-unknown-none-eabihf -# Higher versions of v8-A, and v9-A, are all supersets of v8-A. (And -# of each other, in the obvious way, but we don't have any libraries -# for those at present, so there's no need to generate all their -# flags.) -- Match: --target=armv(8\.[1-9]|9|9\.[1-9])a-unknown-none-eabi +# armv7ve is a GCC name for v7-A with the virtualisation extension, for library +# selection we treat it the same as v7-A. +- Match: --target=(arm|thumb)v7ve-unknown-none-eabi Flags: - - --target=armv8a-unknown-none-eabi + - --target=armv7-unknown-none-eabi +- Match: --target=(arm|thumb)v7ve-unknown-none-eabihf + Flags: + - --target=armv7-unknown-none-eabihf + +# Higher versions of the architecture such as v8-A and v9-A are a superset of +# v7-A. +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])a-unknown-none-eabi + Flags: + - --target=armv7-unknown-none-eabi +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])a-unknown-none-eabihf + Flags: + - --target=armv7-unknown-none-eabihf +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])r-unknown-none-eabi + Flags: + - --target=armv7r-unknown-none-eabi +- Match: --target=(arm|thumb)v(8|8\.[1-9]|9|9\.[1-9])r-unknown-none-eabihf + Flags: + - --target=armv7r-unknown-none-eabihf # -march extensions - Match: -march=thumbv8\.[1-9]m\.main(\+[^\+]+)*\+fp16(\+[^\+]+)* @@ -138,3 +172,8 @@ Mappings: - Match: -march=thumbv8\.[1-9]m\.main(\+[^\+]+)*\+lob(\+[^\+]+)* Flags: - -march=thumbv8.1m.main+lob + +# -mbranch-protection options +- Match: -mbranch-protection=(standard|pac-ret(\+leaf)?(\+bti)?|bti(\+pac-ret(\+leaf)?)?) + Flags: + - -mbranch-protection=pac-ret+bti diff --git a/arm-runtimes/CMakeLists.txt b/arm-runtimes/CMakeLists.txt new file mode 100644 index 00000000..c2aff003 --- /dev/null +++ b/arm-runtimes/CMakeLists.txt @@ -0,0 +1,788 @@ +# +# Copyright (c) 2024, Arm Limited and affiliates. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# CMake build for a library variant, combining a chosen C library +# with builtins from compiler-rt and libcx/libcxxabi/libunwind + +cmake_minimum_required(VERSION 3.20) + +project(arm-runtimes) + +# Root directory of the repo. +set(TOOLCHAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) + +# CMake arguments are loaded from the JSON file depending on which C +# library is used, so this must be set before the JSON is processed. +set(C_LIBRARY "picolibc" CACHE STRING "Which C library to use.") +set_property(CACHE C_LIBRARY PROPERTY STRINGS picolibc newlib llvmlibc) + +set(VARIANT_JSON "" CACHE STRING "JSON file to load args from.") +if(VARIANT_JSON) + file(READ ${VARIANT_JSON} variant_json_read) + # Load arguments common to all libraries. + string(JSON json_args GET ${variant_json_read} "args" "common") + string(JSON json_args_len LENGTH ${json_args}) + math(EXPR json_args_len_dec "${json_args_len} - 1") + foreach(json_idx RANGE ${json_args_len_dec}) + string(JSON json_param MEMBER ${json_args} ${json_idx}) + string(JSON json_val GET ${json_args} ${json_param}) + string(JSON json_val_type TYPE ${json_args} ${json_param}) + set(${json_param}_def ${json_val}) + endforeach() + # Load arguments specific to the chosen library, overwriting any existing values. + string(JSON json_args GET ${variant_json_read} "args" ${C_LIBRARY}) + string(JSON json_args_len LENGTH ${json_args}) + math(EXPR json_args_len_dec "${json_args_len} - 1") + foreach(json_idx RANGE ${json_args_len_dec}) + string(JSON json_param MEMBER ${json_args} ${json_idx}) + string(JSON json_val GET ${json_args} ${json_param}) + string(JSON json_val_type TYPE ${json_args} ${json_param}) + set(${json_param}_def ${json_val}) + endforeach() +endif() + +# Default values will be populated by the json above. +# Any user specified options will override the default. +set(TARGET_ARCH ${TARGET_ARCH_def} CACHE STRING "Architecture being targetted.") +set(VARIANT ${VARIANT_def} CACHE STRING "Name for the variant, usually architecture + suffix.") +set(COMPILE_FLAGS ${COMPILE_FLAGS_def} CACHE STRING "Flags required to build the variant.") +set(TEST_EXECUTOR ${TEST_EXECUTOR_def} CACHE STRING "Program used to run tests.") +set_property(CACHE TEST_EXECUTOR PROPERTY STRINGS fvp qemu) +set(FVP_MODEL ${FVP_MODEL_def} CACHE STRING "FVP model to use, if FVP is the test executor.") +set(FVP_CONFIG ${FVP_CONFIG_def} CACHE STRING "FVP config to use, if FVP is the test executor.") +set( + FVP_INSTALL_DIR + "" CACHE STRING + "The directory in which the FVP models are installed. These are not + included in this repository, but can be downloaded by the script + fvp/get_fvps.sh" +) +set(FVP_CONFIG_DIR "${TOOLCHAIN_SOURCE_DIR}/fvp/config" CACHE STRING "The directory in which the FVP models are installed.") + +set(QEMU_MACHINE ${QEMU_MACHINE_def} CACHE STRING "Machine for QEMU to emulate.") +set(QEMU_CPU ${QEMU_CPU_def} CACHE STRING "CPU for QEMU to emulate.") +set(QEMU_PARAMS ${QEMU_PARAMS_def} CACHE STRING "Any additional parameters to pass to QEMU.") + +set(BOOT_FLASH_ADDRESS ${BOOT_FLASH_ADDRESS_def} CACHE STRING "") +set(BOOT_FLASH_SIZE ${BOOT_FLASH_SIZE_def} CACHE STRING "") +set(FLASH_ADDRESS ${FLASH_ADDRESS_def} CACHE STRING "") +set(FLASH_SIZE ${FLASH_SIZE_def} CACHE STRING "") +set(RAM_ADDRESS ${RAM_ADDRESS_def} CACHE STRING "") +set(RAM_SIZE ${RAM_SIZE_def} CACHE STRING "") +set(STACK_SIZE ${STACK_SIZE_def} CACHE STRING "") + +set(ENABLE_EXCEPTIONS ${ENABLE_EXCEPTIONS_def} CACHE BOOL "Enable C++ exceptions.") +set(ENABLE_RTTI ${ENABLE_RTTI_def} CACHE BOOL "Enable C++ exceptions.") + +set(PICOLIBC_BUILD_TYPE ${PICOLIBC_BUILD_TYPE_def} CACHE STRING "Picolibc configuration to use.") +set_property(CACHE PICOLIBC_BUILD_TYPE PROPERTY STRINGS minsize release) + +set(ENABLE_CXX_LIBS ${ENABLE_CXX_LIBS_def} CACHE BOOL "Build CXX libs") +set(ENABLE_LIBC_TESTS ${ENABLE_LIBC_TESTS_def} CACHE BOOL "Enable libc tests (picolibc, newlib or llvm-libc).") +set(ENABLE_COMPILER_RT_TESTS ${ENABLE_COMPILER_RT_TESTS_def} CACHE BOOL "Enable compiler-rt tests.") +set(ENABLE_LIBCXX_TESTS ${ENABLE_LIBCXX_TESTS_def} CACHE BOOL "Enable libcxx tests.") +set(LLVM_BINARY_DIR "" CACHE PATH "Path to LLVM toolchain root to build libraries with") + +# Temporary location to collect the libraries as they are built. +set(TEMP_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp_install") + +find_package(Python3 REQUIRED COMPONENTS Interpreter) + +include(ExternalProject) +include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_llvm.cmake) + +# If a compiler launcher such as ccache has been set, it should be +# passed down to each subproject build. +set(compiler_launcher_cmake_args "") +if(CMAKE_C_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}") +endif() +if(CMAKE_CXX_COMPILER_LAUNCHER) + list(APPEND compiler_launcher_cmake_args "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}") +endif() + +if(TARGET_ARCH MATCHES "^aarch64") + set(target_triple "aarch64-none-elf") + set(cpu_family aarch64) +else() + # Choose the target triple so that compiler-rt will do the + # right thing. We can't always put the exact target + # architecture in the triple, because compiler-rt's cmake + # system doesn't recognize every possible Arm architecture + # version. So mostly we just say 'arm' and control the arch + # version via -march=armv7m (or whatever). + # Exceptions are architectures pre-armv7, which compiler-rt expects to + # see in the triple because that's where it looks to decide whether to + # use specific assembly sources. + if(TARGET_ARCH MATCHES "^armv[4-6]") + set(target_triple "${TARGET_ARCH}-none-eabi") + else() + set(target_triple "arm-none-eabi") + endif() + if(COMPILE_FLAGS MATCHES "-mfloat-abi=hard") + # Also, compiler-rt looks in the ABI component of the + # triple to decide whether to use the hard float ABI. + set(target_triple "${target_triple}hf") + endif() + set(cpu_family arm) +endif() + +# Create a single target for all testing. If no testing is enabled, this +# will simply do nothing. +add_custom_target(check-all) + +# If any testing is enabled, prepare test executor settings. +if(ENABLE_LIBC_TESTS OR ENABLE_COMPILER_RT_TESTS OR ENABLE_LIBCXX_TESTS) + # Flags required to link tests. + if(C_LIBRARY STREQUAL picolibc) + set(test_link_flags "-nostartfiles -lcrt0-semihost -lsemihost -T picolibcpp.ld") + else() + message(FATAL_ERROR "Tests can only be enabled using picolibc.") + endif() + + if(TEST_EXECUTOR STREQUAL qemu) + if(TARGET_ARCH MATCHES "^aarch64") + find_program(QEMU_EXECUTABLE qemu-system-aarch64 REQUIRED) + else() + find_program(QEMU_EXECUTABLE qemu-system-arm REQUIRED) + endif() + + # Use colon as a separator because comma and semicolon are used for + # other purposes in CMake. + string(REPLACE " " ":" qemu_params_list "${QEMU_PARAMS}") + + set(test_executor_params --qemu-command ${QEMU_EXECUTABLE} --qemu-machine ${QEMU_MACHINE}) + if(QEMU_CPU) + list(APPEND test_executor_params --qemu-cpu ${QEMU_CPU}) + endif() + if(qemu_params_list) + list(APPEND test_executor_params "--qemu-params=${qemu_params_list}") + endif() + set( + lit_test_executor + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py + ${test_executor_params} + ) + elseif(TEST_EXECUTOR STREQUAL fvp) + if(NOT EXISTS "${FVP_INSTALL_DIR}") + message(FATAL_ERROR "FVPs must be installed to run tests using FVPs.") + endif() + set( + test_executor_params + --fvp-install-dir ${FVP_INSTALL_DIR} + --fvp-config-dir ${FVP_CONFIG_DIR} + --fvp-model ${FVP_MODEL} + ) + string(REPLACE " " ";" fvp_config_list ${FVP_CONFIG}) + foreach(cfg ${fvp_config_list}) + set( + test_executor_params + ${test_executor_params} + --fvp-config ${cfg} + ) + endforeach() + set( + lit_test_executor + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-fvp.py + ${test_executor_params} + ) + endif() + list(JOIN lit_test_executor " " lit_test_executor) +endif() + +set(compile_arch_flags "--target=${target_triple} ${COMPILE_FLAGS}") +# Compiling the libraries benefits from some extra optimization +# flags, and requires a sysroot. +set(lib_compile_flags "${compile_arch_flags} -ffunction-sections -fdata-sections -fno-ident --sysroot ${TEMP_LIB_DIR}") + +# Generic target names for the C library. +# Declare these now, since compiler-rt requires the 'install' dependency. +add_custom_target(clib-configure) +add_custom_target(clib-build) +add_custom_target(clib-install) + +############################################################################### +# compiler-rt +############################################################################### + +# We can't always put the exact target +# architecture in the triple, because compiler-rt's cmake +# system doesn't recognize every possible Arm architecture +# version. So mostly we just say 'arm' and control the arch +# version via -march=armv7m (or whatever). +# Exceptions are architectures pre-armv7, which compiler-rt expects to +# see in the triple because that's where it looks to decide whether to +# use specific assembly sources. +if(NOT target_triple MATCHES "^(aarch64-none-elf|arm-none-eabi|armv[4-6])") + message(FATAL_ERROR "\ +Target triple name \"${target_triple}\" not compatible with compiler-rt. +Use -march to specify the architecture.") +endif() +# Also, compiler-rt looks in the ABI component of the +# triple to decide whether to use the hard float ABI. +if(flags MATCHES "-mfloat-abi=hard" AND NOT target_triple MATCHES "-eabihf$") + message(FATAL_ERROR "\ +Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\"") +endif() +string(REPLACE "-none-" "-unknown-none-" normalized_target_triple ${target_triple}) + +# This prevents a test failure due to insufficient available registers. +# TODO: Which test, can this be fixed upstream? +if(VARIANT STREQUAL "armv6m_soft_nofp") + set(compiler_rt_test_flags "${compiler_rt_test_flags} -fomit-frame-pointer") +endif() + +if(ENABLE_COMPILER_RT_TESTS) + set(compiler_rt_test_flags "${lib_compile_flags} ${test_link_flags}") + set(compiler_rt_lit_args "${LLVM_LIT_ARGS} --xunit-xml-output=results.junit.xml") + set( + compiler_rt_test_cmake_args + -DCOMPILER_RT_INCLUDE_TESTS=ON + -DCOMPILER_RT_EMULATOR=${lit_test_executor} + -DCOMPILER_RT_TEST_COMPILER=${LLVM_BINARY_DIR}/bin/clang + -DCOMPILER_RT_TEST_COMPILER_CFLAGS=${compiler_rt_test_flags} + -DLLVM_LIT_ARGS=${compiler_rt_lit_args} + ) +endif() + +ExternalProject_Add( + compiler_rt + SOURCE_DIR ${llvmproject_SOURCE_DIR}/compiler-rt + INSTALL_DIR compiler-rt/install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_COMPILER_TARGET=${target_triple} + -DCMAKE_ASM_FLAGS=${lib_compile_flags} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_CXX_COMPILER_TARGET=${target_triple} + -DCMAKE_CXX_FLAGS=${lib_compile_flags} + -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_C_COMPILER_TARGET=${target_triple} + -DCMAKE_C_FLAGS=${lib_compile_flags} + -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + -DCMAKE_INSTALL_PREFIX= + -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_SYSTEM_NAME=Generic + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + -DCOMPILER_RT_BAREMETAL_BUILD=ON + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF + -DCOMPILER_RT_BUILD_PROFILE=OFF + -DCOMPILER_RT_BUILD_SANITIZERS=OFF + -DCOMPILER_RT_BUILD_XRAY=OFF + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON + -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR} + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON + ${compiler_rt_test_cmake_args} + STEP_TARGETS configure build install + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + INSTALL_COMMAND ${CMAKE_COMMAND} --install . + # Copy compiler-rt lib directory, moving libraries out of their + # target-specific subdirectory. + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + /lib/${normalized_target_triple} + "${TEMP_LIB_DIR}/lib" +) + +add_custom_target(check-compiler-rt) +add_dependencies(check-all check-compiler-rt) +if(ENABLE_COMPILER_RT_TESTS) + ExternalProject_Add_Step( + compiler_rt + check-compiler-rt + COMMAND "${CMAKE_COMMAND}" --build --target check-compiler-rt + COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-compiler-rt-xml.py + --dir + --variant ${VARIANT} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(compiler_rt check-compiler-rt) + ExternalProject_Add_StepDependencies( + compiler_rt + check-compiler-rt + compiler_rt-build + clib-install + ) + add_dependencies(check-compiler-rt compiler_rt-check-compiler-rt) +endif() + +############################################################################### +# picolibc +############################################################################### + +if(C_LIBRARY STREQUAL picolibc) + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_picolibc.cmake) + include(${CMAKE_CURRENT_SOURCE_DIR}/to_meson_list.cmake) + + # For building picolibc use Meson. + # Although picolibc has support for building with CMake, the Meson code + # is more mature and works better with LLVM. + find_program(MESON_EXECUTABLE meson REQUIRED) + + if(CMAKE_INSTALL_MESSAGE STREQUAL NEVER) + set(MESON_INSTALL_QUIET "--quiet") + endif() + + if(PICOLIBC_BUILD_TYPE MATCHES "minsize") + set(newlib_nano_malloc "true") + else() + set(newlib_nano_malloc "false") + endif() + + # TODO: xfail these tests instead of disabling. + if(target_triple MATCHES "^aarch64") + set(enable_picolibc_long_double_test false) + else() + set(enable_picolibc_long_double_test true) + endif() + + # Set meson_c_args to a comma-separated list of the clang path + # and flags e.g. 'path/to/clang', '--target=armv6m-none-eabi', + # '-march=armv6m' + set(picolibc_flags "${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} ${lib_compile_flags}") + if(CMAKE_C_COMPILER_LAUNCHER) + set(picolibc_flags "${CMAKE_C_COMPILER_LAUNCHER} ${picolibc_flags}") + endif() + separate_arguments(picolibc_flags) + to_meson_list("${picolibc_flags}" picolibc_meson_flags) + + if(ENABLE_LIBC_TESTS) + set(picolibc_test_executor_bin ${CMAKE_CURRENT_SOURCE_DIR}/test-support/picolibc-test-wrapper.py) + to_meson_list("${test_executor_params}" meson_test_executor_params) + endif() + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meson-cross-build.txt.in ${CMAKE_CURRENT_BINARY_DIR}/meson-cross-build.txt @ONLY) + + ExternalProject_Add( + picolibc + SOURCE_DIR ${picolibc_SOURCE_DIR} + INSTALL_DIR ${TEMP_LIB_DIR} + DEPENDS compiler_rt-install + CONFIGURE_COMMAND + ${MESON_EXECUTABLE} + setup + -Dincludedir=include + -Dlibdir=lib + -Dspecsdir=none + -Dmultilib=false + -Ddebug=false + -Dtests-enable-stack-protector=false + -Dtest-long-double=${enable_picolibc_long_double_test} + -Dtest-machine=${TEST_EXECUTOR} + -Dnewlib-nano-malloc=${newlib_nano_malloc} + -Dtests=false + --prefix + --cross-file ${CMAKE_CURRENT_BINARY_DIR}/meson-cross-build.txt + --buildtype=${PICOLIBC_BUILD_TYPE} + + BUILD_COMMAND ${MESON_EXECUTABLE} compile + INSTALL_COMMAND ${MESON_EXECUTABLE} install ${MESON_INSTALL_QUIET} + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS configure build install + ) + + add_custom_target(check-picolibc) + add_dependencies(check-all check-picolibc) + if(ENABLE_LIBC_TESTS) + # meson builds the tests at the same time as the library. + # So reconfigure to enable tests at a later point. + ExternalProject_Add_Step( + picolibc + enable-tests + COMMAND ${MESON_EXECUTABLE} setup -Dtests=true --reconfigure + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ) + ExternalProject_Add_StepTargets(picolibc enable-tests) + ExternalProject_Add_StepDependencies( + picolibc + enable-tests + picolibc-build + compiler_rt-install + ) + ExternalProject_Add_Step( + picolibc + check + COMMAND ${MESON_EXECUTABLE} test -C + COMMAND ${Python3_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/test-support/modify-picolibc-xml.py + --dir + --variant ${VARIANT} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(picolibc check) + ExternalProject_Add_StepDependencies( + picolibc + check + picolibc-enable-tests + ) + add_dependencies(check-picolibc picolibc-check) + endif() + +endif() + +############################################################################### +# newlib +############################################################################### + +if(C_LIBRARY STREQUAL newlib) + if(ENABLE_LIBC_TESTS) + message(FATAL_ERROR "Tests cannot yet be enabled using newlib libc.") + endif() + + include(${TOOLCHAIN_SOURCE_DIR}/cmake/fetch_newlib.cmake) + set(build_env + "CC_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang -target ${target_triple} -ffreestanding" + "CXX_FOR_TARGET=${LLVM_BINARY_DIR}/bin/clang++ -target ${target_triple} -ffreestanding" + "AR_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ar" + "NM_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-nm" + "OBJDUMP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-objdump" + "RANLIB_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-ranlib" + "READELF_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-readelf" + "STRIP_FOR_TARGET=${LLVM_BINARY_DIR}/bin/llvm-strip" + "CFLAGS_FOR_TARGET=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -U_HAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}" + "CCASFLAGS=${flags} -Wno-error=implicit-function-declaration -D__USES_INITFINI__ -U_HAVE_INIT_FINI --sysroot ${TEMP_LIB_DIR}" + ) + + include(ProcessorCount) + set(make_flags) + ProcessorCount(nproc) + if(NOT nproc EQUAL 0) + set(make_flags -j${nproc}) + endif() + + ExternalProject_Add( + newlib + SOURCE_DIR ${newlib_SOURCE_DIR} + INSTALL_DIR ${TEMP_LIB_DIR} + CONFIGURE_COMMAND + ${CMAKE_COMMAND} -E env ${build_env} + /configure + --target=${target_triple} + --prefix "${TEMP_LIB_DIR}" + --exec_prefix /tmpinstall + --enable-newlib-io-long-long + --enable-newlib-register-fini + --disable-newlib-supplied-syscalls + --enable-newlib-io-c99-formats + --disable-nls + --enable-lite-exit + --disable-multilib + --enable-newlib-retargetable-locking + BUILD_COMMAND + ${CMAKE_COMMAND} -E env ${build_env} + make ${make_flags} + && + "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs + /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a + /${target_triple}/libgloss/${cpu_family}/rdimon-crt0.o + && + "${LLVM_BINARY_DIR}/bin/llvm-ar" rcs + /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a + /${target_triple}/libgloss/${cpu_family}/crt0.o + INSTALL_COMMAND + make install + && + ${CMAKE_COMMAND} -E copy_directory + /tmpinstall/${target_triple} + ${TEMP_LIB_DIR} + && + ${CMAKE_COMMAND} -E copy + /${target_triple}/libgloss/${cpu_family}/libcrt0-rdimon.a + ${TEMP_LIB_DIR}/lib + && + ${CMAKE_COMMAND} -E copy + /${target_triple}/libgloss/${cpu_family}/libcrt0-nosys.a + ${TEMP_LIB_DIR}/lib + # FIXME: TEST_COMMAND? + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + # Always run the build command so that incremental builds are correct. + CONFIGURE_HANDLED_BY_BUILD TRUE + TEST_EXCLUDE_FROM_MAIN TRUE + STEP_TARGETS configure build install # FIXME: test? + ) +endif() + +############################################################################### +# llvmlibc +############################################################################### + +if(C_LIBRARY STREQUAL llvmlibc) + if(ENABLE_LIBC_TESTS) + message(FATAL_ERROR "Tests cannot yet be enabled using llvm libc.") + endif() + if(ENABLE_CXX_LIBS) + message(FATAL_ERROR "We aren't yet able to build C++ libraries to go with llvm-libc.") + endif() + + # LLVM libc lacks a configuration for AArch64, but the AArch32 one works + # fine. However, setting the configuration for both architectures to the + # arm config directory means the baremetal config.json is never loaded, + # as it resides in the directory above. To ensure both are used, copy + # them to the same location and point libc to that. + set(LIBC_CFG_DIR ${CMAKE_BINARY_DIR}/llvmlibc-config) + file(COPY + ${llvmproject_SOURCE_DIR}/libc/config/baremetal/config.json + ${llvmproject_SOURCE_DIR}/libc/config/baremetal/arm/. + DESTINATION + ${LIBC_CFG_DIR} + ) + + set(lib_compile_flags "${lib_compile_flags} -Wno-error=atomic-alignment") + + set(common_llvmlibc_cmake_args + -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_COMPILER_TARGET=${target_triple} + -DCMAKE_ASM_FLAGS=${lib_compile_flags} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_CXX_COMPILER_TARGET=${target_triple} + -DCMAKE_CXX_FLAGS=${lib_compile_flags} + -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_C_COMPILER_TARGET=${target_triple} + -DCMAKE_C_FLAGS=${lib_compile_flags} + -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + -DCMAKE_INSTALL_PREFIX= + -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} + # Let CMake know we're cross-compiling + -DCMAKE_SYSTEM_NAME=Generic + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + ) + + ExternalProject_Add( + llvmlibc + SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes + INSTALL_DIR llvmlibc/install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + ${common_llvmlibc_cmake_args} + -DLIBC_TARGET_TRIPLE=${target_triple} + -DLIBC_CONFIG_PATH=${LIBC_CFG_DIR} + -DLIBC_CONF_TIME_64BIT=ON + -DLLVM_CMAKE_DIR=${LLVM_BINARY_DIR}/lib/cmake/llvm + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON + -DLLVM_ENABLE_RUNTIMES=libc + -DLLVM_INCLUDE_TESTS=OFF # llvmlibc's tests require C++, so can't be built until llvmlibc can support libc++ + -DLLVM_LIBC_FULL_BUILD=ON + STEP_TARGETS configure build install + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + INSTALL_COMMAND ${CMAKE_COMMAND} --install . + # Copy llvm-libc lib directory, moving libraries out of their + # target-specific subdirectory. + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + /lib/${target_triple} + "${TEMP_LIB_DIR}/lib" + # And copy the include directory, which is already arranged right. + COMMAND + ${CMAKE_COMMAND} + -E copy_directory + /include + "${TEMP_LIB_DIR}/include" + ) + + ExternalProject_Add( + llvmlibc-support + SOURCE_DIR ${TOOLCHAIN_SOURCE_DIR}/llvmlibc-support + INSTALL_DIR ${TEMP_LIB_DIR} + DEPENDS ${lib_tool_dependencies} llvmlibc-install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + ${common_llvmlibc_cmake_args} + STEP_TARGETS build install + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + USES_TERMINAL_TEST TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + ) +endif() + +add_dependencies(clib-configure ${C_LIBRARY}-configure) +add_dependencies(clib-build ${C_LIBRARY}-build) +add_dependencies(clib-install ${C_LIBRARY}-install) + +############################################################################### +# runtimes (libcxx, libcxxabi, libunwind) +############################################################################### + +if(ENABLE_CXX_LIBS) + if(C_LIBRARY STREQUAL picolibc) + set(cxxlibs_extra_cmake_options + -DLIBCXXABI_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF + -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF + -DLIBCXX_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_WIDE_CHARACTERS=OFF + -DLIBUNWIND_ENABLE_THREADS=OFF + -DLIBCXXABI_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS} + -DLIBCXXABI_ENABLE_STATIC_UNWINDER=${ENABLE_EXCEPTIONS} + -DLIBCXX_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS} + -DLIBCXX_ENABLE_RTTI=${ENABLE_RTTI} + ) + if(ENABLE_LIBCXX_TESTS) + set(cxxlibs_lit_args "${LLVM_LIT_ARGS} --xunit-xml-output=results.junit.xml") + set(cxxlibs_test_cmake_options + -DLIBCXX_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++-picolibc.cfg.in + -DLIBCXX_TEST_PARAMS=executor=${lit_test_executor} + -DLIBCXXABI_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libc++abi-picolibc.cfg.in + -DLIBCXXABI_TEST_PARAMS=executor=${lit_test_executor} + -DLIBUNWIND_TEST_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/test-support/llvm-libunwind-picolibc.cfg.in + -DLIBUNWIND_TEST_PARAMS=executor=${lit_test_executor} + -DRUNTIME_TEST_ARCH_FLAGS=${compile_arch_flags} + -DRUNTIME_TEST_LINK_FLAGS=${test_link_flags} + -DLLVM_LIT_ARGS=${cxxlibs_lit_args} + ) + endif() + elseif(C_LIBRARY STREQUAL newlib) + set(cxxlibs_extra_cmake_options + -DLIBCXXABI_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_THREADS=OFF + -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF + -DLIBCXX_ENABLE_RANDOM_DEVICE=OFF + -DLIBCXX_ENABLE_WIDE_CHARACTERS=ON + -DLIBCXX_ENABLE_LOCALIZATION=OFF + -DLIBUNWIND_ENABLE_THREADS=OFF + ) + endif() + + ExternalProject_Add( + cxxlibs + SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes + INSTALL_DIR ${TEMP_LIB_DIR} + DEPENDS compiler_rt-install clib-install + CMAKE_ARGS + ${compiler_launcher_cmake_args} + -DCMAKE_AR=${LLVM_BINARY_DIR}/bin/llvm-ar${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_ASM_FLAGS=${lib_compile_flags} + -DCMAKE_BUILD_TYPE=MinSizeRel + -DCMAKE_CXX_COMPILER=${LLVM_BINARY_DIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_CXX_COMPILER_TARGET=${target_triple} + -DCMAKE_CXX_FLAGS=${lib_compile_flags} + -DCMAKE_C_COMPILER=${LLVM_BINARY_DIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_C_COMPILER_TARGET=${target_triple} + -DCMAKE_C_FLAGS=${lib_compile_flags} + -DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE} + -DCMAKE_INSTALL_PREFIX=${TEMP_LIB_DIR} + -DCMAKE_NM=${LLVM_BINARY_DIR}/bin/llvm-nm${CMAKE_EXECUTABLE_SUFFIX} + -DCMAKE_RANLIB=${LLVM_BINARY_DIR}/bin/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX} + # Let CMake know we're cross-compiling + -DCMAKE_SYSTEM_NAME=Generic + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + -DLIBCXXABI_BAREMETAL=ON + -DLIBCXXABI_ENABLE_ASSERTIONS=OFF + -DLIBCXXABI_ENABLE_SHARED=OFF + -DLIBCXXABI_ENABLE_STATIC=ON + -DLIBCXXABI_LIBCXX_INCLUDES="${TEMP_LIB_DIR}/include/c++/v1" + -DLIBCXXABI_USE_COMPILER_RT=ON + -DLIBCXXABI_USE_LLVM_UNWINDER=ON + -DLIBCXXABI_SHARED_OUTPUT_NAME="c++abi-shared" + -DLIBCXX_ABI_UNSTABLE=ON + -DLIBCXX_CXX_ABI=libcxxabi + -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON + -DLIBCXX_ENABLE_FILESYSTEM=OFF + -DLIBCXX_ENABLE_SHARED=OFF + -DLIBCXX_ENABLE_STATIC=ON + -DLIBCXX_INCLUDE_BENCHMARKS=OFF + -DLIBCXX_SHARED_OUTPUT_NAME="c++-shared" + -DLIBUNWIND_ENABLE_ASSERTIONS=OFF + -DLIBUNWIND_ENABLE_SHARED=OFF + -DLIBUNWIND_ENABLE_STATIC=ON + -DLIBUNWIND_IS_BAREMETAL=ON + -DLIBUNWIND_REMEMBER_HEAP_ALLOC=ON + -DLIBUNWIND_USE_COMPILER_RT=ON + -DLIBUNWIND_SHARED_OUTPUT_NAME="unwind-shared" + -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} + -DLLVM_ENABLE_RUNTIMES=libcxxabi,libcxx,libunwind + -DRUNTIME_VARIANT_NAME=${VARIANT} + ${cxxlibs_extra_cmake_options} + ${cxxlibs_test_cmake_options} + STEP_TARGETS configure build install + USES_TERMINAL_CONFIGURE TRUE + USES_TERMINAL_BUILD TRUE + USES_TERMINAL_INSTALL TRUE + LIST_SEPARATOR , + CONFIGURE_HANDLED_BY_BUILD TRUE + ) + add_custom_target(check-cxx) + add_dependencies(check-all check-cxx) + add_custom_target(check-cxxabi) + add_dependencies(check-all check-cxxabi) + add_custom_target(check-unwind) + add_dependencies(check-all check-unwind) + if(ENABLE_LIBCXX_TESTS) + foreach(check_target check-cxx check-cxxabi check-unwind) + ExternalProject_Add_Step( + cxxlibs + ${check_target} + COMMAND "${CMAKE_COMMAND}" --build --target ${check_target} + USES_TERMINAL TRUE + EXCLUDE_FROM_MAIN TRUE + ALWAYS TRUE + ) + ExternalProject_Add_StepTargets(cxxlibs ${check_target}) + ExternalProject_Add_StepDependencies( + cxxlibs + ${check_target} + cxxlibs-install + ) + add_dependencies(${check_target} cxxlibs-${check_target}) + endforeach() + endif() + +else() # if not ENABLE_CXX_LIBS + + # The parent arm-multilib cmake script will still want to invoke + # build targets like 'cxxlibs-configure', whether we actually have + # C++ libraries or not. So we should define them, even if they + # don't do anything. + add_custom_target(cxxlibs-configure) + add_custom_target(cxxlibs-build) +endif() + +install( + DIRECTORY ${TEMP_LIB_DIR}/ + DESTINATION . +) diff --git a/cmake/meson-cross-build.txt.in b/arm-runtimes/meson-cross-build.txt.in similarity index 50% rename from cmake/meson-cross-build.txt.in rename to arm-runtimes/meson-cross-build.txt.in index c619118a..90df44d4 100644 --- a/cmake/meson-cross-build.txt.in +++ b/arm-runtimes/meson-cross-build.txt.in @@ -1,5 +1,5 @@ [binaries] -c = [@meson_c_args@, '-nostdlib'] +c = [@picolibc_meson_flags@, '-nostdlib'] ar = '@LLVM_BINARY_DIR@/bin/llvm-ar@CMAKE_EXECUTABLE_SUFFIX@' strip = '@LLVM_BINARY_DIR@/bin/llvm-strip@CMAKE_EXECUTABLE_SUFFIX@' # only needed to run tests @@ -8,9 +8,9 @@ strip = '@LLVM_BINARY_DIR@/bin/llvm-strip@CMAKE_EXECUTABLE_SUFFIX@' exe_wrapper = [ 'sh', '-c', - 'test -z "$PICOLIBC_TEST" || @test_executor_bin@ "$@" < /dev/null', - '@test_executor_bin@', - @test_executor_params@] + 'test -z "$PICOLIBC_TEST" || @picolibc_test_executor_bin@ "$@" < /dev/null', + '@picolibc_test_executor_bin@', + @meson_test_executor_params@] [host_machine] system = 'none' @@ -22,10 +22,10 @@ endian = 'little' skip_sanity_check = true libgcc ='-lclang_rt.builtins' separate_boot_flash = true -default_boot_flash_addr = '@default_boot_flash_addr@' -default_boot_flash_size = '@default_boot_flash_size@' -default_flash_addr = '@default_flash_addr@' -default_flash_size = '@default_flash_size@' -default_ram_addr = '@default_ram_addr@' -default_ram_size = '@default_ram_size@' -default_stack_size = '@default_stack_size@' +default_boot_flash_addr = '@BOOT_FLASH_ADDRESS@' +default_boot_flash_size = '@BOOT_FLASH_SIZE@' +default_flash_addr = '@FLASH_ADDRESS@' +default_flash_size = '@FLASH_SIZE@' +default_ram_addr = '@RAM_ADDRESS@' +default_ram_size = '@RAM_SIZE@' +default_stack_size = '@STACK_SIZE@' diff --git a/arm-runtimes/test-support/lit-exec-fvp.py b/arm-runtimes/test-support/lit-exec-fvp.py new file mode 100755 index 00000000..ef62c9c0 --- /dev/null +++ b/arm-runtimes/test-support/lit-exec-fvp.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its affiliates + +# This script is a bridge between lit-based tests of LLVM C++ runtime libraries +# (libc++abi, libunwind, libc++) and FVP models. It must handle the same +# command-line arguments as llvm-project/libcxx/utils/run.py. + +from run_fvp import run_fvp +import argparse +import pathlib +import sys + + +def main(): + parser = argparse.ArgumentParser( + description="Run a single test using Arm FVPs" + ) + parser.add_argument( + "--fvp-install-dir", + help="Directory in which FVP models are installed", + required=True, + ) + parser.add_argument( + "--fvp-config-dir", + help="Directory containing FVP config files", + required=True, + ) + parser.add_argument( + "--fvp-model", + help="model name for FVP", + required=True, + ) + parser.add_argument( + "--fvp-config", + action="append", + help="FVP config file(s) to use", + ) + parser.add_argument( + "--timeout", + type=int, + default=900, + help="timeout, in seconds (default: 900)", + ) + parser.add_argument( + "--execdir", + type=pathlib.Path, + default=pathlib.Path.cwd(), + help="directory to run the program from", + ) + parser.add_argument( + "--codesign_identity", + type=str, + help="ignored, used for compatibility with libc++ tests", + ) + parser.add_argument( + "--env", + type=str, + nargs="*", + help="ignored, used for compatibility with libc++ tests", + ) + parser.add_argument( + "--verbose", + action="store_true", + help="Print verbose output. This may affect test result, as the output " + "will be added to the output of the test.", + ) + parser.add_argument( + "--tarmac", + help="File to write tarmac trace to (slows execution significantly)", + ) + parser.add_argument("image", help="image file to execute") + parser.add_argument( + "arguments", + nargs=argparse.REMAINDER, + default=[], + help="optional arguments for the image", + ) + args = parser.parse_args() + return run_fvp( + args.fvp_install_dir, + args.fvp_config_dir, + args.fvp_model, + args.fvp_config, + args.image, + [args.image] + args.arguments, + args.timeout, + args.execdir, + args.verbose, + args.tarmac, + ) + sys.exit(ret_code) + + +if __name__ == "__main__": + main() diff --git a/test-support/lit-exec-qemu.py b/arm-runtimes/test-support/lit-exec-qemu.py similarity index 100% rename from test-support/lit-exec-qemu.py rename to arm-runtimes/test-support/lit-exec-qemu.py diff --git a/test-support/llvm-libc++-picolibc.cfg.in b/arm-runtimes/test-support/llvm-libc++-picolibc.cfg.in similarity index 90% rename from test-support/llvm-libc++-picolibc.cfg.in rename to arm-runtimes/test-support/llvm-libc++-picolibc.cfg.in index 2c00fd89..674fc84a 100644 --- a/test-support/llvm-libc++-picolibc.cfg.in +++ b/arm-runtimes/test-support/llvm-libc++-picolibc.cfg.in @@ -7,7 +7,7 @@ config.name = 'libc++-@RUNTIME_VARIANT_NAME@' config.substitutions.append(('%{libc-include}', '@CMAKE_INSTALL_PREFIX@/include')) config.substitutions.append(('%{libc-lib}', '@CMAKE_INSTALL_PREFIX@/lib')) -config.substitutions.append(('%{libc-linker-script}', '@LIBC_LINKER_SCRIPT@')) +config.substitutions.append(('%{libc-extra-link-flags}', '@RUNTIME_TEST_LINK_FLAGS@')) config.substitutions.append(('%{flags}', '@RUNTIME_TEST_ARCH_FLAGS@')) config.substitutions.append(('%{compile_flags}', @@ -27,8 +27,8 @@ config.substitutions.append(('%{link_flags}', ' -nostdlib++ -L %{lib-dir}' ' -lc++ -lc++abi' ' -nostdlib -L %{libc-lib}' - ' -lc -lm -lclang_rt.builtins -lsemihost -lcrt0-semihost' - ' -T %{libc-linker-script}' + ' -lc -lm -lclang_rt.builtins' + ' %{libc-extra-link-flags}' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/test-support/llvm-libc++abi-picolibc.cfg.in b/arm-runtimes/test-support/llvm-libc++abi-picolibc.cfg.in similarity index 87% rename from test-support/llvm-libc++abi-picolibc.cfg.in rename to arm-runtimes/test-support/llvm-libc++abi-picolibc.cfg.in index bfe0eb2e..5d7f8aea 100644 --- a/test-support/llvm-libc++abi-picolibc.cfg.in +++ b/arm-runtimes/test-support/llvm-libc++abi-picolibc.cfg.in @@ -7,7 +7,7 @@ config.name = 'libc++abi-@RUNTIME_VARIANT_NAME@' config.substitutions.append(('%{libc-include}', '@CMAKE_INSTALL_PREFIX@/include')) config.substitutions.append(('%{libc-lib}', '@CMAKE_INSTALL_PREFIX@/lib')) -config.substitutions.append(('%{libc-linker-script}', '@LIBC_LINKER_SCRIPT@')) +config.substitutions.append(('%{libc-extra-link-flags}', '@RUNTIME_TEST_LINK_FLAGS@')) config.substitutions.append(('%{flags}', '@RUNTIME_TEST_ARCH_FLAGS@')) config.substitutions.append(('%{compile_flags}', @@ -19,8 +19,8 @@ config.substitutions.append(('%{link_flags}', ' -nostdlib++ -L %{lib}' ' -lc++ -lc++abi' ' -nostdlib -L %{libc-lib}' - ' -lc -lm -lclang_rt.builtins -lsemihost -lcrt0-semihost' - ' -T %{libc-linker-script}' + ' -lc -lm -lclang_rt.builtins' + ' %{libc-extra-link-flags}' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/test-support/llvm-libunwind-picolibc.cfg.in b/arm-runtimes/test-support/llvm-libunwind-picolibc.cfg.in similarity index 89% rename from test-support/llvm-libunwind-picolibc.cfg.in rename to arm-runtimes/test-support/llvm-libunwind-picolibc.cfg.in index d0f00a35..d7942c16 100644 --- a/test-support/llvm-libunwind-picolibc.cfg.in +++ b/arm-runtimes/test-support/llvm-libunwind-picolibc.cfg.in @@ -8,7 +8,7 @@ config.name = 'libunwind-@RUNTIME_VARIANT_NAME@' config.substitutions.append(('%{libc-include}', '@CMAKE_INSTALL_PREFIX@/include')) config.substitutions.append(('%{libc-lib}', '@CMAKE_INSTALL_PREFIX@/lib')) -config.substitutions.append(('%{libc-linker-script}', '@LIBC_LINKER_SCRIPT@')) +config.substitutions.append(('%{libc-extra-link-flags}', '@RUNTIME_TEST_LINK_FLAGS@')) compile_flags = [] @@ -32,8 +32,8 @@ config.substitutions.append(('%{link_flags}', ' -nostdlib++ -L %{lib}' ' -lc++ -lc++abi -lunwind' ' -nostdlib -L %{libc-lib}' - ' -lc -lm -lclang_rt.builtins -lsemihost -lcrt0-semihost' - ' -T %{libc-linker-script}' + ' -lc -lm -lclang_rt.builtins' + ' %{libc-extra-link-flags}' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/arm-runtimes/test-support/modify-compiler-rt-xml.py b/arm-runtimes/test-support/modify-compiler-rt-xml.py new file mode 100644 index 00000000..bc7c5383 --- /dev/null +++ b/arm-runtimes/test-support/modify-compiler-rt-xml.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 + +# Helper script to modify the xml results from compiler-rt. + +# compiler-rt always puts all the test results into the "compiler-rt" +# testsuite in the junit xml file. We have multiple variants of +# compiler-rt, so the xml is modified to group the tests by variant. + +import argparse +import os +from xml.etree import ElementTree + + +def main(): + parser = argparse.ArgumentParser(description="Reformat compiler-rt xml results") + parser.add_argument( + "--dir", + required=True, + help="Path to compiler-rt build directory", + ) + parser.add_argument( + "--variant", + required=True, + help="Name of the variant under test", + ) + args = parser.parse_args() + + # A '.' character is used in junit xml to split classes/groups. + # Variants such as armv8m.main need to be renamed. + variant_name = args.variant.replace(".", "_") + + xml_file = os.path.join(args.dir, "test", "results.junit.xml") + + tree = ElementTree.parse(xml_file) + root = tree.getroot() + + # The compiler-rt Builtins tests runs two testsuites: TestCases and Unit + # TestCases are recorded in the "Builtins" suite. + # But the Unit tests are recorded in "Builtins-arm-generic" or similar. + # For readability, combine them all under compiler-rt-{variant}-Builtins + for testsuite in root.iter("testsuite"): + old_suitename = testsuite.get("name") + new_suitename = f"compiler-rt-{variant_name}-Builtins" + testsuite.set("name", new_suitename) + for testcase in testsuite.iter("testcase"): + old_classname = testcase.get("classname") + new_classname = old_classname.replace(old_suitename, new_suitename) + testcase.set("classname", new_classname) + + tree.write(xml_file) + print(f"Results written to {xml_file}") + +if __name__ == "__main__": + main() diff --git a/arm-runtimes/test-support/modify-picolibc-xml.py b/arm-runtimes/test-support/modify-picolibc-xml.py new file mode 100644 index 00000000..f194b6d9 --- /dev/null +++ b/arm-runtimes/test-support/modify-picolibc-xml.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 + +# Helper script to modify the xml results from picolibc. + +# Picolibc always puts all the test results into the "picolibc" +# testsuite in the junit xml file. We have multiple variants of +# picolibc, so the xml is modified to group the tests by variant. + +import argparse +import os +from xml.etree import ElementTree + + +def main(): + parser = argparse.ArgumentParser(description="Reformat picolibc xml results") + parser.add_argument( + "--dir", + required=True, + help="Path to picolibc build directory", + ) + parser.add_argument( + "--variant", + required=True, + help="Name of the variant under test", + ) + args = parser.parse_args() + + # A '.' character is used in junit xml to split classes/groups. + # Variants such as armv8m.main need to be renamed. + variant_name = args.variant.replace(".", "_") + + xml_file = os.path.join(args.dir, "meson-logs", "testlog.junit.xml") + + tree = ElementTree.parse(xml_file) + root = tree.getroot() + for testsuite in root.iter("testsuite"): + testsuite.set("name", f"picolibc-{variant_name}") + for testcase in root.iter("testcase"): + testcase.set("classname", f"picolibc-{variant_name}.picolibc-{variant_name}") + tree.write(xml_file) + print(f"Results written to {xml_file}") + + +if __name__ == "__main__": + main() diff --git a/arm-runtimes/test-support/picolibc-test-wrapper.py b/arm-runtimes/test-support/picolibc-test-wrapper.py new file mode 100755 index 00000000..e391e692 --- /dev/null +++ b/arm-runtimes/test-support/picolibc-test-wrapper.py @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its affiliates + +# This is a wrapper script to run picolibc tests with QEMU or FVPs. + +from run_qemu import run_qemu +from run_fvp import run_fvp +import argparse +import pathlib +import sys + +# https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors +EXIT_CODE_SKIP = 77 + +disabled_tests = [ + # compiler-rt does not properly set floating point exceptions for + # computations on types implemented in software + # https://github.com/picolibc/picolibc/pull/500 + "picolibc_armv7m_soft_fpv4_sp_d16-build/test/math_errhandling", + "picolibc_armv7m_hard_fpv4_sp_d16-build/test/math_errhandling", + "picolibc_armv7r_hard_vfpv3xd-build/test/math_errhandling", + "picolibc_armv7r_hard_vfpv3xd_exn_rtti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_fp_nomve-build/test/math_errhandling", + "picolibc_armv7m_soft_fpv4_sp_d16_exn_rtti-build/test/math_errhandling", + "picolibc_armv7m_hard_fpv4_sp_d16_exn_rtti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_fp_nomve_exn_rtti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_nofp_mve-build/test/fenv", + "picolibc_armv8.1m.main_hard_nofp_mve-build/test/math_errhandling", + "picolibc_armv8m.main_hard_fp-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_nofp_mve_exn_rtti-build/test/fenv", + "picolibc_armv8.1m.main_hard_nofp_mve_exn_rtti-build/test/math_errhandling", + "picolibc_armv8m.main_hard_fp_exn_rtti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_nofp_mve_pacret_bti-build/test/fenv", + "picolibc_armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti-build/test/fenv", + "picolibc_armv8.1m.main_hard_fp_nomve_pacret_bti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_fp_nomve_pacret_bti_exn_rtti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_nofp_mve_pacret_bti-build/test/math_errhandling", + "picolibc_armv8.1m.main_hard_nofp_mve_pacret_bti_exn_rtti-build/test/math_errhandling", +] + +disabled_tests_fvp = [ + # SDDKW-25808: SYS_SEEK returns wrong value. + "test/semihost/semihost-seek", + "test/test-fread-fwrite", + "test/posix-io", + # SDDKW-94045: rateInHz port not connected in Corstone-310 FVP. + "test/semihost/semihost-gettimeofday", +] + + +def is_disabled(image, use_fvp): + if any([image.endswith(t) for t in disabled_tests]): + return True + if use_fvp and any([image.endswith(t) for t in disabled_tests_fvp]): + return True + return False + + +def run(args): + if is_disabled(args.image, args.qemu_command is None): + return EXIT_CODE_SKIP + # Some picolibc tests expect argv[0] to be literally "program-name", not + # the actual program name. + argv = ["program-name"] + args.arguments + if args.qemu_command: + return run_qemu( + args.qemu_command, + args.qemu_machine, + args.qemu_cpu, + args.qemu_params.split(":") if args.qemu_params else [], + args.image, + argv, + None, + pathlib.Path.cwd(), + args.verbose, + ) + else: + return run_fvp( + args.fvp_install_dir, + args.fvp_config_dir, + args.fvp_model, + args.fvp_config, + args.image, + argv, + None, + pathlib.Path.cwd(), + args.verbose, + args.tarmac, + ) + + +def main(): + parser = argparse.ArgumentParser( + description="Run a single test using either qemu or an FVP" + ) + main_arg_group = parser.add_mutually_exclusive_group(required=True) + main_arg_group.add_argument( + "--qemu-command", help="qemu-system- path" + ) + main_arg_group.add_argument( + "--fvp-install-dir", help="Directory in which FVP models are installed" + ) + parser.add_argument( + "--qemu-machine", + help="name of the machine to pass to QEMU", + ) + parser.add_argument( + "--qemu-cpu", required=False, help="name of the cpu to pass to QEMU" + ) + parser.add_argument( + "--qemu-params", + help='list of arguments to pass to qemu, separated with ":"', + ) + parser.add_argument( + "--fvp-config-dir", help="Directory in which FVP models are installed" + ) + parser.add_argument( + "--fvp-model", + help="model name for FVP", + ) + parser.add_argument( + "--fvp-config", + action="append", + help="FVP config file(s) to use", + ) + parser.add_argument( + "--tarmac", + help="file to wrote tarmac trace to (FVP only)", + ) + parser.add_argument( + "--verbose", + action="store_true", + help="Print verbose output. This may affect test result, as the output " + "will be added to the output of the test.", + ) + parser.add_argument("image", help="image file to execute") + parser.add_argument( + "arguments", + nargs=argparse.REMAINDER, + default=[], + help="optional arguments for the image", + ) + args = parser.parse_args() + ret_code = run(args) + sys.exit(ret_code) + + +if __name__ == "__main__": + main() diff --git a/arm-runtimes/test-support/run_fvp.py b/arm-runtimes/test-support/run_fvp.py new file mode 100755 index 00000000..8f3f9563 --- /dev/null +++ b/arm-runtimes/test-support/run_fvp.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 + +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +import subprocess +import sys +from os import path +from dataclasses import dataclass +import shlex + +@dataclass +class FVP: + model_exe: str + tarmac_plugin: str + crypto_plugin: str + cmdline_param: str + +MODELS = { + "corstone-310": FVP( + "Corstone-310/models/Linux64_GCC-9.3/FVP_Corstone_SSE-310", + "Corstone-310/plugins/Linux64_GCC-9.3/TarmacTrace.so", + "FastModelsPortfolio_11.27/plugins/Linux64_GCC-9.3/Crypto.so", + "cpu0.semihosting-cmd_line", + ), + "aem-a": FVP( + "Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3/FVP_Base_RevC-2xAEMvA", + "Base_RevC_AEMvA_pkg/plugins/Linux64_GCC-9.3/TarmacTrace.so", + "FastModelsPortfolio_11.27/plugins/Linux64_GCC-9.3/Crypto.so", + "cluster0.cpu0.semihosting-cmd_line", + ), + "aem-r": FVP( + "AEMv8R_base_pkg/models/Linux64_GCC-9.3/FVP_BaseR_AEMv8R", + "AEMv8R_base_pkg/plugins/Linux64_GCC-9.3/TarmacTrace.so", + "FastModelsPortfolio_11.27/plugins/Linux64_GCC-9.3/Crypto.so", + "cluster0.cpu0.semihosting-cmd_line", + ), +} + + +def run_fvp( + fvp_install_dir, + fvp_config_dir, + fvp_model, + fvp_configs, + image, + arguments, + timeout, + working_directory, + verbose, + tarmac_file, +): + """Execute the program using an FVP and return the subprocess return code.""" + if fvp_model not in MODELS: + raise Exception(f"{fvp_model} is not a recognised model name") + model = MODELS[fvp_model] + + command = [path.join(fvp_install_dir, model.model_exe)] + command.extend(["--quiet"]) + for config in fvp_configs: + command.extend(["--config-file", path.join(fvp_config_dir, config + ".cfg")]) + command.extend(["--application", image]) + command.extend(["--parameter", f"{model.cmdline_param}={shlex.join(arguments)}"]) + command.extend(["--plugin", path.join(fvp_install_dir, model.crypto_plugin)]) + if tarmac_file is not None: + command.extend([ + "--plugin", + path.join(fvp_install_dir, model.tarmac_plugin), + "--parameter", + "TRACE.TarmacTrace.trace-file=" + tarmac_file, + ]) + + if verbose: + print("running: {}".format(shlex.join(command))) + + # SDDKW-53824: the ":semihosting-features" pseudo-file isn't simulated + # by these models. To work around that, we create one ourselves in the + # test process's working directory, containing the single feature flag + # SH_EXT_EXIT_EXTENDED, meaning that the SYS_EXIT_EXTENDED semihosting + # request will work. This permits the test program's exit status to be + # propagated to the exit status of the FVP, so that tests returning 77 + # for "test skipped" can be automatically detected. + with open( + path.join(working_directory, ":semihosting-features"), "wb" + ) as fh: + fh.write(b"SHFB\x01") + + result = subprocess.run( + command, + stdout=subprocess.PIPE, + stderr=sys.stderr, + timeout=timeout, + cwd=working_directory, + check=False, + ) + sys.stdout.buffer.write(result.stdout) + return result.returncode + diff --git a/test-support/run_qemu.py b/arm-runtimes/test-support/run_qemu.py similarity index 100% rename from test-support/run_qemu.py rename to arm-runtimes/test-support/run_qemu.py diff --git a/cmake/to_meson_list.cmake b/arm-runtimes/to_meson_list.cmake similarity index 100% rename from cmake/to_meson_list.cmake rename to arm-runtimes/to_meson_list.cmake diff --git a/cmake/fetch_llvm.cmake b/cmake/fetch_llvm.cmake new file mode 100644 index 00000000..18381489 --- /dev/null +++ b/cmake/fetch_llvm.cmake @@ -0,0 +1,33 @@ +# To avoid duplicating the FetchContent code, this file can be +# included by either the top-level toolchain cmake, or the +# arm-runtimes sub-project. +# FETCHCONTENT_SOURCE_DIR_LLVMPROJECT should be passed down from the +# top level to any library builds to prevent repeated checkouts. + +include(FetchContent) +include(${CMAKE_CURRENT_LIST_DIR}/patch_repo.cmake) + +if(NOT VERSIONS_JSON) + include(${CMAKE_CURRENT_LIST_DIR}/read_versions.cmake) +endif() +read_repo_version(llvmproject llvm-project) +get_patch_command(${CMAKE_CURRENT_LIST_DIR}/.. llvm-project llvm_patch_command) +if(APPLY_LLVM_PERFORMANCE_PATCHES) + get_patch_command(${CMAKE_CURRENT_LIST_DIR}/.. llvm-project-perf llvm_perf_patch_command) + set(llvm_patch_command ${llvm_patch_command} && ${llvm_perf_patch_command} ) +endif() + +FetchContent_Declare(llvmproject + GIT_REPOSITORY https://github.com/llvm/llvm-project.git + GIT_TAG "${llvmproject_TAG}" + GIT_SHALLOW "${llvmproject_SHALLOW}" + GIT_PROGRESS TRUE + PATCH_COMMAND ${llvm_patch_command} + # Add the llvm subdirectory later to ensure that + # LLVMEmbeddedToolchainForArm is the first project declared. + # Otherwise CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT + # can't be used. + SOURCE_SUBDIR do_not_add_llvm_subdir_yet +) +FetchContent_MakeAvailable(llvmproject) +FetchContent_GetProperties(llvmproject SOURCE_DIR FETCHCONTENT_SOURCE_DIR_LLVMPROJECT) diff --git a/cmake/fetch_newlib.cmake b/cmake/fetch_newlib.cmake new file mode 100644 index 00000000..6962b5bb --- /dev/null +++ b/cmake/fetch_newlib.cmake @@ -0,0 +1,26 @@ +# To avoid duplicating the FetchContent code, this file can be +# included by either the top-level toolchain cmake, or the +# arm-runtimes sub-project. +# FETCHCONTENT_SOURCE_DIR_NEWLIB should be passed down from the +# top level to any library builss to prevent repeated checkouts. + +include(FetchContent) +include(${CMAKE_CURRENT_LIST_DIR}/patch_repo.cmake) + +if(NOT VERSIONS_JSON) + include(${CMAKE_CURRENT_LIST_DIR}/read_versions.cmake) +endif() +read_repo_version(newlib newlib) +get_patch_command(${CMAKE_CURRENT_LIST_DIR}/.. newlib newlib_patch_command) + +FetchContent_Declare(newlib + GIT_REPOSITORY https://sourceware.org/git/newlib-cygwin.git + GIT_TAG "${newlib_TAG}" + GIT_SHALLOW "${newlib_SHALLOW}" + GIT_PROGRESS TRUE + PATCH_COMMAND ${newlib_patch_command} + # Similarly to picolibc, we don't do the configuration here. + SOURCE_SUBDIR do_not_add_newlib_subdir +) +FetchContent_MakeAvailable(newlib) +FetchContent_GetProperties(newlib SOURCE_DIR FETCHCONTENT_SOURCE_DIR_NEWLIB) diff --git a/cmake/fetch_picolibc.cmake b/cmake/fetch_picolibc.cmake new file mode 100644 index 00000000..050b136b --- /dev/null +++ b/cmake/fetch_picolibc.cmake @@ -0,0 +1,28 @@ +# To avoid duplicating the FetchContent code, this file can be +# included by either the top-level toolchain cmake, or the +# arm-runtimes sub-project. +# FETCHCONTENT_SOURCE_DIR_PICOLIBC should be passed down from the +# top level to any library builss to prevent repeated checkouts. + +include(FetchContent) +include(${CMAKE_CURRENT_LIST_DIR}/patch_repo.cmake) + +if(NOT VERSIONS_JSON) + include(${CMAKE_CURRENT_LIST_DIR}/read_versions.cmake) +endif() +read_repo_version(picolibc picolibc) +get_patch_command(${CMAKE_CURRENT_LIST_DIR}/.. picolibc picolibc_patch_command) + +FetchContent_Declare(picolibc + GIT_REPOSITORY https://github.com/picolibc/picolibc.git + GIT_TAG "${picolibc_TAG}" + GIT_SHALLOW "${picolibc_SHALLOW}" + GIT_PROGRESS TRUE + PATCH_COMMAND ${picolibc_patch_command} + # We only want to download the content, not configure it at this + # stage. picolibc will be built in many configurations using + # ExternalProject_Add using the sources that are checked out here. + SOURCE_SUBDIR do_not_add_picolibc_subdir +) +FetchContent_MakeAvailable(picolibc) +FetchContent_GetProperties(picolibc SOURCE_DIR FETCHCONTENT_SOURCE_DIR_PICOLIBC) diff --git a/cmake/generate_version_txt.cmake b/cmake/generate_version_txt.cmake index b36460cb..a3f70327 100644 --- a/cmake/generate_version_txt.cmake +++ b/cmake/generate_version_txt.cmake @@ -23,12 +23,14 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ERROR_IS_FATAL ANY ) -execute_process( - COMMAND git -C ${${LLVM_TOOLCHAIN_C_LIBRARY}_SOURCE_DIR} rev-parse HEAD - OUTPUT_VARIABLE ${LLVM_TOOLCHAIN_C_LIBRARY}_COMMIT - OUTPUT_STRIP_TRAILING_WHITESPACE - COMMAND_ERROR_IS_FATAL ANY -) +if(NOT (LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc)) # libc in a separate repo? + execute_process( + COMMAND git -C ${${LLVM_TOOLCHAIN_C_LIBRARY}_SOURCE_DIR} rev-parse HEAD + OUTPUT_VARIABLE ${LLVM_TOOLCHAIN_C_LIBRARY}_COMMIT + OUTPUT_STRIP_TRAILING_WHITESPACE + COMMAND_ERROR_IS_FATAL ANY + ) +endif() configure_file( ${CMAKE_CURRENT_LIST_DIR}/VERSION.txt.in diff --git a/cmake/patch_repo.cmake b/cmake/patch_repo.cmake new file mode 100644 index 00000000..c81a76bd --- /dev/null +++ b/cmake/patch_repo.cmake @@ -0,0 +1,16 @@ + +# Function to generate a PATCH_COMMAND, calling the +# patch_repo.py script using a target set of patches. + +function(get_patch_command toolchain_root patch_dir patch_command_out) + set(patch_script ${toolchain_root}/cmake/patch_repo.py) + list(APPEND patch_script_args ${Python3_EXECUTABLE} ${patch_script}) + if(GIT_PATCH_METHOD STREQUAL "am") + list(APPEND patch_script_args "--method" "am") + elseif(GIT_PATCH_METHOD STREQUAL "apply") + list(APPEND patch_script_args "--method" "apply") + endif() + list(APPEND patch_script_args ${toolchain_root}/patches/${patch_dir}) + + set(${patch_command_out} ${patch_script_args} PARENT_SCOPE) +endfunction() diff --git a/cmake/patch_repo.py b/cmake/patch_repo.py new file mode 100644 index 00000000..59294b14 --- /dev/null +++ b/cmake/patch_repo.py @@ -0,0 +1,153 @@ +#!/usr/bin/env python3 + +""" +Script to apply a set of patches to a git repository. +""" + +import argparse +import os +import pathlib +import subprocess +import sys + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "patchdir", + help="Set of patches to apply. This should be a directory containing one or more ordered *.patch files.", + ) + parser.add_argument( + "--repo_dir", + help="Directory of the git checkout, if not the current directory.", + ) + parser.add_argument( + "--method", + choices=["am", "apply"], + default="apply", + help="Git command to use. git am will add each patch as a commit, whereas git apply will leave patched changes staged.", + ) + parser.add_argument( + "--reset", + help="Clean and hard reset the repo to a specified commit before patching.", + ) + parser.add_argument( + "--restore_on_fail", + action="store_true", + help="If a patch in a series cannot be applied, restore the original state instead of leaving patches missing. Return code will be 2 instead of 1.", + ) + parser.add_argument( + "--3way", + action="store_true", + dest="three_way", + help="If the patch does not apply cleanly, fall back on 3-way merge.", + ) + args = parser.parse_args() + + # If the patch is valid but contain conflicts, using --3way --apply can apply + # the patch but leave conflict markers in the source for the user to resolve. + # This doesn't return an error code, making it compatible with this script's + # --restore_on_fail option, which relies on the error code from running --check. + if args.method == "apply" and args.restore_on_fail and args.three_way: + print("--restore_on_fail is incompatible with --3way using apply") + exit(1) + + if args.repo_dir: + git_cmd = ["git", "-C", args.repo_dir] + else: + git_cmd = ["git"] + + if args.reset: + reset_args = git_cmd + ["reset", "--quiet", "--hard", args.reset] + subprocess.check_output(reset_args) + clean_args = git_cmd + ["clean", "--quiet", "--force", "-dx", args.reset] + subprocess.check_output(clean_args) + + abs_patch_dir = os.path.abspath(args.patchdir) + patch_list = list(pathlib.Path(abs_patch_dir).glob("*.patch")) + patch_list.sort() + + print(f"Found {len(patch_list)} patches to apply:") + print("\n".join(p.name for p in patch_list)) + + if args.method == "am": + merge_args = git_cmd + ["am", "-k", "--ignore-whitespace"] + if args.three_way: + merge_args.append("--3way") + for patch in patch_list: + merge_args.append(str(patch)) + p = subprocess.run(merge_args, capture_output=True, text=True) + print(p.stdout) + print(p.stderr) + + if p.returncode == 0: + print(f"All patches applied.") + sys.exit(0) + if args.restore_on_fail: + # Check that the operation can be aborted. + # git am doesn't give any specific return codes, + # so check for unresolved working files. + rebase_apply_path = os.path.join(".git", "rebase-apply") + if args.repo_dir: + rebase_apply_path = os.path.join(args.repo_dir, rebase_apply_path) + if os.path.isdir(rebase_apply_path): + print("Aborting git am...") + subprocess.run(git_cmd + ["am", "--abort"], check=True) + print(f"Abort successful.") + sys.exit(2) + else: + print("Unable to abort.") + sys.exit(1) + else: + applied_patches = [] + for current_patch in patch_list: + print(f"Checking {current_patch.name}...") + # Check that the patch applies before trying to apply it. + apply_check_args = git_cmd + [ + "apply", + "--ignore-whitespace", + "--check", + ] + if args.three_way: + apply_check_args.append("--3way") + apply_check_args.append(str(current_patch)) + p_check = subprocess.run(apply_check_args) + + if p_check.returncode == 0: + # Patch will apply. + print(f"Applying {current_patch.name}...") + apply_args = git_cmd + [ + "apply", + "--ignore-whitespace", + ] + if args.three_way: + apply_args.append("--3way") + apply_args.append(str(current_patch)) + p = subprocess.run(apply_args, check=True) + applied_patches.append(current_patch) + else: + # Patch won't apply. + print(f"Unable to apply {current_patch.name}") + if args.restore_on_fail: + # Remove any patches that have already been applied. + while len(applied_patches) > 0: + previous_patch = applied_patches.pop() + print(f"Reversing {previous_patch.name}...") + reverse_args = git_cmd + [ + "apply", + "--ignore-whitespace", + "--reverse", + ] + if args.three_way: + reverse_args.append("--3way") + reverse_args.append(str(previous_patch)) + p_check = subprocess.run(reverse_args, check=True) + print( + f"Rollback successful, failure occured on {current_patch.name}" + ) + sys.exit(2) + sys.exit(1) + print(f"All patches applied.") + + +main() diff --git a/cmake/read_versions.cmake b/cmake/read_versions.cmake new file mode 100644 index 00000000..194e58e2 --- /dev/null +++ b/cmake/read_versions.cmake @@ -0,0 +1,22 @@ +# Read which revisions of the repos to use. +file(READ ${CMAKE_CURRENT_LIST_DIR}/../versions.json VERSIONS_JSON) +function(read_repo_version output_variable_prefix repo) + string(JSON tag GET ${VERSIONS_JSON} "repos" "${repo}" "tag") + string(JSON tagType GET ${VERSIONS_JSON} "repos" "${repo}" "tagType") + if(tagType STREQUAL "commithash") + # GIT_SHALLOW doesn't work with commit hashes. + set(shallow OFF) + elseif(tagType STREQUAL "branch") + set(shallow ON) + # CMake docs recommend that "branch names and tags should + # generally be specified as remote names" + set(tag "origin/${tag}") + elseif(tagType STREQUAL "tag") + set(shallow ON) + else() + message(FATAL_ERROR "Unrecognised tagType ${tagType}") + endif() + + set(${output_variable_prefix}_TAG "${tag}" PARENT_SCOPE) + set(${output_variable_prefix}_SHALLOW "${shallow}" PARENT_SCOPE) +endfunction() diff --git a/docs/building-from-source.md b/docs/building-from-source.md index e059810b..e1efefa3 100644 --- a/docs/building-from-source.md +++ b/docs/building-from-source.md @@ -36,6 +36,43 @@ $ 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. + +These models can be downloaded and installed (into the source tree) with the +`fvp/get_fvps.sh` script. This is currently only available for Linux. By +default, `get_fvps.sh` will run the installers for packages which have them, +which will prompt you to agree to their licenses. Some of the packages do not +have installers, instead they place their license file into the +`fvp/license_terms` directory, which you should read before continuing. + +The installer for the cryptography plugin requires a graphical display to run: +it cannot run in a pure terminal session such as you might start via SSH. Also, +it will prompt for a directory to install the plugin into. You should enter the +pathname `fvp/install` relative to the root of your checkout. The installer +will automatically append a subdirectory `FastModelsPortfolio_11.27` to the end +of that, and respond with a warning such as 'Directory [...] not found (but in +patch mode). Continue installation?' Say yes to this prompt, and continue +clicking 'Next' until installation is complete. + +For non-interactive use (for example in CI systems), `get_fvps.sh` can be run +with the `--non-interactive` option, which causes it to implicitly accept all +of the EULAs and set up the correct install directories. + +If you have previously downloaded and installed the FVPs outside of the source +tree, you can set the `-DFVP_INSTALL_DIR=...` cmake option to set the path to +them. + +Testing with FVPs is disabled by default, but QEMU tests will still be run, and +all library variants will still be built. Testing with FVPs can be enabled by +setting the `-DENABLE_FVP_TESTING=ON` CMake option if you have installed the +models as described above. + ## Customizing To build additional library variants, edit the `CMakeLists.txt` by adding @@ -50,6 +87,8 @@ tools to the `LLVM_DISTRIBUTION_COMPONENTS` CMake list. The toolchain can be built directly with CMake. ``` +export CC=clang +export CXX=clang++ mkdir build cd build cmake .. -GNinja -DFETCHCONTENT_QUIET=OFF @@ -61,11 +100,13 @@ If you prefer you can check out and patch the repos manually and use those. If you check out repos manually then it is your responsibility to ensure that the correct revisions are checked out - see `versions.json` to identify these. ``` +export CC=clang +export CXX=clang++ mkdir repos git -C repos clone https://github.com/llvm/llvm-project.git -git -C repos/llvm-project am -k "$PWD"/../patches/llvm-project/*.patch +git -C repos/llvm-project am -k "$PWD"/patches/llvm-project/*.patch git -C repos clone https://github.com/picolibc/picolibc.git -git -C repos/picolibc apply "$PWD"/../patches/picolibc.patch +git -C repos/picolibc am -k "$PWD"/patches/picolibc/*.patch mkdir build cd build cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc @@ -124,3 +165,100 @@ The same build directory can be used for both native and MinGW toolchains. See [patches](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/tree/main/patches) directory for the current set of differences from upstream. + +The patches for llvm-project are split between two folders, llvm-project and +llvm-project-perf. The former are generally required for building and +successfully running all tests. The patches in llvm-project-perf are optional, +and designed to improve performance in certain circumstances. + +To reduce divergence from upstream and potential patch conflicts, the +performance patches are not applied by default, but can be enabled for an +automatic checkout with the APPLY_LLVM_PERFORMANCE_PATCHES option. + +## Building individual library variants + +When working on library code, it may be useful to build a library variant +without having to rebuild the entire toolchain. + +Each variant is built using the `arm-runtimes` sub-project, and can be +configured and built directly if you provide a path to a LLVM build or install. + +The default CMake arguments to build a particular variant are stored in a JSON +format in the arm-multilib/json/variants folder, which can be loaded at +configuration with the `-DVARIANT_JSON` setting. Any additional options +provided on the command line will override values from he JSON. `-DC_LIBRARY` +will be required to set which library to build, and `-DLLVM_BINARY_DIR` should +point to the top-level directory of a build or install of LLVM. + +(The actual binaries, such as `clang`, are expected to be in +`$LLVM_BINARY_DIR/bin`, not `$LLVM_BINARY_DIR` itself. For example, if you're +using the results of a full build of this toolchain itself in another +directory, then you should set `LLVM_BINARY_DIR` to point at the `llvm` +subdirectory of the previous build tree, not the `llvm/bin` subdirectory.) + +For example, to build the `armv7a_soft_nofp` variant using `picolibc`, using +an existing LLVM build and source checkouts: + +``` +cd LLVM-embedded-toolchain-for-Arm +mkdir build-lib +cd build-lib +cmake ../arm-runtimes -G Ninja \ + -DVARIANT_JSON=../arm-multilib/json/variants/armv7a_soft_nofp.json \ + -DC_LIBRARY=picolibc \ + -DLLVM_BINARY_DIR=/path/to/llvm \ + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc +ninja +``` + +If enabled and the required test executor available, tests can be run with +using specific test targets: +`ninja check-picolibc` +`ninja check-compiler-rt` +`ninja check-cxx` +`ninja check-cxxabi` +`ninja check-unwind` + +Alternatively, `ninja check-all` runs all enabled tests. + +## Building sets of libraries + +As well as individual libraries, it is also possible to build a set of +libraries without rebuilding the entire toolchain. The `arm-multilib` +sub-project builds and collects multiple libraries, and generates a +`multilib.yaml` file to map compile flags to variants. + +The `arm-multilib/multilib.json` file defines which variants are built and +their order in the mapping. This can be used to configure the project directly + +For example, building the picolibc variants using an existing LLVM build and +source checkouts: +``` +cd LLVM-embedded-toolchain-for-Arm +mkdir build-multilib +cd build-multilib +cmake ../arm-multilib -G Ninja \ + -DMULTILIB_JSON=../arm-multilib/json/multilib.json \ + -DC_LIBRARY=picolibc \ + -DLLVM_BINARY_DIR=/path/to/llvm \ + -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=/path/to/llvm-project \ + -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=/path/to/picolibc +ninja +``` +To only build a subset of the variants defined in the JSON file, +the `-DENABLE_VARIANTS` option controls which variants to build. +E.g, `-DENABLE_VARIANTS="aarch64a;armv7a_soft_nofp"` only builds the two +variants of `aarch64a` and `armv7a_soft_nofp`. + +If enabled and the required test executor available, tests can be run with +using specific test targets: + +`ninja check-picolibc` +`ninja check-compiler-rt` +`ninja check-cxx` +`ninja check-cxxabi` +`ninja check-unwind` + +Alternatively, `ninja check-all` runs all enabled tests. +`ninja check-` runs all the tests for that specific variant. diff --git a/docs/llvmlibc.md b/docs/llvmlibc.md new file mode 100644 index 00000000..d793b350 --- /dev/null +++ b/docs/llvmlibc.md @@ -0,0 +1,79 @@ +# Experimental LLVM libc support + +LLVM Embedded Toolchain for Arm uses +[`picolibc`](https://github.com/picolibc/picolibc) as the standard C +library. For experimental and evaluation purposes, you can instead +choose to use the LLVM project's own C library. + +> **NOTE:** `llvmlibc` support in LLVM Embedded Toolchain for Arm is +> an experimental technology preview, with significant limitations. + +## Building the toolchain with LLVM libc + +> **NOTE:** Building the LLVM libc package is only supported on Linux +> and macOS. + +Configure the toolchain with the CMake setting +`-DLLVM_TOOLCHAIN_C_LIBRARY=llvmlibc` to build a version of the +toolchain based on LLVM libc. + +If you also add `-DLLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL=on` then the +`package-llvm-toolchain` CMake target will generate an overlay package +similar to the [newlib overlay +package](https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/blob/main/docs/newlib.md). +If you unpack this over an existing installation of the toolchain, +then you can switch to LLVM libc by adding `--config=llvmlibc.cfg` on +the command line. + +## Using LLVM libc + +To compile a program with this LLVM libc, you must provide the +following command line options, in addition to `--target`, `-march` or +`-mcpu`, and the input and output files: + +* `--config=llvmlibc.cfg` if you are using LLVM libc as an overlay + package (but you do not need this if you have built the whole + toolchain with only LLVM libc) + +* `-lcrt0` to include a library defining the `_start` symbol (or else + provide that symbol yourself) + +* `-lsemihost` to include a library that implements porting functions + in LLVM's libc in terms of the Arm semihosting API (or else provide + an alternative implementation of those functions yourself) + +* `-Wl,--defsym=__stack=0x`_nnnnnn_ to define the starting value of + your stack pointer. Alternatively, use a linker script that defines + the symbol `__stack` in addition to whatever other memory layout you + want. + +* `-Wl,__llvm_libc_heap_limit=0x`_nnnnnn_ if you are using the heap. + The heap start defined by the value of the symbol `_end` which will + be defined by the linker if no linker script is used. Alternatively + use a linker script that defines the symbols `_end` and + `__llvm_libc_heap_limit` in addition to whatever other memory layout + you want. + +* LLVM libc does not define errno. If you are using a function that + sets errno then you must implement the function `int *__llvm_libc_errno()` + that returns the address of your definition of errno. + +For example: + +``` +clang --config=llvmlibc.cfg --target=arm-none-eabi -march=armv7m -o hello hello.c -lsemihost -lcrt0 -Wl,--defsym=__stack=0x200000 +``` + +## Samples + +The overlay package installs a llvmlibc directory in the samples/src +directory containing sample programs that use LLVM libc. + +## Limitations of LLVM libc in LLVM Embedded Toolchain for Arm + +At present, this toolchain does not build any C++ libraries to go with +LLVM libc. + +At the time of writing this (2024-07), LLVM libc is a work in +progress. It is incomplete: not all standard C library functionality +is provided. diff --git a/docs/migrating.md b/docs/migrating.md index 5e2ea542..c0f29e53 100644 --- a/docs/migrating.md +++ b/docs/migrating.md @@ -88,8 +88,8 @@ however uses different command line options to control selection of semihosting. |Use case|GNU options|LLVM options| |--------|-----------|------------| -|No semihosting|`--specs=nosys.specs`|`-lcrt0`| -|Semihosting|`--specs=rdimon.specs`|`-lcrt0-semihost -lsemihost`| +|No semihosting|`--specs=nosys.specs`| +|Semihosting|`--specs=rdimon.specs`|`-nostartfiles -lcrt0-semihost -lsemihost`| |Newlib-nano|`--specs=nano.specs`|Not available: `picolibc` is an equivalent of `newlib-nano`. ## Linker @@ -100,6 +100,11 @@ however there are some known differences to take into account, see: in the LLD documentation. * The [LLD and GNU linker incompatibilities](https://maskray.me/blog/2020-12-19-lld-and-gnu-linker-incompatibilities) blog post. +* When selecting the printf/scanf picolibc implementation variant with `--defsym from=to`, see +[Printf and Scanf levels in Picolibc](https://github.com/picolibc/picolibc/blob/main/doc/printf.md#printf-and-scanf-levels-in-picolibc), +LLD includes not only the printf/scanf implementation variant from picolibc specified through `--defsym`, but +also the default PICOLIBC_DOUBLE_PRINTF_SCANF variant. To avoid linking the default variant into the application, you +must include the `--gc-sections` linker flag. ## Startup code diff --git a/docs/newlib.md b/docs/newlib.md index 95e3f315..c7f19c3c 100644 --- a/docs/newlib.md +++ b/docs/newlib.md @@ -11,7 +11,7 @@ library variants is provided. ## Using pre-built `newlib` library package 1. Install LLVM Embedded Toolchain for Arm -1. Download corresponding `LLVMEmbeddedToolchainForArm-newlib-overlay` package +1. Download corresponding `LLVM-ET-Arm-newlib-overlay` package and extract it on top of the main toolchain folder. * Note: The overlay package copies all the `newlib` library variants into the @@ -36,9 +36,14 @@ $ clang --config=newlib.cfg --target=arm-none-eabi -march=armv7m -T redboot.ld - > **NOTE:** Building `newlib` package is only supported on Linux and macOS. -Add the `-DLLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL=on` CMake option for the -`package-llvm-toolchain` CMake target to generate the `newlib` overlay package. +Configure the toolchain with the CMake setting +`-DLLVM_TOOLCHAIN_C_LIBRARY=newlib` to build a newlib-based version of +the toolchain. -Note that the `-DLLVM_TOOLCHAIN_NEWLIB_OVERLAY_INSTALL=on` option only generates -the `newlib` package, but does not install it as part of the `install` CMake -target. \ No newline at end of file +If you also add `-DLLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL=on` then the +`package-llvm-toolchain` CMake target will generate the `newlib` +overlay package. + +Note that the `-DLLVM_TOOLCHAIN_LIBRARY_OVERLAY_INSTALL=on` option +only generates the `newlib` package, but does not install it as part +of the `install` CMake target. \ No newline at end of file diff --git a/docs/optimization-flags.md b/docs/optimization-flags.md new file mode 100644 index 00000000..159d07ac --- /dev/null +++ b/docs/optimization-flags.md @@ -0,0 +1,15 @@ +Additional optimization flags +============================= + +## Additional loop unroll in the LTO pipeline +In some cases it is benefitial to perform an additional loop unroll pass so that extra information becomes available to later passes, e.g. SROA. +Use cases where this could be beneficial - multiple (N>=4) nested loops. + +### Usage: + -Wl,-plugin-opt=-extra-LTO-loop-unroll=true/false + +## Inline memcpy with LD/ST instructions +In some cases inlining of memcpy instructions performs best when using LD/ST instructions. + +### Usage: + -mllvm -enable-inline-memcpy-ld-st diff --git a/fvp/config/big-endian.cfg b/fvp/config/big-endian.cfg new file mode 100644 index 00000000..4509f153 --- /dev/null +++ b/fvp/config/big-endian.cfg @@ -0,0 +1 @@ +cluster0.cpu0.CFGEND=1 diff --git a/fvp/config/cortex-m85.cfg b/fvp/config/cortex-m85.cfg new file mode 100644 index 00000000..6bb13804 --- /dev/null +++ b/fvp/config/cortex-m85.cfg @@ -0,0 +1,14 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable GUI visualisation. +mps3_board.visualisation.disable-visualisation=1 + +# Silence output about telnet ports. +# Yes, the terminals are numbered 0, 1, 2 and 5 +mps3_board.telnetterminal0.quiet=1 +mps3_board.telnetterminal1.quiet=1 +mps3_board.telnetterminal2.quiet=1 +mps3_board.telnetterminal5.quiet=1 + +# Enable semihosting +cpu0.semihosting-enable=1 diff --git a/fvp/config/m-big-endian.cfg b/fvp/config/m-big-endian.cfg new file mode 100644 index 00000000..9a8fc07e --- /dev/null +++ b/fvp/config/m-big-endian.cfg @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates +cpu0.CFGBIGEND=1 diff --git a/fvp/config/m-fp.cfg b/fvp/config/m-fp.cfg new file mode 100644 index 00000000..a52f3157 --- /dev/null +++ b/fvp/config/m-fp.cfg @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Enable M-profile scalar FPU. This includes the double-precision extension, I +# don't see a parameter to disable that in the Corstone-310 FVP, probably +# because Cortex-M85 can't be configured with an SP-only FPU. +cpu0.FPU=1 diff --git a/fvp/config/m-nofp.cfg b/fvp/config/m-nofp.cfg new file mode 100644 index 00000000..741af109 --- /dev/null +++ b/fvp/config/m-nofp.cfg @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable M-profile scalar FPU +cpu0.FPU=0 diff --git a/fvp/config/m-pacbti.cfg b/fvp/config/m-pacbti.cfg new file mode 100644 index 00000000..c2e866d2 --- /dev/null +++ b/fvp/config/m-pacbti.cfg @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Enable M-profile PAC and BTI +cpu0.CFGPACBTI=1 +cpu0.ID_ISAR5.PACBTI=1 diff --git a/fvp/config/mve-fp.cfg b/fvp/config/mve-fp.cfg new file mode 100644 index 00000000..08da2dca --- /dev/null +++ b/fvp/config/mve-fp.cfg @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Enable integer and floating-point MVE +cpu0.MVE=2 diff --git a/fvp/config/mve-int.cfg b/fvp/config/mve-int.cfg new file mode 100644 index 00000000..d3f728b7 --- /dev/null +++ b/fvp/config/mve-int.cfg @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Enable integer-only MVE +cpu0.MVE=1 diff --git a/fvp/config/mve-none.cfg b/fvp/config/mve-none.cfg new file mode 100644 index 00000000..ecbcf702 --- /dev/null +++ b/fvp/config/mve-none.cfg @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable MVE +cpu0.MVE=0 diff --git a/fvp/config/v8a-aarch32.cfg b/fvp/config/v8a-aarch32.cfg new file mode 100644 index 00000000..7d2ac0d8 --- /dev/null +++ b/fvp/config/v8a-aarch32.cfg @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable GUI visualisation. +bp.vis.disable_visualisation=1 + +# Silence output about telnet ports. +bp.terminal_0.quiet=1 +bp.terminal_1.quiet=1 +bp.terminal_2.quiet=1 +bp.terminal_3.quiet=1 + +# We only want a single core +cluster0.NUM_CORES=1 +cluster1.NUM_CORES=0 + +# All memory is non-secure, so we can boot straight into main DRAM. +bp.secure_memory=0 + +# Boot in AArch32 mode +cluster0.cpu0.CONFIG64=0 diff --git a/fvp/config/v8a-aarch64.cfg b/fvp/config/v8a-aarch64.cfg new file mode 100644 index 00000000..c5176598 --- /dev/null +++ b/fvp/config/v8a-aarch64.cfg @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable GUI visualisation. +bp.vis.disable_visualisation=1 + +# Silence output about telnet ports. +bp.terminal_0.quiet=1 +bp.terminal_1.quiet=1 +bp.terminal_2.quiet=1 +bp.terminal_3.quiet=1 + +# We only want a single core +cluster0.NUM_CORES=1 +cluster1.NUM_CORES=0 + +# All memory is non-secure, so we can boot straight into main DRAM. +bp.secure_memory=0 + +# Boot in AArch64 mode +cluster0.cpu0.CONFIG64=1 diff --git a/fvp/config/v8r-aarch32.cfg b/fvp/config/v8r-aarch32.cfg new file mode 100644 index 00000000..b51a8747 --- /dev/null +++ b/fvp/config/v8r-aarch32.cfg @@ -0,0 +1,16 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable GUI visualisation. +bp.vis.disable_visualisation=1 + +# Silence output about telnet ports. +bp.terminal_0.quiet=1 +bp.terminal_1.quiet=1 +bp.terminal_2.quiet=1 +bp.terminal_3.quiet=1 + +# We only want a single core +cluster0.NUM_CORES=1 + +# AArch32 mode +cluster0.has_aarch64=0 diff --git a/fvp/config/v8r-aarch64.cfg b/fvp/config/v8r-aarch64.cfg new file mode 100644 index 00000000..4ad59b5b --- /dev/null +++ b/fvp/config/v8r-aarch64.cfg @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# Disable GUI visualisation. +bp.vis.disable_visualisation=1 + +# Silence output about telnet ports. +bp.terminal_0.quiet=1 +bp.terminal_1.quiet=1 +bp.terminal_2.quiet=1 +bp.terminal_3.quiet=1 + +# We only want a single core +cluster0.NUM_CORES=1 + +# AArch64 mode +cluster0.has_aarch64=1 + +# Suppress some warnings caused by defaults not valid for AArch64, these values +# all come from the warning message if you leave them at the default. +cluster0.gicv3.cpuintf-mmap-access-level=2 +cluster0.gicv3.SRE-enable-action-on-mmap=2 +cluster0.gicv3.SRE-EL2-enable-RAO=1 +cluster0.gicv3.extended-interrupt-range-support=1 diff --git a/fvp/get_fvps.sh b/fvp/get_fvps.sh new file mode 100755 index 00000000..379a5a63 --- /dev/null +++ b/fvp/get_fvps.sh @@ -0,0 +1,84 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its affiliates + +# This script downloads the FVP models which we use for testing the toolchain. +# These are available at no cost, but come with EULAs which must be agreed to +# before running them. When run with --non-interactive, this script assumes +# that you agree to these EULAs. If run without that option, the installers for +# some of the packages will present you with the license before installing. The +# AEMv8A and AEMv8R packages do not have installers, instead they place their +# license into the `fvp/install/license_terms' directory. + +set -euxo pipefail + +args=$(getopt --options "" --longoptions "non-interactive" -- "${@}") || exit +eval "set -- ${args}" + +# Change into the directory containing this script. We'll make +# "download" and "install" subdirectories below that. +cd "$(dirname "$0")" + +INSTALLER_FLAGS_CORSTONE=() +INSTALLER_FLAGS_CRYPTO=() + +while true; do + case "${1}" in + (--non-interactive) + INSTALLER_FLAGS_CORSTONE=(--i-agree-to-the-contained-eula --no-interactive --force) + INSTALLER_FLAGS_CRYPTO=(--i-accept-the-end-user-license-agreement --basepath "$PWD/install") + shift 1 + ;; + (--) + shift + break + (*) + exit 1 + ;; + esac +done + +URL_CORSTONE_310='https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-310/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz?rev=c370b571bdff42d3a0152471eca3d798&hash=1E388EE3B6E8F675D02D2832DBE61946DEC0386A' +URL_BASE_AEM_A='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27/FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz' +URL_BASE_AEM_R='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27/FVP_Base_AEMv8R_11.27_19_Linux64.tgz' +URL_CRYPTO='https://developer.arm.com/-/cdn-downloads/permalink/Fast-Models-Crypto-Plug-in/FM-11.27/FastModels_crypto_11.27.019_Linux64.tgz' + +mkdir -p download +pushd download +DOWNLOAD_DIR="$(pwd)" +wget --content-disposition --no-clobber "${URL_CORSTONE_310}" +wget --content-disposition --no-clobber "${URL_BASE_AEM_A}" +wget --content-disposition --no-clobber "${URL_BASE_AEM_R}" +wget --content-disposition --no-clobber "${URL_CRYPTO}" +popd + +mkdir -p install +pushd install + +if [ ! -d "Corstone-310" ]; then +tar -xf ${DOWNLOAD_DIR}/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz +./FVP_Corstone_SSE-310.sh --destination ./Corstone-310 "${INSTALLER_FLAGS_CORSTONE[@]}" +fi + +if [ ! -d "Base_RevC_AEMvA_pkg" ]; then +tar -xf ${DOWNLOAD_DIR}/FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz +# (Extracted directly into ./Base_RevC_AEMvA_pkg/, no installer) +fi + +if [ ! -d "AEMv8R_base_pkg" ]; then +tar -xf ${DOWNLOAD_DIR}/FVP_Base_AEMv8R_11.27_19_Linux64.tgz +# (Extracted directly into ./AEMv8R_base_pkg/, no installer) +fi + +if [ ! -d "FastModelsPortfolio_11.27" ]; then +tar -xf ${DOWNLOAD_DIR}/FastModels_crypto_11.27.019_Linux64.tgz +# SDDKW-93582: Non-interactive installation fails if cwd is different. +pushd FastModels_crypto_11.27.019_Linux64 +# This installer doesn't allow providing a default path for +# interactive installation. The user will have to enter the install +# directory as the target by hand. +./setup.bin "${INSTALLER_FLAGS_CRYPTO[@]}" +popd +fi + +popd diff --git a/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/Makefile b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/Makefile new file mode 100644 index 00000000..2197d30a --- /dev/null +++ b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/Makefile @@ -0,0 +1,37 @@ +# +# Copyright (c) 2020-2024, Arm Limited and affiliates. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +include ../../../Makefile.conf + +build: hello.elf + +hello.elf: *.c + ../$(BIN_PATH)/clang --config=llvmlibc.cfg $(MICROBIT_TARGET) -nostartfiles -lsemihost -g -fno-exceptions -fno-rtti -T microbit-llvmlibc.ld -o hello.elf $^ + +%.hex: %.elf + ../$(BIN_PATH)/llvm-objcopy -O ihex $< $@ + +run: hello.hex + qemu-system-arm -M microbit -semihosting -nographic -device loader,file=$< + +debug: hello.hex + qemu-system-arm -M microbit -semihosting -nographic -device loader,file=$< -s -S + +clean: + rm -f *.elf *.hex + +.PHONY: clean run debug diff --git a/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/crt0llvmlibc.c b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/crt0llvmlibc.c new file mode 100644 index 00000000..28c3fb01 --- /dev/null +++ b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/crt0llvmlibc.c @@ -0,0 +1,41 @@ +// Copyright (c) 2024, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include +#include + +extern int main(int argc, char** argv); + +extern void _platform_init(); + +extern char __data_source[]; +extern char __data_start[]; +extern char __data_end[]; +extern char __data_size[]; +extern char __bss_start[]; +extern char __bss_end[]; +extern char __bss_size[]; +extern char __tls_base[]; +extern char __tdata_end[]; +extern char __tls_end[]; + +void _start(void) { + memcpy(__data_start, __data_source, (size_t) __data_size); + memset(__bss_start, 0, (size_t) __bss_size); + _platform_init(); + _Exit(main(0, NULL)); +} diff --git a/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/hello.c b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/hello.c new file mode 100644 index 00000000..65455d53 --- /dev/null +++ b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/hello.c @@ -0,0 +1,46 @@ +// Copyright (c) 2024, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include +#include +#include + +// Implementation of errno +int *__llvm_libc_errno() { + static int internal_err; + return &internal_err; +} + +// Example that uses heap, string and math library. + +int main(void) { + const char *hello_s = "hello "; + const char *world_s = "world"; + const size_t hello_s_len = strlen(hello_s); + const size_t world_s_len = strlen(world_s); + const size_t out_s_len = hello_s_len + world_s_len + 1; + char *out_s = (char*) malloc(out_s_len); + assert(out_s_len >= hello_s_len + 1); + strncpy(out_s, hello_s, hello_s_len + 1); + assert(out_s_len >= strlen(out_s) + world_s_len + 1); + strncat(out_s, world_s, world_s_len + 1); + // 2024-10-17 Embedded printf implementation does not currently + // support printing floating point numbers. + printf("%s %li\n", out_s, lround(400000 * atanf(1.0f))); + free(out_s); + return 0; +} diff --git a/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/microbit-llvmlibc.ld b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/microbit-llvmlibc.ld new file mode 100644 index 00000000..e74a19af --- /dev/null +++ b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/microbit-llvmlibc.ld @@ -0,0 +1,241 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright © 2019 Keith Packard + * Copyright (c) 2024, Arm Limited and affiliates. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Linker script adapted from picolibc linker script + * llvm-libc uses different linker defined symbols for heap placement. + */ + +/* Hard-coded for Cortex-M0 */ +MEMORY +{ + boot_flash (rx!w) : + ORIGIN = 0x00000000, + LENGTH = 0x3000 + flash (rx!w) : + ORIGIN = 0x3000, + LENGTH = 0x3d000 + ram (w!rx) : + ORIGIN = 0x20000000, + LENGTH = 0x4000 +} + +PHDRS +{ + text_boot_flash PT_LOAD; + text PT_LOAD; + ram_init PT_LOAD; + ram PT_LOAD; + tls PT_TLS; +} + +SECTIONS +{ + PROVIDE(__stack = ORIGIN(ram) + LENGTH(ram)); + + .boot_flash : { + KEEP (*(.vectors)) + } >boot_flash AT>boot_flash :text_boot_flash + + .text : { + + /* code */ + *(.text.unlikely .text.unlikely.*) + *(.text.startup .text.startup.*) + *(.text .text.* .opd .opd.*) + PROVIDE (__start___lcxx_override = .); + *(__lcxx_override) + PROVIDE (__stop___lcxx_override = .); + *(.gnu.linkonce.t.*) + KEEP (*(.fini .fini.*)) + __text_end = .; + + PROVIDE (__etext = __text_end); + PROVIDE (_etext = __text_end); + PROVIDE (etext = __text_end); + + /* Need to pre-align so that the symbols come after padding */ + . = ALIGN(8); + + /* lists of constructors and destructors */ + PROVIDE_HIDDEN ( __preinit_array_start = . ); + KEEP (*(.preinit_array)) + PROVIDE_HIDDEN ( __preinit_array_end = . ); + + PROVIDE_HIDDEN ( __init_array_start = . ); + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array .ctors)) + PROVIDE_HIDDEN ( __init_array_end = . ); + + PROVIDE_HIDDEN ( __fini_array_start = . ); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array .dtors)) + PROVIDE_HIDDEN ( __fini_array_end = . ); + + } >flash AT>flash :text + + .rodata : { + + /* read-only data */ + *(.rdata) + *(.rodata .rodata.*) + *(.gnu.linkonce.r.*) + + *(.srodata.cst16) + *(.srodata.cst8) + *(.srodata.cst4) + *(.srodata.cst2) + *(.srodata .srodata.*) + + } >flash AT>flash :text + + .data.rel.ro : { + + /* data that needs relocating */ + *(.data.rel.ro .data.rel.ro.*) + + } >flash AT>flash :text + + + /* + * Needs to be in its own segment with the PLT entries first + * so that the linker will compute the offsets to those + * entries correctly. + */ + .got : { + *(.got.plt) + *(.got) + } >flash AT>flash :text + + .except_ordered : { + *(.gcc_except_table *.gcc_except_table.*) + *(.ARM.extab* .gnu.linkonce.armextab.*) + } >flash AT>flash :text + + .except_unordered : { + . = ALIGN(8); + + PROVIDE(__exidx_start = .); + *(.ARM.exidx*) + PROVIDE(__exidx_end = .); + } >flash AT>flash :text + + + .data : /* For ld.bfd: ALIGN_WITH_INPUT */ { + *(.data .data.*) + *(.gnu.linkonce.d.*) + + /* Need to pre-align so that the symbols come after padding */ + . = ALIGN(8); + + PROVIDE( __global_pointer$ = . + 0x800 ); + PROVIDE( _gp = . + 0x8000); + *(.sdata .sdata.* .sdata2.*) + *(.gnu.linkonce.s.*) + } >ram AT>flash :ram_init + PROVIDE(__data_start = ADDR(.data)); + PROVIDE(__data_source = LOADADDR(.data)); + + /* Thread local initialized data. This gets + * space allocated as it is expected to be placed + * in ram to be used as a template for TLS data blocks + * allocated at runtime. We're slightly abusing that + * by placing the data in flash where it will be copied + * into the allocate ram addresses by the existing + * data initialization code in crt0. + * BFD includes .tbss alignment when computing .tdata + * alignment, but for ld.lld we have to explicitly pad + * as it only guarantees usage as a TLS template works + * rather than supporting this use case. + */ + .tdata : ALIGN(__tls_align) /* For ld.bfd: ALIGN_WITH_INPUT */ { + *(.tdata .tdata.* .gnu.linkonce.td.*) + PROVIDE(__data_end = .); + PROVIDE(__tdata_end = .); + } >ram AT>flash :tls :ram_init + PROVIDE( __tls_base = ADDR(.tdata)); + PROVIDE( __tdata_start = ADDR(.tdata)); + PROVIDE( __tdata_source = LOADADDR(.tdata) ); + PROVIDE( __tdata_source_end = LOADADDR(.tdata) + SIZEOF(.tdata) ); + PROVIDE( __data_source_end = __tdata_source_end ); + PROVIDE( __tdata_size = SIZEOF(.tdata) ); + + PROVIDE( __edata = __data_end ); + PROVIDE( _edata = __data_end ); + PROVIDE( edata = __data_end ); + PROVIDE( __data_size = __data_end - __data_start ); + PROVIDE( __data_source_size = __data_source_end - __data_source ); + + .tbss (NOLOAD) : { + *(.tbss .tbss.* .gnu.linkonce.tb.*) + *(.tcommon) + PROVIDE( __tls_end = . ); + PROVIDE( __tbss_end = . ); + } >ram AT>ram :tls :ram + PROVIDE( __bss_start = ADDR(.tbss)); + PROVIDE( __tbss_start = ADDR(.tbss)); + PROVIDE( __tbss_offset = ADDR(.tbss) - ADDR(.tdata) ); + PROVIDE( __tbss_size = SIZEOF(.tbss) ); + PROVIDE( __tls_size = __tls_end - __tls_base ); + PROVIDE( __tls_align = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss)) ); + PROVIDE( __tls_size_align = (__tls_size + __tls_align - 1) & ~(__tls_align - 1)); + PROVIDE( __arm32_tls_tcb_offset = MAX(8, __tls_align) ); + PROVIDE( __arm64_tls_tcb_offset = MAX(16, __tls_align) ); + + .bss (NOLOAD) : { + *(.sbss*) + *(.gnu.linkonce.sb.*) + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + + /* Align the heap */ + . = ALIGN(8); + __bss_end = .; + } >ram AT>ram :ram + PROVIDE( __non_tls_bss_start = ADDR(.bss) ); + PROVIDE( __end = __bss_end ); + _end = __bss_end; + PROVIDE( end = __bss_end ); + PROVIDE( __bss_size = __bss_end - __bss_start ); + + /* Make the rest of memory available for heap storage + * LLVM libc denotes heap with [__end, __llvm_libc_heap_limit) + */ + PROVIDE (__llvm_libc_heap_limit = __stack - (DEFINED(__stack_size) ? __stack_size : 4K)); +} + +ASSERT( __data_size == __data_source_size, "ERROR: .data/.tdata flash size does not match RAM size"); + diff --git a/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/vector.c b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/vector.c new file mode 100644 index 00000000..9ac444f6 --- /dev/null +++ b/llvmlibc-samples/src/llvmlibc/baremetal-semihosting/vector.c @@ -0,0 +1,56 @@ +// Copyright (c) 2024, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include + +/* Adapted from https://developer.arm.com/documentation/107565/0101/Use-case-examples/Generic-Information/What-is-inside-a-program-image-/Vector-table */ + +extern void __llvm_libc_exit(); + +extern uint8_t __stack[]; + +extern void _start(void); + + +void NMI_Handler() {} +void HardFault_Handler() { __llvm_libc_exit(); } +void MemManage_Handler() { __llvm_libc_exit(); } +void BusFault_Handler() { __llvm_libc_exit(); } +void UsageFault_Handler() { __llvm_libc_exit(); } +void SVC_Handler() {} +void DebugMon_Handler() {} +void PendSV_Handler() {} +void SysTick_Handler() {} +typedef void(*VECTOR_TABLE_Type)(void); +const VECTOR_TABLE_Type __VECTOR_TABLE[496] __attribute__((section(".vectors"))) __attribute__((aligned(128))) = { + (VECTOR_TABLE_Type)__stack, /* Initial Stack Pointer */ + _start, /* Reset Handler */ + NMI_Handler, /* NMI Handler */ + HardFault_Handler, /* Hard Fault Handler */ + MemManage_Handler, /* MPU Fault Handler */ + BusFault_Handler, /* Bus Fault Handler */ + UsageFault_Handler, /* Usage Fault Handler */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + 0, /* Reserved */ + SVC_Handler, /* SVC Handler */ + DebugMon_Handler, /* Debug Monitor Handler */ + 0, /* Reserved */ + PendSV_Handler, /* PendSV Handler */ + SysTick_Handler, /* SysTick Handler */ + /* Unused */ +}; diff --git a/llvmlibc-support/CMakeLists.txt b/llvmlibc-support/CMakeLists.txt new file mode 100644 index 00000000..0e61b37f --- /dev/null +++ b/llvmlibc-support/CMakeLists.txt @@ -0,0 +1,46 @@ +# +# Copyright (c) 2022, Arm Limited and affiliates. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This directory builds two additional library files to go with llvm-libc: +# +# libcrt0.a contains an implementation of the _start() default entry point, +# which sets up the stack and does any necessary initialization before +# calling main(). +# +# libsemihost.a implements llvm-libc's porting function API such as +# __llvm_libc_stdio_write, in terms of the Arm semihosting system. +# +# To use LLVM libc in a semihosting context, include both of these +# libraries. To use it in a different context, you will need to +# reimplement the same functions that libsemihost.a provides, but +# libcrt0.a might still be useful. + +cmake_minimum_required(VERSION 3.20.0) +project(llvmlibc-support LANGUAGES C ASM) + +add_library(semihost STATIC + init.c + exit.c + stdio_read.c + stdio_write.c +) + +add_library(crt0 STATIC + crt0.c +) + +install(TARGETS semihost crt0) diff --git a/llvmlibc-support/crt0.c b/llvmlibc-support/crt0.c new file mode 100644 index 00000000..b2f11693 --- /dev/null +++ b/llvmlibc-support/crt0.c @@ -0,0 +1,34 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include +#include + +#include "platform.h" + +int main(int, char **); + +__attribute__((used)) static void c_startup(void) { + _platform_init(); + _Exit(main(0, NULL)); +} + +extern long __stack[]; +__attribute__((naked)) void _start(void) { + __asm__("mov sp, %0" : : "r"(__stack)); + __asm__("b c_startup"); +} diff --git a/llvmlibc-support/exit.c b/llvmlibc-support/exit.c new file mode 100644 index 00000000..f6c8e810 --- /dev/null +++ b/llvmlibc-support/exit.c @@ -0,0 +1,34 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "semihost.h" + +void __llvm_libc_exit(int status) { + +#if defined(__ARM_64BIT_STATE) && __ARM_64BIT_STATE + size_t block[2]; + block[0] = ADP_Stopped_ApplicationExit; + block[1] = status; + semihosting_call(SYS_EXIT, block); +#else + semihosting_call(SYS_EXIT, (const void *)ADP_Stopped_ApplicationExit); +#endif + + __builtin_unreachable(); /* semihosting call doesn't return */ +} diff --git a/llvmlibc-support/init.c b/llvmlibc-support/init.c new file mode 100644 index 00000000..bbe8d3c8 --- /dev/null +++ b/llvmlibc-support/init.c @@ -0,0 +1,39 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "platform.h" +#include "semihost.h" + +struct __llvm_libc_stdio_cookie __llvm_libc_stdin_cookie; +struct __llvm_libc_stdio_cookie __llvm_libc_stdout_cookie; +struct __llvm_libc_stdio_cookie __llvm_libc_stderr_cookie; + +static void stdio_open(struct __llvm_libc_stdio_cookie *cookie, int mode) { + size_t args[3]; + args[0] = (size_t) ":tt"; + args[1] = (size_t)mode; + args[2] = (size_t)3; /* name length */ + cookie->handle = semihosting_call(SYS_OPEN, args); +} + +void _platform_init(void) { + stdio_open(&__llvm_libc_stdin_cookie, OPENMODE_R); + stdio_open(&__llvm_libc_stdout_cookie, OPENMODE_W); + stdio_open(&__llvm_libc_stderr_cookie, OPENMODE_W); +} diff --git a/llvmlibc-support/platform.h b/llvmlibc-support/platform.h new file mode 100644 index 00000000..668c3304 --- /dev/null +++ b/llvmlibc-support/platform.h @@ -0,0 +1,34 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// This header file defines the interface between libcrt0.a, which defines +// the program entry point, and libsemihost.a, which implements the +// LLVM-libc porting functions in terms of semihosting. If you replace +// libsemihost.a with something else, this header file shows how to make +// that work with libcrt0.a. + +#ifndef LLVMET_LLVMLIBC_SUPPORT_PLATFORM_H +#define LLVMET_LLVMLIBC_SUPPORT_PLATFORM_H + +// libcrt0.a will call this function after the stack pointer is +// initialized. If any setup specific to the libc porting layer is +// needed, this is where to do it. For example, in semihosting, the +// standard I/O handles must be opened via the SYS_OPEN operation, and +// this function is where libsemihost.a does it. +void _platform_init(void); + +#endif // LLVMET_LLVMLIBC_SUPPORT_PLATFORM_H diff --git a/llvmlibc-support/semihost.h b/llvmlibc-support/semihost.h new file mode 100644 index 00000000..71c80949 --- /dev/null +++ b/llvmlibc-support/semihost.h @@ -0,0 +1,117 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// This header file provides internal definitions for libsemihost.a, +// including an inline function to make a semihosting call, and a lot +// of constant definitions. + +#ifndef LLVMET_LLVMLIBC_SUPPORT_SEMIHOST_H +#define LLVMET_LLVMLIBC_SUPPORT_SEMIHOST_H + +#include + +#if __ARM_64BIT_STATE +# define ARG_REG_0 "x0" +# define ARG_REG_1 "x1" +#else +# define ARG_REG_0 "r0" +# define ARG_REG_1 "r1" +#endif + +#if __ARM_64BIT_STATE // A64 +# define SEMIHOST_INSTRUCTION "hlt #0xf000" +#elif defined(__thumb__) // T32 +# if defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M' +# define SEMIHOST_INSTRUCTION "bkpt #0xAB" +# elif defined(HLT_SEMIHOSTING) +# define SEMIHOST_INSTRUCTION ".inst.n 0xbabc" // hlt #60 +# else +# define SEMIHOST_INSTRUCTION "svc 0xab" +# endif +#else // A32 +# if defined(HLT_SEMIHOSTING) +# define SEMIHOST_INSTRUCTION ".inst 0xe10f0070" // hlt #0xf000 +# else +# define SEMIHOST_INSTRUCTION "svc 0x123456" +# endif +#endif + +__attribute__((always_inline)) +static long semihosting_call(long val, const void *ptr) { + register long v __asm__(ARG_REG_0) = val; + register const void *p __asm__(ARG_REG_1) = ptr; + __asm__ __volatile__(SEMIHOST_INSTRUCTION + : "+r"(v), "+r"(p) + : + : "memory", "cc"); + return v; +} + +#define SYS_CLOCK 0x10 +#define SYS_CLOSE 0x02 +#define SYS_ELAPSED 0x30 +#define SYS_ERRNO 0x13 +#define SYS_EXIT 0x18 +#define SYS_EXIT_EXTENDED 0x20 +#define SYS_FLEN 0x0c +#define SYS_GET_CMDLINE 0x15 +#define SYS_HEAPINFO 0x16 +#define SYS_ISERROR 0x08 +#define SYS_ISTTY 0x09 +#define SYS_OPEN 0x01 +#define SYS_READ 0x06 +#define SYS_READC 0x07 +#define SYS_REMOVE 0x0e +#define SYS_RENAME 0x0f +#define SYS_SEEK 0x0a +#define SYS_SYSTEM 0x12 +#define SYS_TICKFREQ 0x31 +#define SYS_TIME 0x11 +#define SYS_TMPNAM 0x0d +#define SYS_WRITE0 0x04 +#define SYS_WRITE 0x05 +#define SYS_WRITEC 0x03 + +#define ADP_Stopped_BranchThroughZero 0x20000 +#define ADP_Stopped_UndefinedInstr 0x20001 +#define ADP_Stopped_SoftwareInterrupt 0x20002 +#define ADP_Stopped_PrefetchAbort 0x20003 +#define ADP_Stopped_DataAbort 0x20004 +#define ADP_Stopped_AddressException 0x20005 +#define ADP_Stopped_IRQ 0x20006 +#define ADP_Stopped_FIQ 0x20007 +#define ADP_Stopped_BreakPoint 0x20020 +#define ADP_Stopped_WatchPoint 0x20021 +#define ADP_Stopped_StepComplete 0x20022 +#define ADP_Stopped_RunTimeErrorUnknown 0x20023 +#define ADP_Stopped_InternalError 0x20024 +#define ADP_Stopped_UserInterruption 0x20025 +#define ADP_Stopped_ApplicationExit 0x20026 +#define ADP_Stopped_StackOverflow 0x20027 +#define ADP_Stopped_DivisionByZero 0x20028 +#define ADP_Stopped_OSSpecific 0x20029 + +/* SYS_OPEN modes must be one of R,W,A, plus an optional B and optional PLUS */ +#define OPENMODE_R 0 +#define OPENMODE_W 4 +#define OPENMODE_A 8 +#define OPENMODE_B 1 +#define OPENMODE_PLUS 2 + +struct __llvm_libc_stdio_cookie { int handle; }; + +#endif // LLVMET_LLVMLIBC_SUPPORT_SEMIHOST_H diff --git a/llvmlibc-support/stdio_read.c b/llvmlibc-support/stdio_read.c new file mode 100644 index 00000000..aa2c00fe --- /dev/null +++ b/llvmlibc-support/stdio_read.c @@ -0,0 +1,33 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "semihost.h" + +ssize_t __llvm_libc_stdio_read(struct __llvm_libc_stdio_cookie *cookie, + const char *buf, size_t size) { + size_t args[4]; + args[0] = (size_t)cookie->handle; + args[1] = (size_t)buf; + args[2] = (size_t)size; + args[3] = 0; + ssize_t retval = semihosting_call(SYS_READ, args); + if (retval >= 0) + retval = size - retval; + return retval; +} diff --git a/llvmlibc-support/stdio_write.c b/llvmlibc-support/stdio_write.c new file mode 100644 index 00000000..9b7741fd --- /dev/null +++ b/llvmlibc-support/stdio_write.c @@ -0,0 +1,32 @@ +// +// Copyright (c) 2022, Arm Limited and affiliates. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "semihost.h" + +ssize_t __llvm_libc_stdio_write(struct __llvm_libc_stdio_cookie *cookie, + const char *buf, size_t size) { + size_t args[4]; + args[0] = (size_t)cookie->handle; + args[1] = (size_t)buf; + args[2] = (size_t)size; + ssize_t retval = semihosting_call(SYS_WRITE, args); + if (retval >= 0) + retval = size - retval; + return retval; +} diff --git a/llvmlibc.cfg b/llvmlibc.cfg new file mode 100644 index 00000000..14aba3bf --- /dev/null +++ b/llvmlibc.cfg @@ -0,0 +1 @@ +--sysroot /../lib/clang-runtimes/llvmlibc diff --git a/packagetest/hello.c b/packagetest/hello.c index b0bb0ee7..f9ee5469 100644 --- a/packagetest/hello.c +++ b/packagetest/hello.c @@ -1,4 +1,4 @@ -// RUN: %clang --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -T %S/Inputs/microbit.ld %s -o %t.out +// RUN: %clang --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -T %S/Inputs/microbit.ld %s -o %t.out // RUN: qemu-system-arm -M microbit -semihosting -nographic -device loader,file=%t.out 2>&1 | FileCheck %s #include diff --git a/packagetest/hello.cpp b/packagetest/hello.cpp index 65b7572e..107c72d0 100644 --- a/packagetest/hello.cpp +++ b/packagetest/hello.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -T %S/Inputs/microbit.ld %s -o %t.out +// RUN: %clangxx --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -T %S/Inputs/microbit.ld %s -o %t.out // RUN: qemu-system-arm -M microbit -semihosting -nographic -device loader,file=%t.out 2>&1 | FileCheck %s // Include as many C++17 headers as possible. diff --git a/patches/llvm-project-perf/0001-LTOpasses-add-loop-unroll.patch b/patches/llvm-project-perf/0001-LTOpasses-add-loop-unroll.patch new file mode 100644 index 00000000..43d1e0b2 --- /dev/null +++ b/patches/llvm-project-perf/0001-LTOpasses-add-loop-unroll.patch @@ -0,0 +1,55 @@ +From 4adfc5231d2c0182d6278b4aa75eec57648e5dd4 Mon Sep 17 00:00:00 2001 +From: Vladi Krapp +Date: Tue, 3 Sep 2024 14:12:48 +0100 +Subject: [Pipelines] Additional unrolling in LTO + +Some workloads require specific sequences of events to happen +to fully simplify. This adds an extra full unrolling pass to help these +cases on the cores with branch predictors. It helps produce simplified +loops, which can then be SROA'd allowing further simplification, which +can be important for performance. +Feature adds extra compile time to get extra performance and +is enabled by the opt flag 'extra-LTO-loop-unroll' (off by default). + +Original patch by David Green (david.green@arm.com) +--- + llvm/lib/Passes/PassBuilderPipelines.cpp | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp +index 1184123c7710..6dc45d85927a 100644 +--- a/llvm/lib/Passes/PassBuilderPipelines.cpp ++++ b/llvm/lib/Passes/PassBuilderPipelines.cpp +@@ -332,6 +332,10 @@ namespace llvm { + extern cl::opt MaxDevirtIterations; + } // namespace llvm + ++static cl::opt LTOExtraLoopUnroll( ++ "extra-LTO-loop-unroll", cl::init(false), cl::Hidden, ++ cl::desc("Perform extra loop unrolling pass to assist SROA")); ++ + void PassBuilder::invokePeepholeEPCallbacks(FunctionPassManager &FPM, + OptimizationLevel Level) { + for (auto &C : PeepholeEPCallbacks) +@@ -2018,6 +2022,18 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, + MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(std::move(CGPM))); + + FunctionPassManager FPM; ++ ++ if (LTOExtraLoopUnroll) { ++ LoopPassManager OmaxLPM; ++ OmaxLPM.addPass(LoopFullUnrollPass(Level.getSpeedupLevel(), ++ /* OnlyWhenForced= */ !PTO.LoopUnrolling, ++ PTO.ForgetAllSCEVInLoopUnroll)); ++ FPM.addPass( ++ createFunctionToLoopPassAdaptor(std::move(OmaxLPM), ++ /*UseMemorySSA=*/false, ++ /*UseBlockFrequencyInfo=*/true)); ++ } ++ + // The IPO Passes may leave cruft around. Clean up after them. + FPM.addPass(InstCombinePass()); + invokePeepholeEPCallbacks(FPM, Level); +-- +2.34.1 + diff --git a/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch b/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch new file mode 100644 index 00000000..7c666bc1 --- /dev/null +++ b/patches/llvm-project-perf/0002-ARM-Codegen-Set-LDM-STM-inlining-preference-for-v7m.patch @@ -0,0 +1,344 @@ +From 411bab1ff439215c060127b6a5188ed0c9ed5d65 Mon Sep 17 00:00:00 2001 +From: Vrukesh V Panse +Date: Thu, 2 Jan 2025 10:29:56 +0000 +Subject: [NFC]: Update the patch file with upstream changes of SelectionDAG + +--- + llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp | 120 +++++++++++++++ + llvm/lib/Target/ARM/ARMSelectionDAGInfo.h | 6 + + llvm/test/CodeGen/ARM/memcpy-v7m.ll | 161 ++++++++++++++++++++ + 3 files changed, 287 insertions(+) + create mode 100644 llvm/test/CodeGen/ARM/memcpy-v7m.ll + +diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +index a39487c318f8..ca8de16e66c4 100644 +--- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp ++++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp +@@ -30,6 +30,10 @@ cl::opt EnableMemtransferTPLoop( + "Allow (may be subject to certain conditions) " + "conversion of memcpy to TP loop."))); + ++static cl::opt EnableInlineMemcpyAsLdSt( ++ "enable-inline-memcpy-ld-st", cl::init(false), cl::Hidden, ++ cl::desc("Inline memcpy with LD/ST instructions.")); ++ + bool ARMSelectionDAGInfo::isTargetMemoryOpcode(unsigned Opcode) const { + return Opcode >= ARMISD::FIRST_MEMORY_OPCODE && + Opcode <= ARMISD::LAST_MEMORY_OPCODE; +@@ -141,6 +145,118 @@ SDValue ARMSelectionDAGInfo::EmitSpecializedLibcall( + return CallResult.second; + } + ++SDValue ARMSelectionDAGInfo::EmitMemcpyAsLdSt( ++ SelectionDAG &DAG, SDLoc dl, const ARMSubtarget &Subtarget, SDValue Chain, ++ SDValue Dst, SDValue Src, uint64_t SizeVal, bool isVolatile, ++ MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const { ++ // Do repeated batches of 4-byte loads and stores. ++ unsigned BytesLeft = SizeVal & 3; ++ unsigned NumMemOps = SizeVal >> 2; ++ unsigned EmittedNumMemOps = 0; ++ EVT VT = MVT::i32; ++ unsigned VTSize = 4; ++ unsigned I = 0; ++ // Emit a maximum of 4 loads in Thumb1 since we have fewer registers ++ const unsigned MaxLoads = Subtarget.isThumb1Only() ? 4 : 6; ++ SDValue TFOps[6]; ++ SDValue Loads[6]; ++ uint64_t SrcOff = 0, DstOff = 0; ++ ++ MachineMemOperand::Flags MOFlags = MachineMemOperand::Flags::MONone; ++ if (isVolatile) ++ MOFlags = MachineMemOperand::Flags::MOVolatile; ++ MachineMemOperand::Flags LoadMOFlags = MOFlags; ++ if (SrcPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), ++ DAG.getDataLayout())) ++ LoadMOFlags |= MachineMemOperand::Flags::MODereferenceable; ++ if (auto *V = SrcPtrInfo.V.dyn_cast()) ++ if (isa(V) && cast(V)->isConstant()) ++ LoadMOFlags |= MachineMemOperand::Flags::MOInvariant; ++ MachineMemOperand::Flags StoreMOFlags = MOFlags; ++ if (DstPtrInfo.isDereferenceable(SizeVal, *DAG.getContext(), ++ DAG.getDataLayout())) ++ StoreMOFlags |= MachineMemOperand::Flags::MODereferenceable; ++ ++ // Emit up to MaxLoads loads, then a TokenFactor barrier, then the ++ // same number of stores. The loads and stores may get combined into ++ // ldm/stm later on. ++ while (EmittedNumMemOps < NumMemOps) { ++ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { ++ Loads[I] = DAG.getLoad(VT, dl, Chain, ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, ++ DAG.getConstant(SrcOff, dl, MVT::i32)), ++ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), ++ LoadMOFlags); ++ TFOps[I] = Loads[I].getValue(1); ++ SrcOff += VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++ ++ for (I = 0; I < MaxLoads && EmittedNumMemOps + I < NumMemOps; ++I) { ++ TFOps[I] = DAG.getStore( ++ Chain, dl, Loads[I], ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, ++ DAG.getConstant(DstOff, dl, MVT::i32)), ++ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), StoreMOFlags); ++ DstOff += VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++ ++ EmittedNumMemOps += I; ++ } ++ ++ if (BytesLeft == 0) ++ return Chain; ++ ++ // Issue loads / stores for the trailing (1 - 3) bytes. ++ unsigned BytesLeftSave = BytesLeft; ++ I = 0; ++ while (BytesLeft) { ++ if (BytesLeft >= 2) { ++ VT = MVT::i16; ++ VTSize = 2; ++ } else { ++ VT = MVT::i8; ++ VTSize = 1; ++ } ++ ++ Loads[I] = DAG.getLoad(VT, dl, Chain, ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Src, ++ DAG.getConstant(SrcOff, dl, MVT::i32)), ++ SrcPtrInfo.getWithOffset(SrcOff), MaybeAlign(0), ++ LoadMOFlags); ++ ++ TFOps[I] = Loads[I].getValue(1); ++ ++I; ++ SrcOff += VTSize; ++ BytesLeft -= VTSize; ++ } ++ Chain = DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++ ++ I = 0; ++ BytesLeft = BytesLeftSave; ++ while (BytesLeft) { ++ if (BytesLeft >= 2) { ++ VT = MVT::i16; ++ VTSize = 2; ++ } else { ++ VT = MVT::i8; ++ VTSize = 1; ++ } ++ ++ TFOps[I] = DAG.getStore(Chain, dl, Loads[I], ++ DAG.getNode(ISD::ADD, dl, MVT::i32, Dst, ++ DAG.getConstant(DstOff, dl, MVT::i32)), ++ DstPtrInfo.getWithOffset(DstOff), MaybeAlign(0), ++ StoreMOFlags); ++ ++I; ++ DstOff += VTSize; ++ BytesLeft -= VTSize; ++ } ++ ++ return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, ArrayRef(TFOps, I)); ++} ++ + static bool shouldGenerateInlineTPLoop(const ARMSubtarget &Subtarget, + const SelectionDAG &DAG, + ConstantSDNode *ConstantSize, +@@ -195,6 +311,10 @@ SDValue ARMSelectionDAGInfo::EmitTargetCodeForMemcpy( + return EmitSpecializedLibcall(DAG, dl, Chain, Dst, Src, Size, + Alignment.value(), RTLIB::MEMCPY); + ++ if (EnableInlineMemcpyAsLdSt && Subtarget.isMClass() && Subtarget.hasV7Ops()) ++ return EmitMemcpyAsLdSt(DAG, dl, Subtarget, Chain, Dst, Src, SizeVal, ++ isVolatile, DstPtrInfo, SrcPtrInfo); ++ + unsigned BytesLeft = SizeVal & 3; + unsigned NumMemOps = SizeVal >> 2; + unsigned EmittedNumMemOps = 0; +diff --git a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h +index d68150e66567..bdc9bbd697a3 100644 +--- a/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h ++++ b/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h +@@ -46,6 +46,12 @@ public: + MachinePointerInfo DstPtrInfo, + MachinePointerInfo SrcPtrInfo) const override; + ++ SDValue EmitMemcpyAsLdSt(SelectionDAG &DAG, SDLoc dl, ++ const ARMSubtarget &Subtarget, SDValue Chain, ++ SDValue Dst, SDValue Src, uint64_t SizeVal, ++ bool isVolatile, MachinePointerInfo DstPtrInfo, ++ MachinePointerInfo SrcPtrInfo) const; ++ + SDValue + EmitTargetCodeForMemmove(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, + SDValue Dst, SDValue Src, SDValue Size, +diff --git a/llvm/test/CodeGen/ARM/memcpy-v7m.ll b/llvm/test/CodeGen/ARM/memcpy-v7m.ll +new file mode 100644 +index 000000000000..e549958494dc +--- /dev/null ++++ b/llvm/test/CodeGen/ARM/memcpy-v7m.ll +@@ -0,0 +1,161 @@ ++; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 ++; RUN: llc -mtriple=arm-none-eabi -mcpu=cortex-m7 -verify-machineinstrs -enable-inline-memcpy-ld-st %s -o - | FileCheck %s ++ ++@d = external global [64 x i32] ++@s = external global [64 x i32] ++@d_32 = external global[32 x i32] ++@s_32 = external global[32 x i32] ++ ++ ++define void @t1() #0 { ++; CHECK-LABEL: t1: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r2, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r2, :upper16:s ++; CHECK-NEXT: ldr r1, [r0] ++; CHECK-NEXT: str r1, [r2] ++; CHECK-NEXT: ldr r3, [r0, #4] ++; CHECK-NEXT: str r3, [r2, #4] ++; CHECK-NEXT: ldr r1, [r0, #8] ++; CHECK-NEXT: ldr r3, [r0, #12] ++; CHECK-NEXT: ldrb r0, [r0, #16] ++; CHECK-NEXT: strd r1, r3, [r2, #8] ++; CHECK-NEXT: strb r0, [r2, #16] ++; CHECK-NEXT: bx lr ++entry: ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([64 x i32]* @s to i8*), i8* bitcast ([64 x i32]* @d to i8*), i32 17, i32 4, i1 false) ++ ret void ++} ++ ++define void @t2() #0 { ++; CHECK-LABEL: t2: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r1, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r1, :upper16:s ++; CHECK-NEXT: ldr.w r2, [r0, #11] ++; CHECK-NEXT: str.w r2, [r1, #11] ++; CHECK-NEXT: ldr r2, [r0] ++; CHECK-NEXT: str r2, [r1] ++; CHECK-NEXT: ldr r2, [r0, #4] ++; CHECK-NEXT: str r2, [r1, #4] ++; CHECK-NEXT: ldr r0, [r0, #8] ++; CHECK-NEXT: str r0, [r1, #8] ++; CHECK-NEXT: bx lr ++entry: ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([64 x i32]* @s to i8*), i8* bitcast ([64 x i32]* @d to i8*), i32 15, i32 4, i1 false) ++ ret void ++} ++ ++declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #1 ++ ++ ++define void @t3() #0 { ++; CHECK-LABEL: t3: ++; CHECK: @ %bb.0: ++; CHECK-NEXT: movw r0, :lower16:d_32 ++; CHECK-NEXT: movw r2, :lower16:s_32 ++; CHECK-NEXT: movt r0, :upper16:d_32 ++; CHECK-NEXT: movt r2, :upper16:s_32 ++; CHECK-NEXT: ldr r1, [r0] ++; CHECK-NEXT: str r1, [r2] ++; CHECK-NEXT: ldr r3, [r0, #4] ++; CHECK-NEXT: str r3, [r2, #4] ++; CHECK-NEXT: ldr r1, [r0, #8] ++; CHECK-NEXT: ldr r3, [r0, #12] ++; CHECK-NEXT: ldrb r0, [r0, #16] ++; CHECK-NEXT: strd r1, r3, [r2, #8] ++; CHECK-NEXT: strb r0, [r2, #16] ++; CHECK-NEXT: bx lr ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([32 x i32]* @s_32 to i8*), i8* bitcast ([32 x i32]* @d_32 to i8*), i32 17, i32 4, i1 false) ++ ret void ++} ++ ++define void @t4() #0 { ++; CHECK-LABEL: t4: ++; CHECK: @ %bb.0: ++; CHECK-NEXT: movw r0, :lower16:d_32 ++; CHECK-NEXT: movw r1, :lower16:s_32 ++; CHECK-NEXT: movt r0, :upper16:d_32 ++; CHECK-NEXT: movt r1, :upper16:s_32 ++; CHECK-NEXT: ldr.w r2, [r0, #11] ++; CHECK-NEXT: str.w r2, [r1, #11] ++; CHECK-NEXT: ldr r2, [r0] ++; CHECK-NEXT: str r2, [r1] ++; CHECK-NEXT: ldr r2, [r0, #4] ++; CHECK-NEXT: str r2, [r1, #4] ++; CHECK-NEXT: ldr r0, [r0, #8] ++; CHECK-NEXT: str r0, [r1, #8] ++; CHECK-NEXT: bx lr ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([32 x i32]* @s_32 to i8*), i8* bitcast ([32 x i32]* @d_32 to i8*), i32 15, i32 4, i1 false) ++ ret void ++} ++ ++define void @t5() #0 { ++; CHECK-LABEL: t5: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: .save {r4, r5, r7, lr} ++; CHECK-NEXT: push {r4, r5, r7, lr} ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r1, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r1, :upper16:s ++; CHECK-NEXT: ldr r0, [r0] ++; CHECK-NEXT: ldr r1, [r1] ++; CHECK-NEXT: add.w r12, r0, #12 ++; CHECK-NEXT: ldr r3, [r0, #24] ++; CHECK-NEXT: ldrd r2, lr, [r0, #4] ++; CHECK-NEXT: ldm.w r12, {r4, r5, r12} ++; CHECK-NEXT: str r3, [r1, #24] ++; CHECK-NEXT: add.w r3, r1, #12 ++; CHECK-NEXT: strd r2, lr, [r1, #4] ++; CHECK-NEXT: stm.w r3, {r4, r5, r12} ++; CHECK-NEXT: ldr r0, [r0, #28] ++; CHECK-NEXT: str r0, [r1, #28] ++; CHECK-NEXT: pop {r4, r5, r7, pc} ++entry: ++ %0 = load i32*, i32** @s, align 4 ++ %arrayidx = getelementptr inbounds i32, i32* %0, i32 1 ++ %1 = bitcast i32* %arrayidx to i8* ++ %2 = load i32*, i32** @d, align 4 ++ %arrayidx1 = getelementptr inbounds i32, i32* %2, i32 1 ++ %3 = bitcast i32* %arrayidx1 to i8* ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %3, i32 28, i32 4, i1 false) ++ ret void ++} ++ ++define void @t6() #0 { ++; CHECK-LABEL: t6: ++; CHECK: @ %bb.0: @ %entry ++; CHECK-NEXT: .save {r4, r5, r7, lr} ++; CHECK-NEXT: push {r4, r5, r7, lr} ++; CHECK-NEXT: movw r0, :lower16:d ++; CHECK-NEXT: movw r1, :lower16:s ++; CHECK-NEXT: movt r0, :upper16:d ++; CHECK-NEXT: movt r1, :upper16:s ++; CHECK-NEXT: ldr r0, [r0] ++; CHECK-NEXT: ldr r1, [r1] ++; CHECK-NEXT: add.w r12, r0, #12 ++; CHECK-NEXT: ldr r3, [r0, #24] ++; CHECK-NEXT: ldrd r2, lr, [r0, #4] ++; CHECK-NEXT: ldm.w r12, {r4, r5, r12} ++; CHECK-NEXT: str r3, [r1, #24] ++; CHECK-NEXT: add.w r3, r1, #12 ++; CHECK-NEXT: strd r2, lr, [r1, #4] ++; CHECK-NEXT: stm.w r3, {r4, r5, r12} ++; CHECK-NEXT: ldr r0, [r0, #28] ++; CHECK-NEXT: str r0, [r1, #28] ++; CHECK-NEXT: pop {r4, r5, r7, pc} ++entry: ++ %0 = load i32*, i32** @s, align 8 ++ %arrayidx = getelementptr inbounds i32, i32* %0, i32 1 ++ %1 = bitcast i32* %arrayidx to i8* ++ %2 = load i32*, i32** @d, align 8 ++ %arrayidx1 = getelementptr inbounds i32, i32* %2, i32 1 ++ %3 = bitcast i32* %arrayidx1 to i8* ++ tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %3, i32 28, i32 4, i1 false) ++ ret void ++} +-- +2.34.1 + diff --git a/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test.patch b/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test.patch new file mode 100644 index 00000000..b92d1efb --- /dev/null +++ b/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test.patch @@ -0,0 +1,26 @@ +From 623881f1ea465f9c1837981db143f7225108580a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dominik=20W=C3=B3jt?= +Date: Mon, 16 Oct 2023 11:35:48 +0200 +Subject: [libc++] tests with picolibc: xfail one remaining test + +--- + .../language.support/support.start.term/quick_exit.pass.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp +index d8eff69cb53f..e16048df722e 100644 +--- a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp ++++ b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp +@@ -17,6 +17,9 @@ + + // test quick_exit and at_quick_exit + ++// TODO: Find out why the at_quick_exit symbol is not found. ++// XFAIL: LIBCXX-PICOLIBC-FIXME ++ + #include + + void f() {} +-- +2.39.5 (Apple Git-154) + diff --git a/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-two-remaining-tests.patch b/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-two-remaining-tests.patch deleted file mode 100644 index 3ed11617..00000000 --- a/patches/llvm-project/0001-libc-tests-with-picolibc-xfail-two-remaining-tests.patch +++ /dev/null @@ -1,43 +0,0 @@ -From cb6cfe0e5fc29d3867f523900f0d46a4ef5dff1b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dominik=20W=C3=B3jt?= -Date: Mon, 16 Oct 2023 11:35:48 +0200 -Subject: [libc++] tests with picolibc: xfail two remaining tests - ---- - .../cmp/cmp.alg/strong_order_long_double.verify.cpp | 5 +++++ - .../language.support/support.start.term/quick_exit.pass.cpp | 3 +++ - 2 files changed, 8 insertions(+) - -diff --git a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp -index c9c2ba200214..4898a9a06e09 100644 ---- a/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp -+++ b/libcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp -@@ -12,6 +12,11 @@ - // This test does apply to aarch64 where Arm's AAPCS64 is followed. There they are different sizes. - // XFAIL: target={{arm64|arm64e|armv(7|8)(l|m)?|powerpc|powerpc64}}-{{.+}} - -+// In internal LLVM arm BMT tests the target is fixed to "arm-none-eabi", so the -+// "unsupported" cluase above does not work. TODO: find more generic way to -+// detect equal sizes of double and long double -+// XFAIL: LIBCXX-PICOLIBC-FIXME -+ - // MSVC configurations have long double equal to regular double on all - // architectures. - // XFAIL: target={{.+}}-pc-windows-msvc -diff --git a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp -index 5a70ea5bd570..92dfbe8eb1ab 100644 ---- a/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp -+++ b/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp -@@ -16,6 +16,9 @@ - - // test quick_exit and at_quick_exit - -+// TODO: Find out why the at_quick_exit symbol is not found. -+// XFAIL: LIBCXX-PICOLIBC-FIXME -+ - #include - - void f() {} --- -2.34.1 - diff --git a/patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch b/patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch index 4adfc8f7..8f7a9ba6 100644 --- a/patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch +++ b/patches/llvm-project/0002-libc-tests-with-picolibc-disable-large-tests.patch @@ -1,4 +1,4 @@ -From dded2dbf8fe8eb9dc306bf26259d4e72893ffd67 Mon Sep 17 00:00:00 2001 +From 8a0f8650d58f27ca32948554188b98c8978d1eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Wed, 15 Nov 2023 12:18:35 +0100 Subject: [libc++] tests with picolibc: disable large tests @@ -41,18 +41,19 @@ index b5f9089308d2..0a83e75ceceb 100644 set(LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "") find_program(QEMU_SYSTEM_ARM qemu-system-arm REQUIRED) diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp -index 88637b84de01..a3fe75edafea 100644 +index ad131bb3a8a7..ac612c79f71c 100644 --- a/libcxxabi/test/test_demangle.pass.cpp +++ b/libcxxabi/test/test_demangle.pass.cpp -@@ -10,7 +10,7 @@ - // XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}} +@@ -7,7 +7,7 @@ + //===----------------------------------------------------------------------===// // This test is too big for most embedded devices. -// XFAIL: LIBCXX-PICOLIBC-FIXME +// REQUIRES: large_tests - // https://llvm.org/PR51407 was not fixed in some previously-released - // demanglers, which causes them to run into the infinite loop. + // This test exercises support for char array initializer lists added in + // dd8b266ef. + // UNSUPPORTED: using-built-library-before-llvm-20 -- -2.34.1 +2.39.5 (Apple Git-154) diff --git a/patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch b/patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch index 4f456841..290bf4bf 100644 --- a/patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch +++ b/patches/llvm-project/0003-Disable-failing-compiler-rt-test.patch @@ -1,4 +1,4 @@ -From c4837fa13ec89cc06b07af8cba8494189520e546 Mon Sep 17 00:00:00 2001 +From 0f8dc80a7642430c8d02c36283766aeb5a59a331 Mon Sep 17 00:00:00 2001 From: Piotr Przybyla Date: Wed, 15 Nov 2023 16:04:24 +0000 Subject: Disable failing compiler-rt test @@ -18,5 +18,5 @@ index 2ff65a8b9ec3..98611a75e85f 100644 // RUN: %clang_builtins %s %librt -o %t && %run %t -- -2.34.1 +2.39.5 (Apple Git-154) diff --git a/patches/llvm-project/0005-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch b/patches/llvm-project/0004-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch similarity index 95% rename from patches/llvm-project/0005-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch rename to patches/llvm-project/0004-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch index a2d86a18..573a1a26 100644 --- a/patches/llvm-project/0005-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch +++ b/patches/llvm-project/0004-libc-tests-with-picolibc-XFAIL-uses-of-atomics.patch @@ -1,4 +1,4 @@ -From 3b7ada947d511fe0edb7cca0dbdb640d8e1ecd2b Mon Sep 17 00:00:00 2001 +From f5b5a95bd02f6d5bc6e80c238c2e8f7e08985d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Thu, 9 Nov 2023 15:25:14 +0100 Subject: [libc++] tests with picolibc: XFAIL uses of atomics @@ -39,7 +39,7 @@ index 000000000000..5ecc58f3e385 +if "has-no-atomics" in config.available_features: + config.unsupported = True diff --git a/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp b/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp -index 47440015f2c5..4350de3dfa65 100644 +index 99d4226662a0..243aa21c87b4 100644 --- a/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp +++ b/libcxx/test/libcxx/thread/thread.stoptoken/intrusive_shared_ptr.pass.cpp @@ -7,6 +7,8 @@ @@ -49,8 +49,8 @@ index 47440015f2c5..4350de3dfa65 100644 +// XFAIL: has-no-atomics + // UNSUPPORTED: c++03, c++11, c++14, c++17 + // ADDITIONAL_COMPILE_FLAGS: -Wno-private-header - #include <__stop_token/intrusive_shared_ptr.h> diff --git a/libcxx/test/std/atomics/lit.local.cfg b/libcxx/test/std/atomics/lit.local.cfg new file mode 100644 index 000000000000..5ecc58f3e385 @@ -88,10 +88,10 @@ index 000000000000..5ecc58f3e385 +if "has-no-atomics" in config.available_features: + config.unsupported = True diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py -index 6ef40755c59d..6c2960260189 100644 +index 735eb5ac949d..6ca4e8acb3f4 100644 --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py -@@ -206,6 +206,21 @@ DEFAULT_FEATURES = [ +@@ -215,6 +215,21 @@ DEFAULT_FEATURES = [ """, ), ), @@ -114,5 +114,5 @@ index 6ef40755c59d..6c2960260189 100644 Feature( name="32-bit-pointer", -- -2.34.1 +2.39.5 (Apple Git-154) diff --git a/patches/llvm-project/0004-libc-tests-with-picolibc-mark-sort-test-as-long-one.patch b/patches/llvm-project/0004-libc-tests-with-picolibc-mark-sort-test-as-long-one.patch deleted file mode 100644 index 7d5c66ba..00000000 --- a/patches/llvm-project/0004-libc-tests-with-picolibc-mark-sort-test-as-long-one.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ac480df06d78bd7457d2a6333be8578cda88c240 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Dominik=20W=C3=B3jt?= -Date: Thu, 9 Nov 2023 14:14:30 +0100 -Subject: [libc++] tests with picolibc: mark sort test as long one - ---- - .../std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp -index e2581fbf2fa6..99a9e1775513 100644 ---- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp -+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp -@@ -6,8 +6,7 @@ - // - //===----------------------------------------------------------------------===// - --// This test appears to hang with picolibc & qemu. --// UNSUPPORTED: LIBCXX-PICOLIBC-FIXME -+// REQUIRES: long_test - - // - --- -2.34.1 - diff --git a/patches/llvm-project/0006-libc-tests-with-picolibc-mark-two-more-large-tests.patch b/patches/llvm-project/0005-libc-tests-with-picolibc-mark-two-more-large-tests.patch similarity index 94% rename from patches/llvm-project/0006-libc-tests-with-picolibc-mark-two-more-large-tests.patch rename to patches/llvm-project/0005-libc-tests-with-picolibc-mark-two-more-large-tests.patch index 05567625..16cfb4a3 100644 --- a/patches/llvm-project/0006-libc-tests-with-picolibc-mark-two-more-large-tests.patch +++ b/patches/llvm-project/0005-libc-tests-with-picolibc-mark-two-more-large-tests.patch @@ -1,4 +1,4 @@ -From 8eb9344a4ba97b45cea1a6adec98aff6c6149359 Mon Sep 17 00:00:00 2001 +From 0961af52ac015c26829b4dae7fd6879a0b633f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Wed, 22 Nov 2023 16:12:39 +0100 Subject: [libc++] tests with picolibc: mark two more large tests @@ -37,5 +37,5 @@ index 64a6a135adda..057301e6f868 100644 // bool // regex_search(BidirectionalIterator first, BidirectionalIterator last, -- -2.34.1 +2.39.5 (Apple Git-154) diff --git a/patches/llvm-project/0006-Define-_LIBCPP_HAS_C8RTOMB_MBRTOC8.patch b/patches/llvm-project/0006-Define-_LIBCPP_HAS_C8RTOMB_MBRTOC8.patch new file mode 100644 index 00000000..ac73bd5e --- /dev/null +++ b/patches/llvm-project/0006-Define-_LIBCPP_HAS_C8RTOMB_MBRTOC8.patch @@ -0,0 +1,55 @@ +From 9011c0e821d5b1563dc2dc6370f29c529e55f41f Mon Sep 17 00:00:00 2001 +From: Victor Campos +Date: Thu, 31 Oct 2024 09:58:34 +0000 +Subject: Define _LIBCPP_HAS_C8RTOMB_MBRTOC8 + +LLVM libcxx does not define the `char8_t` related functions, instead +delegating their definitions to the underlying C library. + +libcxx defines a macro called `_LIBCPP_HAS_C8RTOMB_MBRTOC8` when it +infers that the underlying C library provides these functions. + +picolibc provides the `char8_t` related functions regardless of the C++ +version used, but this support only landed after version 1.8.8 and, at +the time of writing, has not made into any released version yet. + +This is a temporary fix and should be removed when a picolibc release +includes the support for `char8_t` and its related functions. When it's +time to implement a proper solution, one needs to create logic to detect +the picolibc version and define the macro accordingly. The macros that +govern picolibc version are in `picolibc.h`. +--- + libcxx/include/__config | 17 ++--------------- + 1 file changed, 2 insertions(+), 15 deletions(-) + +diff --git a/libcxx/include/__config b/libcxx/include/__config +index 1cf80a46686a..615433869a4e 100644 +--- a/libcxx/include/__config ++++ b/libcxx/include/__config +@@ -1021,21 +1021,8 @@ typedef __char32_t char32_t; + // functions is gradually being added to existing C libraries. The conditions + // below check for known C library versions and conditions under which these + // functions are declared by the C library. +-// +-// GNU libc 2.36 and newer declare c8rtomb() and mbrtoc8() in C++ modes if +-// __cpp_char8_t is defined or if C2X extensions are enabled. Determining +-// the latter depends on internal GNU libc details that are not appropriate +-// to depend on here, so any declarations present when __cpp_char8_t is not +-// defined are ignored. +-# if defined(_LIBCPP_GLIBC_PREREQ) +-# if _LIBCPP_GLIBC_PREREQ(2, 36) && defined(__cpp_char8_t) +-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1 +-# else +-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0 +-# endif +-# else +-# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0 +-# endif ++// For picolibc: ++#define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1 + + // There are a handful of public standard library types that are intended to + // support CTAD but don't need any explicit deduction guides to do so. This +-- +2.43.0 + diff --git a/patches/llvm-project/0007-libcxx-Remove-xfails-due-to-picolibc-s-support-for-c.patch b/patches/llvm-project/0007-libcxx-Remove-xfails-due-to-picolibc-s-support-for-c.patch new file mode 100644 index 00000000..0929944a --- /dev/null +++ b/patches/llvm-project/0007-libcxx-Remove-xfails-due-to-picolibc-s-support-for-c.patch @@ -0,0 +1,47 @@ +From 2c6b08baa20bb4a7e4a936ecf286a1c9e1f0f8c9 Mon Sep 17 00:00:00 2001 +From: Victor Campos +Date: Thu, 31 Oct 2024 14:03:58 +0000 +Subject: [libcxx] Remove xfails due to picolibc's support for char16_t and + char32_t + +picolibc recently +([link](https://github.com/picolibc/picolibc/commit/f6f68758fe2aa62854f49b90c3daeeb08242b512)) +added support for char16_t and char32_t. + +These xfails aren't needed anymore. +--- + libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp | 3 --- + libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp | 3 --- + 2 files changed, 6 deletions(-) + +diff --git a/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp b/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp +index a1560c8ee585..2b6455466681 100644 +--- a/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp ++++ b/libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp +@@ -11,9 +11,6 @@ + // Apple platforms don't provide yet, so these tests fail. + // XFAIL: target={{.+}}-apple-{{.+}} + +-// mbrtoc16 not defined. +-// XFAIL: LIBCXX-PICOLIBC-FIXME +- + // + + #include +diff --git a/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp b/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp +index 2076384deb2b..db00cbde3336 100644 +--- a/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp ++++ b/libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp +@@ -11,9 +11,6 @@ + // Apple platforms don't provide yet, so these tests fail. + // XFAIL: target={{.+}}-apple-{{.+}} + +-// mbrtoc16 not defined. +-// XFAIL: LIBCXX-PICOLIBC-FIXME +- + // + + #include +-- +2.43.0 + diff --git a/patches/llvm-project/0008-library-order-workaround-for-597.patch b/patches/llvm-project/0008-library-order-workaround-for-597.patch new file mode 100644 index 00000000..6854fe3f --- /dev/null +++ b/patches/llvm-project/0008-library-order-workaround-for-597.patch @@ -0,0 +1,242 @@ +From 3c25466248617c03c4db62504b226f82b568be5e Mon Sep 17 00:00:00 2001 +From: Volodymyr Turanskyy +Date: Thu, 19 Dec 2024 12:01:58 +0000 +Subject: [PATCH] Revert order of libraries and update tests + +--- + clang/lib/Driver/ToolChains/BareMetal.cpp | 3 +- + clang/test/Driver/baremetal-multilib.yaml | 2 +- + clang/test/Driver/baremetal-sysroot.cpp | 2 +- + clang/test/Driver/baremetal.cpp | 38 +++++++++++------------ + 4 files changed, 22 insertions(+), 23 deletions(-) + +diff --git a/clang/lib/Driver/ToolChains/BareMetal.cpp b/clang/lib/Driver/ToolChains/BareMetal.cpp +index eecaaa9a4293..7d07079b5dd4 100644 +--- a/clang/lib/Driver/ToolChains/BareMetal.cpp ++++ b/clang/lib/Driver/ToolChains/BareMetal.cpp +@@ -491,9 +491,8 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, + } + + if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { +- AddRunTimeLibs(TC, D, CmdArgs, Args); +- + CmdArgs.push_back("-lc"); ++ AddRunTimeLibs(TC, D, CmdArgs, Args); + } + + if (D.isUsingLTO()) { +diff --git a/clang/test/Driver/baremetal-multilib.yaml b/clang/test/Driver/baremetal-multilib.yaml +index 853a4e9e36e4..847b1d6b3377 100644 +--- a/clang/test/Driver/baremetal-multilib.yaml ++++ b/clang/test/Driver/baremetal-multilib.yaml +@@ -10,8 +10,8 @@ + # CHECK-SAME: "-x" "c++" "{{.*}}baremetal-multilib.yaml" + # CHECK-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + # CHECK-SAME: "-L[[SYSROOT]]/bin/../lib/clang-runtimes/arm-none-eabi/thumb/v8-m.main/fp/lib" +-# CHECK-SAME: "{{[^"]*}}libclang_rt.builtins.a" + # CHECK-SAME: "-lc" ++# CHECK-SAME: "{{[^"]*}}libclang_rt.builtins.a" + # CHECK-SAME: "-o" "{{.*}}.tmp.out" + + # RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \ +diff --git a/clang/test/Driver/baremetal-sysroot.cpp b/clang/test/Driver/baremetal-sysroot.cpp +index 5cbb7ac69a7a..2b836e65016b 100644 +--- a/clang/test/Driver/baremetal-sysroot.cpp ++++ b/clang/test/Driver/baremetal-sysroot.cpp +@@ -18,6 +18,6 @@ + // CHECK-V6M-C-SAME: "-x" "c++" "{{.*}}baremetal-sysroot.cpp" + // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-V6M-C-SAME: "-L{{.*}}/baremetal_default_sysroot{{[/\\]+}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}armv6m-none-eabi{{[/\\]+}}lib" +-// CHECK-V6M-C-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-C-SAME: "-lc" ++// CHECK-V6M-C-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-C-SAME: "-o" "{{.*}}.o" +diff --git a/clang/test/Driver/baremetal.cpp b/clang/test/Driver/baremetal.cpp +index 6d6255ef5970..08c49a1beec0 100644 +--- a/clang/test/Driver/baremetal.cpp ++++ b/clang/test/Driver/baremetal.cpp +@@ -19,8 +19,8 @@ + // CHECK-V6M-C-SAME: "[[SYSROOT:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}crt0.o" + // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for" + // CHECK-V6M-C-SAME: "-L[[SYSROOT:[^"]+]]{{[/\\]+}}lib" +-// CHECK-V6M-C-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-C-SAME: "-lc" ++// CHECK-V6M-C-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-C-SAME: "--target2=rel" "-o" "{{.*}}.tmp.out" + + // RUN: %clang %s -### --target=armv6m-none-eabi -nostdlibinc -nobuiltininc 2>&1 \ +@@ -42,8 +42,8 @@ + // CHECK-V6M-TREE-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" "-EL" + // CHECK-V6M-TREE-SAME: "[[INSTALLED_DIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}armv6m-unknown-none-eabi{{[/\\]+}}crt0.o" + // CHECK-V6M-TREE-SAME: "-L[[INSTALLED_DIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}armv6m-unknown-none-eabi" +-// CHECK-V6M-TREE-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-TREE-SAME: "-lc" ++// CHECK-V6M-TREE-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-TREE-SAME: "--target2=rel" "-o" "{{.*}}.tmp.out" + + // RUN: %clang %s -### --target=armv7m-vendor-none-eabi -rtlib=compiler-rt 2>&1 \ +@@ -57,8 +57,8 @@ + // CHECK-ARMV7M-PER_TARGET: "[[SYSROOT:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}crt0.o" + // CHECK-ARMV7M-PER-TARGET: "-L[[SYSROOT:[^"]+]]{{[/\\]+}}lib" + // CHECK-ARMV7M-PER-TARGET: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}armv7m-vendor-none-eabi +-// CHECK-ARMV7M-PER-TARGET: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-ARMV7M-PER-TARGET: "-lc" ++// CHECK-ARMV7M-PER-TARGET: "{{[^"]*}}libclang_rt.builtins.a" + + // RUN: %clangxx %s -### --target=armv6m-none-eabi 2>&1 \ + // RUN: --sysroot=%S/Inputs/baremetal_arm | FileCheck --check-prefix=CHECK-V6M-DEFAULTCXX %s +@@ -68,8 +68,8 @@ + // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}baremetal_arm{{[/\\]+}}lib" + // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" + // CHECK-V6M-DEFAULTCXX-SAME: "-lm" +-// CHECK-V6M-DEFAULTCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-DEFAULTCXX-SAME: "-lc" ++// CHECK-V6M-DEFAULTCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-DEFAULTCXX-SAME: "--target2=rel" "-o" "a.out" + + // RUN: %clangxx %s -### --target=armv6m-none-eabi -stdlib=libc++ 2>&1 \ +@@ -81,8 +81,8 @@ + // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}baremetal_arm{{[/\\]+}}lib" + // CHECK-V6M-LIBCXX-SAME: "-lc++" + // CHECK-V6M-LIBCXX-SAME: "-lm" +-// CHECK-V6M-LIBCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-LIBCXX-SAME: "-lc" ++// CHECK-V6M-LIBCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-LIBCXX-SAME: "--target2=rel" "-o" "a.out" + + // RUN: %clangxx %s -### --target=armv6m-none-eabi 2>&1 \ +@@ -95,8 +95,8 @@ + // CHECK-V6M-LIBSTDCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" "-EL" + // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}baremetal_arm{{[/\\]+}}lib" + // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lm" +-// CHECK-V6M-LIBSTDCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-LIBSTDCXX-SAME: "-lc" ++// CHECK-V6M-LIBSTDCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-LIBSTDCXX-SAME: "--target2=rel" "-o" "a.out" + + // RUN: %clangxx %s -### --target=armv6m-none-eabi 2>&1 \ +@@ -120,8 +120,8 @@ + // CHECK-V6M-LIBCXX-USR: "{{[^"]*}}-Bstatic" + // CHECK-V6M-LIBCXX-USR-SAME: "-L{{[^"]*}}{{[/\\]+}}baremetal_cxx_sysroot{{[/\\]+}}lib" + // CHECK-V6M-LIBCXX-USR-SAME: "-lc++" "-lm" +-// CHECK-V6M-LIBCXX-USR-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-V6M-LIBCXX-USR-SAME: "-lc" ++// CHECK-V6M-LIBCXX-USR-SAME: "{{[^"]*}}libclang_rt.builtins.a" + + // RUN: %clangxx --target=arm-none-eabi -v 2>&1 \ + // RUN: | FileCheck %s --check-prefix=CHECK-THREAD-MODEL +@@ -208,8 +208,8 @@ + // CHECK-RV64-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV64-SAME: "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for" + // CHECK-RV64-SAME: "-L[[SYSROOT:[^"]+]]{{[/\\]+}}lib" +-// CHECK-RV64-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-SAME: "-lc" ++// CHECK-RV64-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-SAME: "-X" "-o" "{{.*}}.tmp.out" + + // RUN: %clangxx %s -### --target=riscv64-unknown-elf 2>&1 \ +@@ -219,8 +219,8 @@ + // CHECK-RV64-DEFAULTCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV64-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}basic_riscv64_tree{{[/\\]+}}riscv64-unknown-elf{{[/\\]+}}lib" + // CHECK-RV64-DEFAULTCXX-SAME: "-lc++" "-lm" +-// CHECK-RV64-DEFAULTCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-DEFAULTCXX-SAME: "-lc" ++// CHECK-RV64-DEFAULTCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-DEFAULTCXX-SAME: "-X" "-o" "a.out" + + // RUN: %clangxx %s -### --target=riscv64-unknown-elf 2>&1 \ +@@ -233,8 +233,8 @@ + // CHECK-RV64-LIBCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV64-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}basic_riscv64_tree{{[/\\]+}}riscv64-unknown-elf{{[/\\]+}}lib" + // CHECK-RV64-LIBCXX-SAME: "-lc++" "-lm" +-// CHECK-RV64-LIBCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-LIBCXX-SAME: "-lc" ++// CHECK-RV64-LIBCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-LIBCXX-SAME: "-X" "-o" "a.out" + + // RUN: %clangxx %s -### 2>&1 --target=riscv64-unknown-elf \ +@@ -247,8 +247,8 @@ + // CHECK-RV64-LIBSTDCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV64-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}basic_riscv64_tree{{[/\\]+}}riscv64-unknown-elf{{[/\\]+}}lib" + // CHECK-RV64-LIBSTDCXX-SAME: "-lstdc++" "-lm" +-// CHECK-RV64-LIBSTDCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-LIBSTDCXX-SAME: "-lc" ++// CHECK-RV64-LIBSTDCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV64-LIBSTDCXX-SAME: "-X" "-o" "a.out" + + // RUN: %clang %s -### 2>&1 --target=riscv32-unknown-elf \ +@@ -264,8 +264,8 @@ + // CHECK-RV32-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV32-SAME: "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for" + // CHECK-RV32-SAME: "-L[[SYSROOT:[^"]+]]{{[/\\]+}}lib" +-// CHECK-RV32-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV32-SAME: "-lc" ++// CHECK-RV32-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV32-SAME: "-X" "-o" "a.out" + + // RUN: %clangxx %s -### 2>&1 --target=riscv32-unknown-elf \ +@@ -275,8 +275,8 @@ + // CHECK-RV32-DEFAULTCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV32-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}basic_riscv32_tree{{[/\\]+}}riscv32-unknown-elf{{[/\\]+}}lib" + // CHECK-RV32-DEFAULTCXX-SAME: "-lc++" "-lm" +-// CHECK-RV32-DEFAULTCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV32-DEFAULTCXX-SAME: "-lc" ++// CHECK-RV32-DEFAULTCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-RV32-DEFAULTCXX-SAME: "-X" "-o" "a.out" + + // RUN: %clangxx %s -### 2>&1 --target=riscv32-unknown-elf \ +@@ -301,9 +301,9 @@ + // CHECK-RV32-LIBSTDCXX-SAME: "-internal-isystem" "{{[^"]+}}{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}8.0.1" + // CHECK-RV32-LIBSTDCXX: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-RV32-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}basic_riscv32_tree{{[/\\]+}}riscv32-unknown-elf{{[/\\]+}}lib" +-// CHECK-RV32-LIBSTDCXX-SAME: "-lstdc++" "-lm" ++// CHECK-RV32-LIBSTDCXX-SAME: "-lstdc++" "-lm" "-lc" + // CHECK-RV32-LIBSTDCXX-SAME: "{{[^"]*}}libclang_rt.builtins.a" +-// CHECK-RV32-LIBSTDCXX-SAME: "-lc" "-X" "-o" "a.out" ++// CHECK-RV32-LIBSTDCXX-SAME: "-X" "-o" "a.out" + + // RUN: %clang %s -### 2>&1 --target=riscv64-unknown-elf \ + // RUN: -nostdlibinc -nobuiltininc \ +@@ -425,8 +425,8 @@ + // CHECK-PPCEABI-SAME: "-internal-isystem" "[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}include" + // CHECK-PPCEABI-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-PPCEABI-SAME: "-L[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}lib" +-// CHECK-PPCEABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPCEABI-SAME: "-lc" ++// CHECK-PPCEABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPCEABI-SAME: "-o" "a.out" + + // RUN: %clang -no-canonical-prefixes %s -### --target=powerpc64-unknown-eabi 2>&1 \ +@@ -439,8 +439,8 @@ + // CHECK-PPC64EABI-SAME: "-internal-isystem" "[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}include" + // CHECK-PPC64EABI-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-PPC64EABI-SAME: "-L[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}lib" +-// CHECK-PPC64EABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPC64EABI-SAME: "-lc" ++// CHECK-PPC64EABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPC64EABI-SAME: "-o" "a.out" + + // RUN: %clang -no-canonical-prefixes %s -### --target=powerpcle-unknown-eabi 2>&1 \ +@@ -453,8 +453,8 @@ + // CHECK-PPCLEEABI-SAME: "-internal-isystem" "[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}include" + // CHECK-PPCLEEABI-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-PPCLEEABI-SAME: "-L[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}lib" +-// CHECK-PPCLEEABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPCLEEABI-SAME: "-lc" ++// CHECK-PPCLEEABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPCLEEABI-SAME: "-o" "a.out" + + // RUN: %clang -no-canonical-prefixes %s -### --target=powerpc64le-unknown-eabi 2>&1 \ +@@ -467,8 +467,8 @@ + // CHECK-PPC64LEEABI-SAME: "-internal-isystem" "[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}include" + // CHECK-PPC64LEEABI-NEXT: ld{{(.exe)?}}" "{{.*}}.o" "-Bstatic" + // CHECK-PPC64LEEABI-SAME: "-L[[INSTALLEDDIR]]{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+[^"]*}}lib" +-// CHECK-PPC64LEEABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPC64LEEABI-SAME: "-lc" ++// CHECK-PPC64LEEABI-SAME: "{{[^"]*}}libclang_rt.builtins.a" + // CHECK-PPC64LEEABI-SAME: "-o" "a.out" + + // Check that compiler-rt library without the arch filename suffix will +-- +2.47.0 + diff --git a/patches/newlib.patch b/patches/newlib/0001-Enable-newlib-build.patch similarity index 64% rename from patches/newlib.patch rename to patches/newlib/0001-Enable-newlib-build.patch index 489aae31..244b923d 100644 --- a/patches/newlib.patch +++ b/patches/newlib/0001-Enable-newlib-build.patch @@ -1,3 +1,53 @@ +From 928f527624c6cbc1d897c5f36309981971f47873 Mon Sep 17 00:00:00 2001 +From: Volodymyr Turanskyy +Date: Thu, 2 Jan 2025 16:23:27 +0000 +Subject: [PATCH] Update patch for newlib-4.5.0 tag + +Change-Id: Iec24f4305ad35a3a6df1672bb14555bf81249130 +--- + libgloss/Makefile.in | 2 +- + libgloss/aarch64/syscalls.c | 6 ++ + libgloss/arm/cpu-init/rdimon-aem.S | 107 +++++++++++++++-------------- + libgloss/arm/crt0.S | 2 +- + libgloss/arm/linux-crt0.c | 2 +- + libgloss/arm/syscalls.c | 6 +- + libgloss/arm/trap.S | 2 +- + newlib/libc/include/sys/features.h | 2 + + newlib/libc/machine/arm/setjmp.S | 4 +- + newlib/libc/sys/arm/crt0.S | 2 +- + newlib/libc/sys/arm/trap.S | 2 +- + 11 files changed, 73 insertions(+), 64 deletions(-) + +diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in +index 54a00614d..be1450749 100644 +--- a/libgloss/Makefile.in ++++ b/libgloss/Makefile.in +@@ -1864,7 +1864,7 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) + am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) + am__v_texidevnull_0 = > /dev/null + am__v_texidevnull_1 = +-INFO_DEPS = $(srcdir)/doc/porting.info ++INFO_DEPS = + am__TEXINFO_TEX_DIR = $(srcdir)/../texinfo + DVIS = doc/porting.dvi + PDFS = doc/porting.pdf +diff --git a/libgloss/aarch64/syscalls.c b/libgloss/aarch64/syscalls.c +index 5b4071893..cfe1d6d23 100644 +--- a/libgloss/aarch64/syscalls.c ++++ b/libgloss/aarch64/syscalls.c +@@ -172,6 +172,12 @@ newslot (void) + return i; + } + ++int __aarch64_sme_accessible() { ++ int result = 0; ++ asm volatile ( "mrs %x[result], id_aa64pfr1_el1" : [result]"=r"(result) : : ); ++ return (result & 0x3000000) != 0; ++} ++ + void + initialise_monitor_handles (void) + { diff --git a/libgloss/arm/cpu-init/rdimon-aem.S b/libgloss/arm/cpu-init/rdimon-aem.S index 95b86e4d4..b91034ae6 100644 --- a/libgloss/arm/cpu-init/rdimon-aem.S @@ -279,10 +329,10 @@ index 95b86e4d4..b91034ae6 100644 movt r9, #0xff0f and r8, r8, r9 diff --git a/libgloss/arm/crt0.S b/libgloss/arm/crt0.S -index 8490bde2f..8b85b28f4 100644 +index 9ff0e6323..b9e768007 100644 --- a/libgloss/arm/crt0.S +++ b/libgloss/arm/crt0.S -@@ -565,7 +565,7 @@ change_back: +@@ -566,7 +566,7 @@ change_back: /* For Thumb, constants must be after the code since only positive offsets are supported for PC relative addresses. */ @@ -305,7 +355,7 @@ index 6b2d62a9b..000a2c728 100644 #endif { diff --git a/libgloss/arm/syscalls.c b/libgloss/arm/syscalls.c -index fc394f94b..0b3287df4 100644 +index 710a741ee..9e710b09a 100644 --- a/libgloss/arm/syscalls.c +++ b/libgloss/arm/syscalls.c @@ -180,7 +180,7 @@ initialise_monitor_handles (void) @@ -347,21 +397,8 @@ index 845ad0173..2056c2adf 100644 .global __rt_stkovf_split_big .global __rt_stkovf_split_small -diff --git a/libgloss/libnosys/configure b/libgloss/libnosys/configure -index 7c23c7a0a..2fc584169 100755 ---- a/libgloss/libnosys/configure -+++ b/libgloss/libnosys/configure -@@ -2058,7 +2058,7 @@ case "${target}" in - esac - - case "${target}" in -- *-*-elf) -+ *-*-elf|*-*-eabi*) - $as_echo "#define HAVE_ELF 1" >>confdefs.h - - diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h -index 218807178..b86caeaff 100644 +index 325acdf5f..12cb6465b 100644 --- a/newlib/libc/include/sys/features.h +++ b/newlib/libc/include/sys/features.h @@ -27,6 +27,8 @@ extern "C" { @@ -373,152 +410,28 @@ index 218807178..b86caeaff 100644 /* Macro to test version of GCC. Returns 0 for non-GCC or too old GCC. */ #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ -diff --git a/newlib/libc/machine/aarch64/memchr.S b/newlib/libc/machine/aarch64/memchr.S -index 53f5d6bc0..81fcecccd 100644 ---- a/newlib/libc/machine/aarch64/memchr.S -+++ b/newlib/libc/machine/aarch64/memchr.S -@@ -110,7 +110,7 @@ def_fn memchr - and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b - addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ - addp vend.16b, vend.16b, vend.16b /* 128->64 */ -- mov synd, vend.2d[0] -+ mov synd, vend.d[0] - /* Clear the soff*2 lower bits */ - lsl tmp, soff, #1 - lsr synd, synd, tmp -@@ -130,7 +130,7 @@ def_fn memchr - /* Use a fast check for the termination condition */ - orr vend.16b, vhas_chr1.16b, vhas_chr2.16b - addp vend.2d, vend.2d, vend.2d -- mov synd, vend.2d[0] -+ mov synd, vend.d[0] - /* We're not out of data, loop if we haven't found the character */ - cbz synd, .Lloop - -@@ -140,7 +140,7 @@ def_fn memchr - and vhas_chr2.16b, vhas_chr2.16b, vrepmask.16b - addp vend.16b, vhas_chr1.16b, vhas_chr2.16b /* 256->128 */ - addp vend.16b, vend.16b, vend.16b /* 128->64 */ -- mov synd, vend.2d[0] -+ mov synd, vend.d[0] - /* Only do the clear for the last possible block */ - b.hi .Ltail - -diff --git a/newlib/libc/machine/aarch64/strchr.S b/newlib/libc/machine/aarch64/strchr.S -index 2448dbc7d..706107836 100644 ---- a/newlib/libc/machine/aarch64/strchr.S -+++ b/newlib/libc/machine/aarch64/strchr.S -@@ -117,7 +117,7 @@ def_fn strchr - addp vend1.16b, vend1.16b, vend2.16b // 128->64 - lsr tmp1, tmp3, tmp1 - -- mov tmp3, vend1.2d[0] -+ mov tmp3, vend1.d[0] - bic tmp1, tmp3, tmp1 // Mask padding bits. - cbnz tmp1, .Ltail - -@@ -132,7 +132,7 @@ def_fn strchr - orr vend2.16b, vhas_nul2.16b, vhas_chr2.16b - orr vend1.16b, vend1.16b, vend2.16b - addp vend1.2d, vend1.2d, vend1.2d -- mov tmp1, vend1.2d[0] -+ mov tmp1, vend1.d[0] - cbz tmp1, .Lloop - - /* Termination condition found. Now need to establish exactly why -@@ -146,7 +146,7 @@ def_fn strchr - addp vend1.16b, vend1.16b, vend2.16b // 256->128 - addp vend1.16b, vend1.16b, vend2.16b // 128->64 - -- mov tmp1, vend1.2d[0] -+ mov tmp1, vend1.d[0] - .Ltail: - /* Count the trailing zeros, by bit reversing... */ - rbit tmp1, tmp1 -diff --git a/newlib/libc/machine/aarch64/strchrnul.S b/newlib/libc/machine/aarch64/strchrnul.S -index a0ac13b7f..fd2002f0d 100644 ---- a/newlib/libc/machine/aarch64/strchrnul.S -+++ b/newlib/libc/machine/aarch64/strchrnul.S -@@ -109,7 +109,7 @@ def_fn strchrnul - addp vend1.16b, vend1.16b, vend1.16b // 128->64 - lsr tmp1, tmp3, tmp1 - -- mov tmp3, vend1.2d[0] -+ mov tmp3, vend1.d[0] - bic tmp1, tmp3, tmp1 // Mask padding bits. - cbnz tmp1, .Ltail - -@@ -124,7 +124,7 @@ def_fn strchrnul - orr vhas_chr2.16b, vhas_nul2.16b, vhas_chr2.16b - orr vend1.16b, vhas_chr1.16b, vhas_chr2.16b - addp vend1.2d, vend1.2d, vend1.2d -- mov tmp1, vend1.2d[0] -+ mov tmp1, vend1.d[0] - cbz tmp1, .Lloop - - /* Termination condition found. Now need to establish exactly why -@@ -134,7 +134,7 @@ def_fn strchrnul - addp vend1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 - addp vend1.16b, vend1.16b, vend1.16b // 128->64 - -- mov tmp1, vend1.2d[0] -+ mov tmp1, vend1.d[0] - .Ltail: - /* Count the trailing zeros, by bit reversing... */ - rbit tmp1, tmp1 -diff --git a/newlib/libc/machine/aarch64/strrchr.S b/newlib/libc/machine/aarch64/strrchr.S -index d64fc09b1..1b6f07562 100644 ---- a/newlib/libc/machine/aarch64/strrchr.S -+++ b/newlib/libc/machine/aarch64/strrchr.S -@@ -120,10 +120,10 @@ def_fn strrchr - addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 - addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul1.16b // 128->64 - addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr1.16b // 128->64 -- mov nul_match, vhas_nul1.2d[0] -+ mov nul_match, vhas_nul1.d[0] - lsl tmp1, tmp1, #1 - mov const_m1, #~0 -- mov chr_match, vhas_chr1.2d[0] -+ mov chr_match, vhas_chr1.d[0] - lsr tmp3, const_m1, tmp1 - - bic nul_match, nul_match, tmp3 // Mask padding bits. -@@ -146,15 +146,15 @@ def_fn strrchr - addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr2.16b // 256->128 - addp vend1.16b, vend1.16b, vend1.16b // 128->64 - addp vhas_chr1.16b, vhas_chr1.16b, vhas_chr1.16b // 128->64 -- mov nul_match, vend1.2d[0] -- mov chr_match, vhas_chr1.2d[0] -+ mov nul_match, vend1.d[0] -+ mov chr_match, vhas_chr1.d[0] - cbz nul_match, .Lloop - - and vhas_nul1.16b, vhas_nul1.16b, vrepmask_0.16b - and vhas_nul2.16b, vhas_nul2.16b, vrepmask_0.16b - addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul2.16b - addp vhas_nul1.16b, vhas_nul1.16b, vhas_nul1.16b -- mov nul_match, vhas_nul1.2d[0] -+ mov nul_match, vhas_nul1.d[0] - - .Ltail: - /* Work out exactly where the string ends. */ -diff --git a/newlib/libc/stdlib/aligned_alloc.c b/newlib/libc/stdlib/aligned_alloc.c -index feb22c24b..06b3883cf 100644 ---- a/newlib/libc/stdlib/aligned_alloc.c -+++ b/newlib/libc/stdlib/aligned_alloc.c -@@ -28,6 +28,7 @@ - - #include - #include -+#include - - void * - aligned_alloc (size_t align, size_t size) +diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S +index 0070f17cd..a53f7918e 100644 +--- a/newlib/libc/machine/arm/setjmp.S ++++ b/newlib/libc/machine/arm/setjmp.S +@@ -78,10 +78,10 @@ + covers all the cases we need in this file for hardware + floating-point and should be compatible with all required FPUs + that we need to support. */ +-# if __ARM_FP ++# if __ARM_FP && !__clang__ + .fpu vfpxd + # endif +-# if __ARM_FEATURE_MVE ++# if __ARM_FEATURE_MVE && !__clang__ + .arch_extension mve + # endif + #endif diff --git a/newlib/libc/sys/arm/crt0.S b/newlib/libc/sys/arm/crt0.S -index 5e677a23c..6faf74096 100644 +index dae0f0465..51e86d549 100644 --- a/newlib/libc/sys/arm/crt0.S +++ b/newlib/libc/sys/arm/crt0.S -@@ -556,7 +556,7 @@ change_back: +@@ -557,7 +557,7 @@ change_back: /* For Thumb, constants must be after the code since only positive offsets are supported for PC relative addresses. */ @@ -540,81 +453,6 @@ index 681b3dbe0..8a49f39f3 100644 .global __rt_stkovf_split_big .global __rt_stkovf_split_small -diff --git a/newlib/libm/machine/arm/sf_ceil.c b/newlib/libm/machine/arm/sf_ceil.c -index b6efbff0b..44fdf834a 100644 ---- a/newlib/libm/machine/arm/sf_ceil.c -+++ b/newlib/libm/machine/arm/sf_ceil.c -@@ -24,7 +24,7 @@ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - --#if __ARM_ARCH >= 8 && !defined (__SOFTFP__) -+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__) - #include - - float -diff --git a/newlib/libm/machine/arm/sf_floor.c b/newlib/libm/machine/arm/sf_floor.c -index 7bc95808c..44c38c42c 100644 ---- a/newlib/libm/machine/arm/sf_floor.c -+++ b/newlib/libm/machine/arm/sf_floor.c -@@ -24,7 +24,7 @@ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - --#if __ARM_ARCH >= 8 && !defined (__SOFTFP__) -+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__) - #include - - float -diff --git a/newlib/libm/machine/arm/sf_nearbyint.c b/newlib/libm/machine/arm/sf_nearbyint.c -index c70d84442..126673e97 100644 ---- a/newlib/libm/machine/arm/sf_nearbyint.c -+++ b/newlib/libm/machine/arm/sf_nearbyint.c -@@ -24,7 +24,7 @@ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - --#if __ARM_ARCH >= 8 && !defined (__SOFTFP__) -+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__) - #include - - float -diff --git a/newlib/libm/machine/arm/sf_rint.c b/newlib/libm/machine/arm/sf_rint.c -index d9c383a7e..5def21009 100644 ---- a/newlib/libm/machine/arm/sf_rint.c -+++ b/newlib/libm/machine/arm/sf_rint.c -@@ -24,7 +24,7 @@ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - --#if __ARM_ARCH >= 8 && !defined (__SOFTFP__) -+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__) - #include - - float -diff --git a/newlib/libm/machine/arm/sf_round.c b/newlib/libm/machine/arm/sf_round.c -index 232fc0848..88c53ba13 100644 ---- a/newlib/libm/machine/arm/sf_round.c -+++ b/newlib/libm/machine/arm/sf_round.c -@@ -24,7 +24,7 @@ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - --#if __ARM_ARCH >= 8 && !defined (__SOFTFP__) -+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__) - #include - - float -diff --git a/newlib/libm/machine/arm/sf_trunc.c b/newlib/libm/machine/arm/sf_trunc.c -index 64e4aeb9a..c08fa6fed 100644 ---- a/newlib/libm/machine/arm/sf_trunc.c -+++ b/newlib/libm/machine/arm/sf_trunc.c -@@ -24,7 +24,7 @@ - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - --#if __ARM_ARCH >= 8 && !defined (__SOFTFP__) -+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__) - #include - - float +-- +2.47.1 + diff --git a/patches/picolibc.patch b/patches/picolibc/0001-Enable-libcxx-builds.patch similarity index 62% rename from patches/picolibc.patch rename to patches/picolibc/0001-Enable-libcxx-builds.patch index ba5b17a6..ef76bb9c 100644 --- a/patches/picolibc.patch +++ b/patches/picolibc/0001-Enable-libcxx-builds.patch @@ -1,8 +1,20 @@ +From bd1dcaa0e3e77260e264cc0c2580bf32f704a0ed Mon Sep 17 00:00:00 2001 +From: Simi Pallipurath +Date: Thu, 14 Nov 2024 10:07:08 +0000 +Subject: Enable libcxx builds + +Modifications to build config and linker script required to enable +libc++ builds. +--- + meson.build | 12 ++++++++++++ + picolibc.ld.in | 3 +++ + 2 files changed, 15 insertions(+) + diff --git a/meson.build b/meson.build -index 0fdfa0412..8e679f166 100644 +index b8f43c800..9d3f5c672 100644 --- a/meson.build +++ b/meson.build -@@ -1224,6 +1224,18 @@ if get_option('newlib-retargetable-locking') != get_option('newlib-multithread') +@@ -1319,6 +1319,18 @@ if get_option('newlib-retargetable-locking') != get_option('newlib-multithread') error('newlib-retargetable-locking and newlib-multithread must be set to the same value') endif @@ -22,16 +34,19 @@ index 0fdfa0412..8e679f166 100644 cc.has_argument('-fno-tree-loop-distribute-patterns'), description: 'Compiler flag to prevent detecting memcpy/memset patterns') diff --git a/picolibc.ld.in b/picolibc.ld.in -index b97ea3300..04b94f35c 100644 +index 7b63ba172..cda5e1e7e 100644 --- a/picolibc.ld.in +++ b/picolibc.ld.in @@ -68,6 +68,9 @@ SECTIONS - *(.text.unlikely .text.unlikely.*) - *(.text.startup .text.startup.*) - *(.text .text.* .opd .opd.*) + *(.literal.unlikely .text.unlikely .literal.unlikely.* .text.unlikely.*) + *(.literal.startup .text.startup .literal.startup.* .text.startup.*) + *(.literal .text .literal.* .text.* .opd .opd.*) + PROVIDE (__start___lcxx_override = .); + *(__lcxx_override) + PROVIDE (__stop___lcxx_override = .); *(.gnu.linkonce.t.*) KEEP (*(.fini .fini.*)) @PREFIX@__text_end = .; +-- +2.43.0 + diff --git a/patches/picolibc/0002-Define-picocrt_machines-for-AArch32-builds-as-well-a.patch b/patches/picolibc/0002-Define-picocrt_machines-for-AArch32-builds-as-well-a.patch new file mode 100644 index 00000000..a18166df --- /dev/null +++ b/patches/picolibc/0002-Define-picocrt_machines-for-AArch32-builds-as-well-a.patch @@ -0,0 +1,29 @@ +From c9a704b1322aec5f699e2962368bbffd286eb010 Mon Sep 17 00:00:00 2001 +From: Simi Pallipurath +Date: Thu, 14 Nov 2024 10:12:33 +0000 +Subject: Define picocrt_machines for AArch32 builds as well as 64. + +Our cmake build command for picolibc unconditionally includes +`-Dtest-machine=...`, which depends on this being defined. +--- + picocrt/machine/arm/meson.build | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/picocrt/machine/arm/meson.build b/picocrt/machine/arm/meson.build +index 808d691a5..ecc9a485b 100644 +--- a/picocrt/machine/arm/meson.build ++++ b/picocrt/machine/arm/meson.build +@@ -33,3 +33,10 @@ + # OF THE POSSIBILITY OF SUCH DAMAGE. + # + src_picocrt += files('crt0.c') ++ ++picocrt_machines += [ ++ { ++ 'name': 'fvp', ++ 'suffix': '-fvp', ++ }, ++] +-- +2.43.0 + diff --git a/patches/picolibc/0003-Add-support-for-strict-align-no-unaligned-access-in-.patch b/patches/picolibc/0003-Add-support-for-strict-align-no-unaligned-access-in-.patch new file mode 100644 index 00000000..1b30ab50 --- /dev/null +++ b/patches/picolibc/0003-Add-support-for-strict-align-no-unaligned-access-in-.patch @@ -0,0 +1,431 @@ +From ef4378c3f62947b9ce1eac19b717ac44d5aeecb7 Mon Sep 17 00:00:00 2001 +From: Lucas Prates +Date: Mon, 11 Nov 2024 16:37:04 +0000 +Subject: Add support for strict-align/no-unaligned-access in AArch64 + +--- + newlib/libc/machine/aarch64/memchr-stub.c | 2 +- + newlib/libc/machine/aarch64/memchr.S | 2 +- + newlib/libc/machine/aarch64/memcmp-stub.c | 2 +- + newlib/libc/machine/aarch64/memcmp.S | 2 +- + newlib/libc/machine/aarch64/memcpy-stub.c | 2 +- + newlib/libc/machine/aarch64/memcpy.S | 2 +- + newlib/libc/machine/aarch64/memmove-stub.c | 2 +- + newlib/libc/machine/aarch64/memrchr-stub.c | 2 +- + newlib/libc/machine/aarch64/memrchr.S | 2 +- + newlib/libc/machine/aarch64/memset-stub.c | 2 +- + newlib/libc/machine/aarch64/memset.S | 2 +- + newlib/libc/machine/aarch64/rawmemchr-stub.c | 2 +- + newlib/libc/machine/aarch64/rawmemchr.S | 2 +- + newlib/libc/machine/aarch64/stpcpy-stub.c | 2 +- + newlib/libc/machine/aarch64/strchr-stub.c | 2 +- + newlib/libc/machine/aarch64/strchr.S | 2 +- + newlib/libc/machine/aarch64/strchrnul-stub.c | 2 +- + newlib/libc/machine/aarch64/strchrnul.S | 2 +- + newlib/libc/machine/aarch64/strcmp-stub.c | 2 +- + newlib/libc/machine/aarch64/strcmp.S | 2 +- + newlib/libc/machine/aarch64/strcpy-stub.c | 2 +- + newlib/libc/machine/aarch64/strcpy.S | 2 +- + newlib/libc/machine/aarch64/strlen-stub.c | 2 +- + newlib/libc/machine/aarch64/strlen.S | 2 +- + newlib/libc/machine/aarch64/strncmp-stub.c | 2 +- + newlib/libc/machine/aarch64/strncmp.S | 2 +- + newlib/libc/machine/aarch64/strnlen-stub.c | 2 +- + newlib/libc/machine/aarch64/strnlen.S | 2 +- + newlib/libc/machine/aarch64/strrchr-stub.c | 2 +- + newlib/libc/machine/aarch64/strrchr.S | 2 +- + 30 files changed, 30 insertions(+), 30 deletions(-) + +diff --git a/newlib/libc/machine/aarch64/memchr-stub.c b/newlib/libc/machine/aarch64/memchr-stub.c +index c887bc62f..735fc9d31 100644 +--- a/newlib/libc/machine/aarch64/memchr-stub.c ++++ b/newlib/libc/machine/aarch64/memchr-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/memchr.c" + #else + /* See memchr.S */ +diff --git a/newlib/libc/machine/aarch64/memchr.S b/newlib/libc/machine/aarch64/memchr.S +index 29fc3c3c8..70686a8da 100644 +--- a/newlib/libc/machine/aarch64/memchr.S ++++ b/newlib/libc/machine/aarch64/memchr.S +@@ -7,7 +7,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See memchr-stub.c */ + #else + /* Assumptions: +diff --git a/newlib/libc/machine/aarch64/memcmp-stub.c b/newlib/libc/machine/aarch64/memcmp-stub.c +index af0cebf37..11aa224dc 100644 +--- a/newlib/libc/machine/aarch64/memcmp-stub.c ++++ b/newlib/libc/machine/aarch64/memcmp-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/memcmp.c" + #else + /* See memcmp.S */ +diff --git a/newlib/libc/machine/aarch64/memcmp.S b/newlib/libc/machine/aarch64/memcmp.S +index 11352ff21..2c9c8e9e3 100644 +--- a/newlib/libc/machine/aarch64/memcmp.S ++++ b/newlib/libc/machine/aarch64/memcmp.S +@@ -6,7 +6,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See memcmp-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/memcpy-stub.c b/newlib/libc/machine/aarch64/memcpy-stub.c +index 145f638da..df8bcf588 100644 +--- a/newlib/libc/machine/aarch64/memcpy-stub.c ++++ b/newlib/libc/machine/aarch64/memcpy-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/memcpy.c" + #else + /* See memcpy.S */ +diff --git a/newlib/libc/machine/aarch64/memcpy.S b/newlib/libc/machine/aarch64/memcpy.S +index 39ff69a16..11e573ee0 100644 +--- a/newlib/libc/machine/aarch64/memcpy.S ++++ b/newlib/libc/machine/aarch64/memcpy.S +@@ -13,7 +13,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_FEATURE_UNALIGNED) + /* See memcpy-stub.c */ + #else + #include "asmdefs.h" +diff --git a/newlib/libc/machine/aarch64/memmove-stub.c b/newlib/libc/machine/aarch64/memmove-stub.c +index 41fd6643c..8498d3459 100644 +--- a/newlib/libc/machine/aarch64/memmove-stub.c ++++ b/newlib/libc/machine/aarch64/memmove-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/memmove.c" + #else + /* See memcpy.S */ +diff --git a/newlib/libc/machine/aarch64/memrchr-stub.c b/newlib/libc/machine/aarch64/memrchr-stub.c +index 63504543c..b9dc29211 100644 +--- a/newlib/libc/machine/aarch64/memrchr-stub.c ++++ b/newlib/libc/machine/aarch64/memrchr-stub.c +@@ -6,7 +6,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + #include "../../string/memrchr.c" + #else + /* See memrchr.S */ +diff --git a/newlib/libc/machine/aarch64/memrchr.S b/newlib/libc/machine/aarch64/memrchr.S +index a843de79e..d442e3d13 100644 +--- a/newlib/libc/machine/aarch64/memrchr.S ++++ b/newlib/libc/machine/aarch64/memrchr.S +@@ -13,7 +13,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See memrchr-stub.c */ + #else + #include "asmdefs.h" +diff --git a/newlib/libc/machine/aarch64/memset-stub.c b/newlib/libc/machine/aarch64/memset-stub.c +index e7e8b54f7..3c51d470f 100644 +--- a/newlib/libc/machine/aarch64/memset-stub.c ++++ b/newlib/libc/machine/aarch64/memset-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/memset.c" + #else + /* See memset.S */ +diff --git a/newlib/libc/machine/aarch64/memset.S b/newlib/libc/machine/aarch64/memset.S +index 87a419964..7bb4525f4 100644 +--- a/newlib/libc/machine/aarch64/memset.S ++++ b/newlib/libc/machine/aarch64/memset.S +@@ -13,7 +13,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See memset-stub.c */ + #else + #include "asmdefs.h" +diff --git a/newlib/libc/machine/aarch64/rawmemchr-stub.c b/newlib/libc/machine/aarch64/rawmemchr-stub.c +index 032e0560c..c57f3ec30 100644 +--- a/newlib/libc/machine/aarch64/rawmemchr-stub.c ++++ b/newlib/libc/machine/aarch64/rawmemchr-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/rawmemchr.c" + #else + /* See rawmemchr.S. */ +diff --git a/newlib/libc/machine/aarch64/rawmemchr.S b/newlib/libc/machine/aarch64/rawmemchr.S +index dc4b257dd..4b114e746 100644 +--- a/newlib/libc/machine/aarch64/rawmemchr.S ++++ b/newlib/libc/machine/aarch64/rawmemchr.S +@@ -32,7 +32,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_FEATURE_UNALIGNED) + /* See rawmemchr-stub.c. */ + #else + +diff --git a/newlib/libc/machine/aarch64/stpcpy-stub.c b/newlib/libc/machine/aarch64/stpcpy-stub.c +index 045f1a551..d7fe3066a 100644 +--- a/newlib/libc/machine/aarch64/stpcpy-stub.c ++++ b/newlib/libc/machine/aarch64/stpcpy-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/stpcpy.c" + #else + /* See stpcpy.S */ +diff --git a/newlib/libc/machine/aarch64/strchr-stub.c b/newlib/libc/machine/aarch64/strchr-stub.c +index b9ae08393..90eb01da2 100644 +--- a/newlib/libc/machine/aarch64/strchr-stub.c ++++ b/newlib/libc/machine/aarch64/strchr-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/strchr.c" + #else + /* See strchr.S */ +diff --git a/newlib/libc/machine/aarch64/strchr.S b/newlib/libc/machine/aarch64/strchr.S +index a735889b1..6e3575aa0 100644 +--- a/newlib/libc/machine/aarch64/strchr.S ++++ b/newlib/libc/machine/aarch64/strchr.S +@@ -28,7 +28,7 @@ + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strchr-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strchrnul-stub.c b/newlib/libc/machine/aarch64/strchrnul-stub.c +index aa1208cbb..e88cee2c6 100644 +--- a/newlib/libc/machine/aarch64/strchrnul-stub.c ++++ b/newlib/libc/machine/aarch64/strchrnul-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/strchrnul.c" + #else + /* See strchrnul.S */ +diff --git a/newlib/libc/machine/aarch64/strchrnul.S b/newlib/libc/machine/aarch64/strchrnul.S +index c60cef7d0..3a0b1dfde 100644 +--- a/newlib/libc/machine/aarch64/strchrnul.S ++++ b/newlib/libc/machine/aarch64/strchrnul.S +@@ -28,7 +28,7 @@ + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strchrnul-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strcmp-stub.c b/newlib/libc/machine/aarch64/strcmp-stub.c +index 652e4f651..c8d60c56d 100644 +--- a/newlib/libc/machine/aarch64/strcmp-stub.c ++++ b/newlib/libc/machine/aarch64/strcmp-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/strcmp.c" + #else + /* See strcmp.S */ +diff --git a/newlib/libc/machine/aarch64/strcmp.S b/newlib/libc/machine/aarch64/strcmp.S +index 641d6ae22..82635762b 100644 +--- a/newlib/libc/machine/aarch64/strcmp.S ++++ b/newlib/libc/machine/aarch64/strcmp.S +@@ -7,7 +7,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strcmp-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strcpy-stub.c b/newlib/libc/machine/aarch64/strcpy-stub.c +index 4cfa19e9c..4f9a95100 100644 +--- a/newlib/libc/machine/aarch64/strcpy-stub.c ++++ b/newlib/libc/machine/aarch64/strcpy-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/strcpy.c" + #else + /* See strcpy.S */ +diff --git a/newlib/libc/machine/aarch64/strcpy.S b/newlib/libc/machine/aarch64/strcpy.S +index 62e5f3f37..eecb81bb5 100644 +--- a/newlib/libc/machine/aarch64/strcpy.S ++++ b/newlib/libc/machine/aarch64/strcpy.S +@@ -28,7 +28,7 @@ + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strcpy-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strlen-stub.c b/newlib/libc/machine/aarch64/strlen-stub.c +index 3d9c3876c..ec44c927c 100644 +--- a/newlib/libc/machine/aarch64/strlen-stub.c ++++ b/newlib/libc/machine/aarch64/strlen-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/strlen.c" + #else + /* See strlen.S */ +diff --git a/newlib/libc/machine/aarch64/strlen.S b/newlib/libc/machine/aarch64/strlen.S +index 8e1a7cb7a..5204ad80d 100644 +--- a/newlib/libc/machine/aarch64/strlen.S ++++ b/newlib/libc/machine/aarch64/strlen.S +@@ -25,7 +25,7 @@ + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strlen-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strncmp-stub.c b/newlib/libc/machine/aarch64/strncmp-stub.c +index 504c12d7b..6751bad38 100644 +--- a/newlib/libc/machine/aarch64/strncmp-stub.c ++++ b/newlib/libc/machine/aarch64/strncmp-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/strncmp.c" + #else + /* See strncmp.S */ +diff --git a/newlib/libc/machine/aarch64/strncmp.S b/newlib/libc/machine/aarch64/strncmp.S +index b2470a408..34c8bbec2 100644 +--- a/newlib/libc/machine/aarch64/strncmp.S ++++ b/newlib/libc/machine/aarch64/strncmp.S +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strncmp-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strnlen-stub.c b/newlib/libc/machine/aarch64/strnlen-stub.c +index 2f50cdbdf..b1757b1ff 100644 +--- a/newlib/libc/machine/aarch64/strnlen-stub.c ++++ b/newlib/libc/machine/aarch64/strnlen-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + # include "../../string/strnlen.c" + #else + /* See strnlen.S */ +diff --git a/newlib/libc/machine/aarch64/strnlen.S b/newlib/libc/machine/aarch64/strnlen.S +index e64137665..40fbeafb0 100644 +--- a/newlib/libc/machine/aarch64/strnlen.S ++++ b/newlib/libc/machine/aarch64/strnlen.S +@@ -28,7 +28,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strnlen-stub.c */ + #else + +diff --git a/newlib/libc/machine/aarch64/strrchr-stub.c b/newlib/libc/machine/aarch64/strrchr-stub.c +index b8fe32f75..362a7086b 100644 +--- a/newlib/libc/machine/aarch64/strrchr-stub.c ++++ b/newlib/libc/machine/aarch64/strrchr-stub.c +@@ -26,7 +26,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined (__ARM_FEATURE_UNALIGNED) + # include "../../string/strrchr.c" + #else + /* See strrchr.S */ +diff --git a/newlib/libc/machine/aarch64/strrchr.S b/newlib/libc/machine/aarch64/strrchr.S +index 1fccba9f8..2f0cdc0c7 100644 +--- a/newlib/libc/machine/aarch64/strrchr.S ++++ b/newlib/libc/machine/aarch64/strrchr.S +@@ -29,7 +29,7 @@ + + #include + +-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) ++#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED)) || !defined(__LP64__) || !defined(__ARM_NEON) || !defined(__ARM_FEATURE_UNALIGNED) + /* See strrchr-stub.c */ + #else + +-- +2.43.0 + diff --git a/samples/Makefile.conf b/samples/Makefile.conf index aa65263b..4ccae915 100644 --- a/samples/Makefile.conf +++ b/samples/Makefile.conf @@ -22,7 +22,6 @@ endif MICROBIT_TARGET=--target=armv6m-none-eabi -march=armv6m -mfpu=none -mfloat-abi=soft AARCH64_TARGET=--target=aarch64-none-elf -CRT=-lcrt0 -CRT_SEMIHOST=-lcrt0-semihost -lsemihost +CRT_SEMIHOST=-nostartfiles -lcrt0-semihost -lsemihost CPP_FLAGS=-fno-exceptions -fno-rtti diff --git a/samples/src/baremetal-semihosting-aarch64/make.bat b/samples/src/baremetal-semihosting-aarch64/make.bat index b1c3a7f7..8264ee3a 100644 --- a/samples/src/baremetal-semihosting-aarch64/make.bat +++ b/samples/src/baremetal-semihosting-aarch64/make.bat @@ -49,6 +49,6 @@ if exist hello.img del /q hello.img @exit /B 1 :build_fn -%BIN_PATH%\clang.exe --target=aarch64-none-elf -lcrt0-semihost -lsemihost -g -T ..\..\ldscripts\raspi3b.ld -o hello.elf hello.c +%BIN_PATH%\clang.exe --target=aarch64-none-elf -nostartfiles -lcrt0-semihost -lsemihost -g -T ..\..\ldscripts\raspi3b.ld -o hello.elf hello.c %BIN_PATH%\llvm-objcopy.exe -O binary hello.elf hello.img @exit /B diff --git a/samples/src/baremetal-semihosting/make.bat b/samples/src/baremetal-semihosting/make.bat index 826818f1..4b80e42e 100644 --- a/samples/src/baremetal-semihosting/make.bat +++ b/samples/src/baremetal-semihosting/make.bat @@ -49,6 +49,6 @@ if exist hello.hex del /q hello.hex @exit /B 1 :build_fn -%BIN_PATH%\clang.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.c +%BIN_PATH%\clang.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.c %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B diff --git a/samples/src/baremetal-uart/Makefile b/samples/src/baremetal-uart/Makefile index 589d5bd0..14b51b4b 100644 --- a/samples/src/baremetal-uart/Makefile +++ b/samples/src/baremetal-uart/Makefile @@ -20,7 +20,7 @@ include ../../Makefile.conf build: hello.elf hello.elf: *.c - $(BIN_PATH)/clang $(MICROBIT_TARGET) $(CRT) -g -T ../../ldscripts/microbit.ld -o hello.elf $^ + $(BIN_PATH)/clang $(MICROBIT_TARGET) -g -T ../../ldscripts/microbit.ld -o hello.elf $^ %.hex: %.elf $(BIN_PATH)/llvm-objcopy -O ihex $< $@ diff --git a/samples/src/baremetal-uart/make.bat b/samples/src/baremetal-uart/make.bat index b61dcb71..7b9c3a39 100644 --- a/samples/src/baremetal-uart/make.bat +++ b/samples/src/baremetal-uart/make.bat @@ -49,6 +49,6 @@ if exist hello.hex del /q hello.hex @exit /B 1 :build_fn -%BIN_PATH%\clang.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0 -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.c +%BIN_PATH%\clang.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.c %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B diff --git a/samples/src/cpp-baremetal-semihosting-cfi/make.bat b/samples/src/cpp-baremetal-semihosting-cfi/make.bat index b8d1a4ff..66b7ccbd 100644 --- a/samples/src/cpp-baremetal-semihosting-cfi/make.bat +++ b/samples/src/cpp-baremetal-semihosting-cfi/make.bat @@ -57,12 +57,12 @@ if exist hello.hex del /q hello.hex :build_fn %BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -fno-exceptions -fno-rtti -flto -fsanitize=cfi -fvisibility=hidden -fno-sanitize-ignorelist -g -c hello.cpp -%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -flto -T ..\..\ldscripts\microbit.ld -g -o hello.elf hello.o +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -flto -T ..\..\ldscripts\microbit.ld -g -o hello.elf hello.o %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B :build_no_cfi_fn %BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -fno-exceptions -fno-rtti -flto -g -c hello.cpp -%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -flto -T ..\..\ldscripts\microbit.ld -g -o hello.elf hello.o +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -flto -T ..\..\ldscripts\microbit.ld -g -o hello.elf hello.o %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B diff --git a/samples/src/cpp-baremetal-semihosting-exceptions/Makefile b/samples/src/cpp-baremetal-semihosting-exceptions/Makefile index 349e888d..7465f51a 100644 --- a/samples/src/cpp-baremetal-semihosting-exceptions/Makefile +++ b/samples/src/cpp-baremetal-semihosting-exceptions/Makefile @@ -25,7 +25,7 @@ hello.hex: hello.cpp $(BIN_PATH)/llvm-objcopy -O ihex hello.elf hello.hex hello-exn.hex: hello-exn.cpp - $(BIN_PATH)/clang++ $(MICROBIT_TARGET) $(CRT_SEMIHOST) -print-multi-directory -g -T ../../ldscripts/microbit.ld -o hello.elf $^ | grep "_exn_" + $(BIN_PATH)/clang++ $(MICROBIT_TARGET) $(CRT_SEMIHOST) -print-multi-directory -g -T ../../ldscripts/microbit.ld -o hello-exn.elf $^ | grep "_exn_" $(BIN_PATH)/clang++ $(MICROBIT_TARGET) $(CRT_SEMIHOST) -g -T ../../ldscripts/microbit.ld -o hello-exn.elf $^ $(BIN_PATH)/llvm-objcopy -O ihex hello-exn.elf hello-exn.hex diff --git a/samples/src/cpp-baremetal-semihosting-exceptions/make.bat b/samples/src/cpp-baremetal-semihosting-exceptions/make.bat new file mode 100644 index 00000000..af5110ed --- /dev/null +++ b/samples/src/cpp-baremetal-semihosting-exceptions/make.bat @@ -0,0 +1,64 @@ +@REM Copyright (c) 2024, Arm Limited and affiliates. +@REM SPDX-License-Identifier: Apache-2.0 +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. + +@if [%1]==[] goto :target_empty +@set target=%1 +@goto :make +:target_empty +@set target=build + +:make +@if [%target%]==[build] goto :build +@if [%target%]==[run] goto :run +@if [%target%]==[clean] goto :clean +@echo Error: unknown target "%target%" +@exit /B 1 + +:build +@if [%BIN_PATH%]==[] goto :bin_path_empty +@call :build_fn +@exit /B + +:run +@if exist hello.hex goto :do_run +@if [%BIN_PATH%]==[] goto :bin_path_empty +@call :build_fn +:do_run +qemu-system-arm.exe -M microbit -semihosting -nographic -device loader,file=hello.hex +qemu-system-arm.exe -M microbit -semihosting -nographic -device loader,file=hello-exn.hex +@exit /B + +:clean +if exist hello.elf del /q hello.elf +if exist hello.hex del /q hello.hex +if exist hello-exn.elf del /q hello-exn.elf +if exist hello-exn.hex del /q hello-exn.hex +@exit /B + +:bin_path_empty +@echo Error: BIN_PATH environment variable is not set +@exit /B 1 + +:build_fn +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -print-multi-directory -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.cpp +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.cpp +%BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -print-multi-directory -g -T ..\..\ldscripts\microbit.ld -o hello-exn.elf hello-exn.cpp +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -g -T ..\..\ldscripts\microbit.ld -o hello-exn.elf hello-exn.cpp +%BIN_PATH%\llvm-objcopy.exe -O ihex hello-exn.elf hello-exn.hex +@exit /B + +:build_exn_fn +@exit /B diff --git a/samples/src/cpp-baremetal-semihosting-prof/make.bat b/samples/src/cpp-baremetal-semihosting-prof/make.bat index cff03fdf..895ceab2 100644 --- a/samples/src/cpp-baremetal-semihosting-prof/make.bat +++ b/samples/src/cpp-baremetal-semihosting-prof/make.bat @@ -37,8 +37,8 @@ @call :build_fn :do_run qemu-system-arm.exe -M microbit -semihosting -nographic -device loader,file=hello.hex -llvm-profdata.exe merge -sparse default.profraw -o hello.profdata -llvm-cov.exe show hello.elf -instr-profile=hello.profdata +%BIN_PATH%\llvm-profdata.exe merge -sparse default.profraw -o hello.profdata +%BIN_PATH%\llvm-cov.exe show hello.elf -instr-profile=hello.profdata @exit /B :clean @@ -55,6 +55,6 @@ if exist proflib.o del /q proflib.o :build_fn %BIN_PATH%\clang.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -g -c proflib.c -%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -g -T ..\..\ldscripts\microbit.ld -fprofile-instr-generate -fcoverage-mapping -o hello.elf hello.cpp proflib.o +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -g -T ..\..\ldscripts\microbit.ld -fprofile-instr-generate -fcoverage-mapping -o hello.elf hello.cpp proflib.o %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B diff --git a/samples/src/cpp-baremetal-semihosting-ubsan/make.bat b/samples/src/cpp-baremetal-semihosting-ubsan/make.bat index 12007fe3..cf9493d7 100644 --- a/samples/src/cpp-baremetal-semihosting-ubsan/make.bat +++ b/samples/src/cpp-baremetal-semihosting-ubsan/make.bat @@ -55,11 +55,11 @@ if exist hello.hex del /q hello.hex @exit /B 1 :build_fn -%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti --std=c++17 -fsanitize=undefined -fsanitize-minimal-runtime -g -T ../../ldscripts/microbit.ld -o hello.elf *.cpp +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti --std=c++17 -fsanitize=undefined -fsanitize-minimal-runtime -g -T ../../ldscripts/microbit.ld -o hello.elf *.cpp %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B :build_trap_fn -%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti --std=c++17 -fsanitize=undefined -fsanitize-trap=all -g -T ../../ldscripts/microbit.ld -o hello.elf *.cpp +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti --std=c++17 -fsanitize=undefined -fsanitize-trap=all -g -T ../../ldscripts/microbit.ld -o hello.elf *.cpp %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B diff --git a/samples/src/cpp-baremetal-semihosting/make.bat b/samples/src/cpp-baremetal-semihosting/make.bat index 1e5b9b33..f868a3e8 100644 --- a/samples/src/cpp-baremetal-semihosting/make.bat +++ b/samples/src/cpp-baremetal-semihosting/make.bat @@ -49,6 +49,6 @@ if exist hello.hex del /q hello.hex @exit /B 1 :build_fn -%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.cpp +%BIN_PATH%\clang++.exe --target=armv6m-none-eabi -mfloat-abi=soft -march=armv6m -mfpu=none -nostartfiles -lcrt0-semihost -lsemihost -fno-exceptions -fno-rtti -g -T ..\..\ldscripts\microbit.ld -o hello.elf hello.cpp %BIN_PATH%\llvm-objcopy.exe -O ihex hello.elf hello.hex @exit /B diff --git a/test-support/picolibc-test-wrapper.py b/test-support/picolibc-test-wrapper.py deleted file mode 100755 index 9e9e2abb..00000000 --- a/test-support/picolibc-test-wrapper.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2023, Arm Limited and affiliates. - -# This is a wrapper script to run picolibc tests with QEMU. - -from run_qemu import run_qemu -import argparse -import pathlib -import sys - -# https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors -EXIT_CODE_SKIP = 77 - -disabled_tests = [ - # compiler-rt does not properly set floating point exceptions for - # computations on types implemented in software - # https://github.com/picolibc/picolibc/pull/500 - "picolibc_armv7m_soft_fpv4_sp_d16-build/test/math_errhandling", - "picolibc_armv7em_hard_fpv4_sp_d16-build/test/math_errhandling", - "picolibc_armv8.1m.main_hard_fp_nomve-build/test/math_errhandling", - "picolibc_armv7m_soft_fpv4_sp_d16_exn_rtti-build/test/math_errhandling", - "picolibc_armv7em_hard_fpv4_sp_d16_exn_rtti-build/test/math_errhandling", - "picolibc_armv8.1m.main_hard_fp_nomve_exn_rtti-build/test/math_errhandling", - "picolibc_armv8.1m.main_hard_nofp_mve-build/test/fenv", - "picolibc_armv8.1m.main_hard_nofp_mve-build/test/math_errhandling", - "picolibc_armv8m.main_hard_fp-build/test/math_errhandling", - "picolibc_armv8.1m.main_hard_nofp_mve_exn_rtti-build/test/fenv", - "picolibc_armv8.1m.main_hard_nofp_mve_exn_rtti-build/test/math_errhandling", - "picolibc_armv8m.main_hard_fp_exn_rtti-build/test/math_errhandling", -] - - -def is_disabled(image): - return any([image.endswith(t) for t in disabled_tests]) - - -def run(args): - if is_disabled(args.image): - return EXIT_CODE_SKIP - return run_qemu( - args.qemu_command, - args.qemu_machine, - args.qemu_cpu, - args.qemu_params.split(":") if args.qemu_params else [], - args.image, - ["program-name"] + args.arguments, - None, - pathlib.Path.cwd(), - args.verbose, - ) - - -def main(): - parser = argparse.ArgumentParser( - description="Run a single test using qemu" - ) - parser.add_argument( - "--qemu-command", required=True, help="qemu-system- path" - ) - parser.add_argument( - "--qemu-machine", - required=True, - help="name of the machine to pass to QEMU", - ) - parser.add_argument( - "--qemu-cpu", required=False, help="name of the cpu to pass to QEMU" - ) - parser.add_argument( - "--qemu-params", - required=False, - help='list of arguments to pass to qemu, separated with ":"', - ) - parser.add_argument( - "--verbose", - action="store_true", - help="Print verbose output. This may affect test result, as the output " - "will be added to the output of the test.", - ) - parser.add_argument("image", help="image file to execute") - parser.add_argument( - "arguments", - nargs=argparse.REMAINDER, - default=[], - help="optional arguments for the image", - ) - args = parser.parse_args() - ret_code = run(args) - sys.exit(ret_code) - - -if __name__ == "__main__": - main() diff --git a/test-support/run-picolibc-tests.py b/test-support/run-picolibc-tests.py deleted file mode 100755 index 8aa3b245..00000000 --- a/test-support/run-picolibc-tests.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2024, Arm Limited and affiliates. - -# This is a helper script to run the picolibc tests. -# -# This is just a glue code for cmake the script, not intended to be run -# manually. If you want to run the tests manually, using meson directly will -# provide you more options and is better documented: -# cd PICOLIBC_BUILD_DIR -# meson setup . PICOLIBC_SOURCE_DIR -Dtests=true --reconfigure -# meson test -# -# The tests for picolibc cannot be enabled at first invocation of meson, -# because compiler_rt is built after picolibc is built. If picolibc would be -# configured with tests enabled at before compiler_rt is built, the -# picolibc build would fail. This is why this script enables the tests just -# before picolibc is tested. -# -# Picolibc always puts all the test results into "picolibc" testsuite in the -# junit xml file. We have multiple variants of picolibc and so we add a -# classname to every test the tests are run. This has to be done even when the -# tests fail, while still returnning non-zero exit value, so that cmake detects -# failure. This would be hard to do from within the cmake script. - -import argparse -import sys -import re -import os.path -import subprocess - -help = "usage: run-picolibc-tests.py PICOLIBC_SOURCE_DIR PICOLIBC_BUILD_DIR" - - -def replace_classname(build_dir, classname): - xml_file_name = os.path.join(build_dir, "meson-logs", "testlog.junit.xml") - - with open(xml_file_name, "r") as f: - xml_file_data = f.read() - - xml_file_data = re.sub( - 'classname="picolibc"', - f'classname="picolibc.{classname}"', - xml_file_data, - ) - - with open(xml_file_name, "w") as f: - f.write(xml_file_data) - - -def run_tests(meson_command, source_dir, build_dir, variant): - - # meson<0.64.0 does not properly apply new configuration after - # "meson configure -Dtests=false" - # use "meson setup --reconfigure" as a workaround - subprocess.run( - [ - meson_command, - "setup", - ".", - source_dir, - "-Dtests=true", - "--reconfigure", - ], - cwd=build_dir, - check=True, - ) - - returncode = subprocess.run( - [meson_command, "test"], - cwd=build_dir, - ).returncode - - subprocess.run( - [meson_command, "configure", "-Dtests=false"], - cwd=build_dir, - check=True, - ) - - replace_classname(build_dir, variant) - - return returncode - - -def main(): - parser = argparse.ArgumentParser(description="Run picolibc tests") - parser.add_argument( - "--meson-command", required=True, default="meson", help="meson path" - ) - parser.add_argument( - "--picolibc-source-dir", - required=True, - help="path to picolibc sources", - ) - parser.add_argument( - "--picolibc-build-dir", - required=True, - help="path to picolibc build", - ) - parser.add_argument( - "--variant", - required=True, - help="name of the variant to be appended to the testsuite name", - ) - args = parser.parse_args() - ret_code = run_tests( - args.meson_command, - args.picolibc_source_dir, - args.picolibc_build_dir, - args.variant, - ) - sys.exit(ret_code) - - -if __name__ == "__main__": - main() diff --git a/test/multilib/aarch64.test b/test/multilib/aarch64.test index 19f861aa..95e94907 100644 --- a/test/multilib/aarch64.test +++ b/test/multilib/aarch64.test @@ -1,3 +1,60 @@ -# RUN: %clang -print-multi-directory --target=aarch64-none-elf | FileCheck %s -# CHECK: aarch64-none-elf/aarch64_exn_rtti{{$}} -# CHECK-EMPTY: +# RUN: %clang -print-multi-directory --target=aarch64-none-elf | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv8-a | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv8-a+fp16 | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv8.1-a | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv8.5-a+nodotprod | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv8.9-a | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv9.5-a | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv9.5-a+sve2+sme2 | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mcpu=cortex-a57 | FileCheck %s --check-prefix=AARCH64-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mcpu=cortex-a57+fp16 | FileCheck %s --check-prefix=AARCH64-EXNRTTI + +# AARCH64-EXNRTTI: aarch64-none-elf/aarch64a_exn_rtti{{$}} +# AARCH64-EXNRTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64 +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv8.5-a+nodotprod -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64 +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -march=armv9.5-a+sve2+sme2 -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64 +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mcpu=cortex-a57+fp16 -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64 + +# AARCH64: aarch64-none-elf/aarch64a{{$}} +# AARCH64-EMPTY: + + +# Big endian + +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8-a | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8-a+fp16 | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.1-a | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.5-a+nodotprod | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.9-a | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv9.5-a | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv9.5-a+sve2+sme2 | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mcpu=cortex-a57 | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mcpu=cortex-a57+fp16 | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8-a -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8-a+fp16 -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.1-a -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.5-a+nodotprod -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.9-a -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv9.5-a -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv9.5-a+sve2+sme2 -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mcpu=cortex-a57 -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mcpu=cortex-a57+fp16 -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE-EXNRTTI + +# AARCH64-BE-EXNRTTI: aarch64-none-elf/aarch64a_be_exn_rtti{{$}} +# AARCH64-BE-EXNRTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.5-a+nodotprod -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv9.5-a+sve2+sme2 -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mcpu=cortex-a57+fp16 -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv8.5-a+nodotprod -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -march=armv9.5-a+sve2+sme2 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE +# RUN: %clang -print-multi-directory --target=aarch64-none-elf -mbig-endian -mcpu=cortex-a57+fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=AARCH64-BE + +# AARCH64-BE: aarch64-none-elf/aarch64a_be{{$}} +# AARCH64-BE-EMPTY: diff --git a/test/multilib/aarch64_a_supported_variants.test b/test/multilib/aarch64_a_supported_variants.test new file mode 100644 index 00000000..5e4563b1 --- /dev/null +++ b/test/multilib/aarch64_a_supported_variants.test @@ -0,0 +1,35 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.1-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.2-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.3-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.4-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.5-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.6-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.6-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.7-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.7-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.8-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8.9-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.1-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.2-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.3-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.4-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv9.5-a -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/aarch64_r_supported_variants.test b/test/multilib/aarch64_r_supported_variants.test new file mode 100644 index 00000000..61536747 --- /dev/null +++ b/test/multilib/aarch64_r_supported_variants.test @@ -0,0 +1,5 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-r 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=aarch64-none-elf -march=armv8-r -mabi=aapcs-soft 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/arm_a_supported_variants.test b/test/multilib/arm_a_supported_variants.test new file mode 100644 index 00000000..bf7c4588 --- /dev/null +++ b/test/multilib/arm_a_supported_variants.test @@ -0,0 +1,1190 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.2-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.3-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.4-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.5-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.6-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.7-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.8-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.9-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.1-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.2-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.3-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.4-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv9.5-a -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/arm_m_supported_variants.test b/test/multilib/arm_m_supported_variants.test new file mode 100644 index 00000000..f086bd66 --- /dev/null +++ b/test/multilib/arm_m_supported_variants.test @@ -0,0 +1,695 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv6-m -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7e-m -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-m -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.base -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-m.main -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+fp16 -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+mve.fp -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8.1-m.main+lob -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/arm_r_supported_variants.test b/test/multilib/arm_r_supported_variants.test new file mode 100644 index 00000000..0d66a5b4 --- /dev/null +++ b/test/multilib/arm_r_supported_variants.test @@ -0,0 +1,169 @@ +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv7-r -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=hard -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv2 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=soft -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=none 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fpv4-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fpv5-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fpv5-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-sp-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fp-armv8-fullfp16-d16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=crypto-neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon-fp-armv8 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3-d16-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3xd 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv3xd-fp16 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv4 2>&1 | FileCheck %s --match-full-lines +# RUN: %clang -print-multi-flags-experimental -S -x c -v - '-###' --target=arm-none-eabi -march=armv8-r -mfloat-abi=softfp -mfpu=vfpv4-d16 2>&1 | FileCheck %s --match-full-lines + +# CHECK-NOT: error +# CHECK-NOT: warning diff --git a/test/multilib/armv6m.test b/test/multilib/armv6m.test index e9f86699..12cc03f0 100644 --- a/test/multilib/armv6m.test +++ b/test/multilib/armv6m.test @@ -1,3 +1,25 @@ -# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mfpu=none | FileCheck %s -# CHECK: arm-none-eabi/armv6m_soft_nofp_exn_rtti{{$}} -# CHECK-EMPTY: +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mfpu=none | FileCheck %s --check-prefix=CHECK-NOFP-EXN-RTTI-UNALIGNED +# CHECK-NOFP-EXN-RTTI-UNALIGNED: arm-none-eabi/armv6m_soft_nofp_exn_rtti_unaligned{{$}} +# CHECK-NOFP-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mfpu=none -mno-unaligned-access | FileCheck %s --check-prefix=CHECK-NOFP-EXN-RTTI +# CHECK-NOFP-EXN-RTTI: arm-none-eabi/armv6m_soft_nofp_exn_rtti{{$}} +# CHECK-NOFP-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=CHECK-NOFP-UNALIGNED +# CHECK-NOFP-UNALIGNED: arm-none-eabi/armv6m_soft_nofp_unaligned{{$}} +# CHECK-NOFP-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=CHECK-NOFP +# CHECK-NOFP: arm-none-eabi/armv6m_soft_nofp{{$}} +# CHECK-NOFP-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=CHECK-BE-NOFP +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=CHECK-BE-NOFP +# CHECK-BE-NOFP: arm-none-eabi/armebv6m_soft_nofp{{$}} +# CHECK-BE-NOFP-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mbig-endian -mfpu=none | FileCheck %s --check-prefix=CHECK-BE-NOFP-EXN-RTTI +# RUN: %clang -print-multi-directory --target=armv6m-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access | FileCheck %s --check-prefix=CHECK-BE-NOFP-EXN-RTTI +# CHECK-BE-NOFP-EXN-RTTI: arm-none-eabi/armebv6m_soft_nofp_exn_rtti{{$}} +# CHECK-BE-NOFP-EXN-RTTI-EMPTY: diff --git a/test/multilib/armv7a.test b/test/multilib/armv7a.test index f8e2211b..72cd25ff 100644 --- a/test/multilib/armv7a.test +++ b/test/multilib/armv7a.test @@ -1,20 +1,160 @@ -# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none | FileCheck %s -# CHECK: arm-none-eabi/armv7a_soft_nofp_exn_rtti{{$}} -# CHECK-EMPTY: - -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16-fp16 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-fp16 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4-d16 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-fp16 | FileCheck --check-prefix=VFPV3 %s -# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv4 | FileCheck --check-prefix=VFPV3 %s -# VFPV3: arm-none-eabi/armv7a_hard_vfpv3_d16_exn_rtti{{$}} +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -marm | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mthumb| FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -marm | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mthumb| FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# NOFP-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7a_soft_nofp_exn_rtti_unaligned{{$}} +# NOFP-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mno-unaligned-access | FileCheck --check-prefix=NOFP-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mno-unaligned-access | FileCheck --check-prefix=NOFP-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP-EXN-RTTI %s +# NOFP-EXN-RTTI: arm-none-eabi/armv7a_soft_nofp_exn_rtti{{$}} +# NOFP-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -marm -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mthumb -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -marm -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mthumb -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# NOFP-UNALIGNED: arm-none-eabi/armv7a_soft_nofp_unaligned{{$}} +# NOFP-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=NOFP %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=NOFP %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP %s +# NOFP: arm-none-eabi/armv7a_soft_nofp{{$}} +# NOFP-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16-fp16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-fp16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4-d16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-fp16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv4 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -marm | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -mthumb | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -mthumb | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# VFPV3-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7a_hard_vfpv3_d16_exn_rtti_unaligned{{$}} +# VFPV3-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16-fp16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-fp16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-fp16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv4 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -marm -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# VFPV3-EXN-RTTI: arm-none-eabi/armv7a_hard_vfpv3_d16_exn_rtti{{$}} +# VFPV3-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti | FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16-fp16 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-fp16 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4-d16 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-fp16 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv4 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -marm -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -mthumb -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -mthumb -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s +# VFPV3-UNALIGNED: arm-none-eabi/armv7a_hard_vfpv3_d16_unaligned{{$}} +# VFPV3-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16-fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv4 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv4 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -marm -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -mthumb -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# VFPV3: arm-none-eabi/armv7a_hard_vfpv3_d16{{$}} # VFPV3-EMPTY: +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv3 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-fp16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-fp16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv4 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# SOFT-VFPV3-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7a_soft_vfpv3_d16_exn_rtti_unaligned{{$}} +# SOFT-VFPV3-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv3 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-fp16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-fp16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv4 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# SOFT-VFPV3-EXN-RTTI: arm-none-eabi/armv7a_soft_vfpv3_d16_exn_rtti{{$}} +# SOFT-VFPV3-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv3 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-fp16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-fp16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv4 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# SOFT-VFPV3-UNALIGNED: arm-none-eabi/armv7a_soft_vfpv3_d16_unaligned{{$}} +# SOFT-VFPV3-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv3 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-fp16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv4 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-fp16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv4 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# SOFT-VFPV3: arm-none-eabi/armv7a_soft_vfpv3_d16{{$}} +# SOFT-VFPV3-EMPTY: + # We have no valid variant for this configuration, yet. -# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 2>&1 | FileCheck --check-prefix=NOT-FOUND %s +# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3xd 2>&1 | FileCheck --check-prefix=NOT-FOUND %s # NOT-FOUND: warning: no multilib found matching flags diff --git a/test/multilib/armv7em.test b/test/multilib/armv7em.test deleted file mode 100644 index acf847e0..00000000 --- a/test/multilib/armv7em.test +++ /dev/null @@ -1,11 +0,0 @@ -# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=none | FileCheck %s -# CHECK: arm-none-eabi/armv7em_soft_nofp_exn_rtti{{$}} -# CHECK-EMPTY: - -# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv4-sp-d16 | FileCheck --check-prefix=FPV4 %s -# FPV4: arm-none-eabi/armv7em_hard_fpv4_sp_d16_exn_rtti{{$}} -# FPV4-EMPTY: - -# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv5-d16 | FileCheck --check-prefix=FPV5 %s -# FPV5: arm-none-eabi/armv7em_hard_fpv5_d16_exn_rtti{{$}} -# FPV5-EMPTY: diff --git a/test/multilib/armv7m.test b/test/multilib/armv7m.test index f5e132dc..18d5c578 100644 --- a/test/multilib/armv7m.test +++ b/test/multilib/armv7m.test @@ -1,9 +1,82 @@ -# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none | FileCheck %s -# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -mfloat-abi=softfp | FileCheck %s -# CHECK: arm-none-eabi/armv7m_soft_nofp_exn_rtti{{$}} -# CHECK-EMPTY: - -# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4 %s -# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4 %s -# SOFT-FPV4: arm-none-eabi/armv7m_soft_fpv4_sp_d16_exn_rtti{{$}} +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -mfloat-abi=softfp | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=none -mfloat-abi=softfp | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# NOFP-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7m_soft_nofp_exn_rtti_unaligned{{$}} +# NOFP-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -mno-unaligned-access | FileCheck %s --check-prefix=NOFP-EXN-RTTI +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -mfloat-abi=softfp -mno-unaligned-access | FileCheck %s --check-prefix=NOFP-EXN-RTTI +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=none -mfloat-abi=softfp -mno-unaligned-access | FileCheck %s --check-prefix=NOFP-EXN-RTTI +# NOFP-EXN-RTTI: arm-none-eabi/armv7m_soft_nofp_exn_rtti{{$}} +# NOFP-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mfloat-abi=softfp | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mfloat-abi=softfp | FileCheck %s --check-prefix=NOFP-UNALIGNED +# NOFP-UNALIGNED: arm-none-eabi/armv7m_soft_nofp_unaligned{{$}} +# NOFP-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=NOFP +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mfloat-abi=softfp -mno-unaligned-access | FileCheck %s --check-prefix=NOFP +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mfloat-abi=softfp -mno-unaligned-access | FileCheck %s --check-prefix=NOFP +# NOFP: arm-none-eabi/armv7m_soft_nofp{{$}} +# NOFP-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI-UNALIGNED %s +# SOFT-FPV4-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned{{$}} +# SOFT-FPV4-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4-EXN-RTTI %s +# SOFT-FPV4-EXN-RTTI: arm-none-eabi/armv7m_soft_fpv4_sp_d16_exn_rtti{{$}} +# SOFT-FPV4-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-FPV4-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-FPV4-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-FPV4-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-FPV4-UNALIGNED %s +# SOFT-FPV4-UNALIGNED: arm-none-eabi/armv7m_soft_fpv4_sp_d16_unaligned{{$}} +# SOFT-FPV4-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4 %s +# RUN: %clang -print-multi-directory --target=armv7m-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4 %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4 %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabi -mfpu=fpv5-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-FPV4 %s +# SOFT-FPV4: arm-none-eabi/armv7m_soft_fpv4_sp_d16{{$}} # SOFT-FPV4-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabihf -mfpu=fpv4-sp-d16 | FileCheck --check-prefix=FPV4-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv4-sp-d16 | FileCheck --check-prefix=FPV4-EXN-RTTI-UNALIGNED %s +# FPV4-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7m_hard_fpv4_sp_d16_exn_rtti_unaligned{{$}} +# FPV4-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabihf -mfpu=fpv4-sp-d16 -mno-unaligned-access | FileCheck --check-prefix=FPV4-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv4-sp-d16 -mno-unaligned-access | FileCheck --check-prefix=FPV4-EXN-RTTI %s +# FPV4-EXN-RTTI: arm-none-eabi/armv7m_hard_fpv4_sp_d16_exn_rtti{{$}} +# FPV4-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti | FileCheck --check-prefix=FPV4-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti | FileCheck --check-prefix=FPV4-UNALIGNED %s +# FPV4-UNALIGNED: arm-none-eabi/armv7m_hard_fpv4_sp_d16_unaligned{{$}} +# FPV4-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=FPV4 %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv4-sp-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=FPV4 %s +# FPV4: arm-none-eabi/armv7m_hard_fpv4_sp_d16{{$}} +# FPV4-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7m-none-eabihf -mfpu=fpv5-d16 | FileCheck --check-prefix=FPV5 %s +# RUN: %clang -print-multi-directory --target=armv7em-none-eabihf -mfpu=fpv5-d16 | FileCheck --check-prefix=FPV5 %s +# FPV5: arm-none-eabi/armv7m_hard_fpv5_d16_exn_rtti{{$}} +# FPV5-EMPTY: + +# %clang -print-multi-directory --target=arm-none-eabi -mcpu=cortex-m3 | FileCheck %s --check-prefix=NONE +# %clang -print-multi-directory --target=arm-none-eabi -mcpu=cortex-m4 | FileCheck %s --check-prefix=SOFT-FPV4 +# %clang -print-multi-directory --target=arm-none-eabihf -mcpu=cortex-m4 | FileCheck %s --check-prefix=FPV4 +# %clang -print-multi-directory --target=arm-none-eabi -mcpu=cortex-m7 | FileCheck %s --check-prefix=SOFT-FPV4 +# %clang -print-multi-directory --target=arm-none-eabihf -mcpu=cortex-m7 | FileCheck %s --check-prefix=FPV4 diff --git a/test/multilib/armv7r.test b/test/multilib/armv7r.test index ac609ac4..dd700093 100644 --- a/test/multilib/armv7r.test +++ b/test/multilib/armv7r.test @@ -1,7 +1,95 @@ -# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none | FileCheck %s -# CHECK: arm-none-eabi/armv7r_soft_nofp_exn_rtti{{$}} -# CHECK-EMPTY: +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -marm | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -mthumb | FileCheck %s --check-prefix=NOFP-EXN-RTTI-UNALIGNED +# NOFP-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7r_soft_nofp_exn_rtti_unaligned{{$}} +# NOFP-EXN-RTTI-UNALIGNED-EMPTY: -# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s -# VFPV3: arm-none-eabi/armv7r_hard_vfpv3_d16_exn_rtti{{$}} +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -mno-unaligned-access | FileCheck %s --check-prefix=NOFP-EXN-RTTI +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -marm -mno-unaligned-access | FileCheck %s --check-prefix=NOFP-EXN-RTTI +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -mthumb -mno-unaligned-access | FileCheck %s --check-prefix=NOFP-EXN-RTTI +# NOFP-EXN-RTTI: arm-none-eabi/armv7r_soft_nofp_exn_rtti{{$}} +# NOFP-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -fno-exceptions -fno-rtti -marm | FileCheck %s --check-prefix=NOFP-UNALIGNED +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mthumb | FileCheck %s --check-prefix=NOFP-UNALIGNED +# NOFP-UNALIGNED: arm-none-eabi/armv7r_soft_nofp_unaligned{{$}} +# NOFP-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck %s --check-prefix=NOFP +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -fno-exceptions -fno-rtti -marm -mno-unaligned-access | FileCheck %s --check-prefix=NOFP +# RUN: %clang -print-multi-directory --target=armv7r-none-eabi -mfpu=none -fno-exceptions -fno-rtti -mthumb -mno-unaligned-access | FileCheck %s --check-prefix=NOFP +# NOFP: arm-none-eabi/armv7r_soft_nofp{{$}} +# NOFP-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -marm | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mthumb | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s +# VFPV3-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7r_hard_vfpv3_d16_exn_rtti_unaligned{{$}} +# VFPV3-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -marm -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI %s +# VFPV3-EXN-RTTI: arm-none-eabi/armv7r_hard_vfpv3_d16_exn_rtti{{$}} +# VFPV3-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti | FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -marm | FileCheck --check-prefix=VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mthumb | FileCheck --check-prefix=VFPV3-UNALIGNED %s +# VFPV3-UNALIGNED: arm-none-eabi/armv7r_hard_vfpv3_d16_unaligned{{$}} +# VFPV3-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -marm -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3 %s +# VFPV3: arm-none-eabi/armv7r_hard_vfpv3_d16{{$}} # VFPV3-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s +# SOFT-VFPV3-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7r_soft_vfpv3xd_exn_rtti_unaligned{{$}} +# SOFT-VFPV3-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI %s +# SOFT-VFPV3-EXN-RTTI: arm-none-eabi/armv7r_soft_vfpv3xd_exn_rtti{{$}} +# SOFT-VFPV3-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp -fno-exceptions -fno-rtti | FileCheck --check-prefix=SOFT-VFPV3-UNALIGNED %s +# SOFT-VFPV3-UNALIGNED: arm-none-eabi/armv7r_soft_vfpv3xd_unaligned{{$}} +# SOFT-VFPV3-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -marm -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3-d16 -mthumb -mfloat-abi=softfp -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=SOFT-VFPV3 %s +# SOFT-VFPV3: arm-none-eabi/armv7r_soft_vfpv3xd{{$}} +# SOFT-VFPV3-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd | FileCheck --check-prefix=VFPV3XD-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -marm | FileCheck --check-prefix=VFPV3XD-EXN-RTTI-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -mthumb | FileCheck --check-prefix=VFPV3XD-EXN-RTTI-UNALIGNED %s +# VFPV3XD-EXN-RTTI-UNALIGNED: arm-none-eabi/armv7r_hard_vfpv3xd_exn_rtti_unaligned{{$}} +# VFPV3XD-EXN-RTTI-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -mno-unaligned-access | FileCheck --check-prefix=VFPV3XD-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -marm -mno-unaligned-access | FileCheck --check-prefix=VFPV3XD-EXN-RTTI %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3XD-EXN-RTTI %s +# VFPV3XD-EXN-RTTI: arm-none-eabi/armv7r_hard_vfpv3xd_exn_rtti{{$}} +# VFPV3XD-EXN-RTTI-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti | FileCheck --check-prefix=VFPV3XD-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti -marm | FileCheck --check-prefix=VFPV3XD-UNALIGNED %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti -mthumb | FileCheck --check-prefix=VFPV3XD-UNALIGNED %s +# VFPV3XD-UNALIGNED: arm-none-eabi/armv7r_hard_vfpv3xd_unaligned{{$}} +# VFPV3XD-UNALIGNED-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti -marm -mno-unaligned-access | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=armv7r-none-eabihf -mfpu=vfpv3xd -fno-exceptions -fno-rtti -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3XD %s +# VFPV3XD: arm-none-eabi/armv7r_hard_vfpv3xd{{$}} +# VFPV3XD-EMPTY: diff --git a/test/multilib/armv8.1m.main.test b/test/multilib/armv8.1m.main.test index b49d2380..7f53604a 100644 --- a/test/multilib/armv8.1m.main.test +++ b/test/multilib/armv8.1m.main.test @@ -20,12 +20,15 @@ # MVE: arm-none-eabi/armv8.1m.main_hard_nofp_mve_exn_rtti{{$}} # MVE-EMPTY: -# TODO: We need to find a way to make this fail. For now it fallbacks to -# arm-none-eabi/armv8.1m.main_soft_nofp, which will not initilize the -# coprocessor nor will save/restore its registers in setjmp/longjmp. -# DONT-RUN-YET: %clang -print-multi-directory --target=armv8.1m.main-none-eabi -march=armv8.1m.main+mve -mfpu=none | FileCheck --check-prefix=SOFTFP_MVE %s -# SOFTFP_MVE: ? -# SOFTFP_MVE-EMPTY: +## This combination is not supported at all, because we don't provide any +## MVE libraries with the soft-float ABI, and we can't fall back to Armv7-M +## soft-float libraries because they won't initialize the FPSCR correctly +## for MVE, or save and restore the vector registers in setjmp/longjmp. +## So we expect this to fail, with a custom error message. +# RUN: not %clang -print-multi-directory --target=armv8.1m.main-none-eabi -march=armv8.1m.main+mve -mfpu=none 2>%t | FileCheck --check-prefix=SOFTFP_MVE --allow-empty %s +# RUN: FileCheck --check-prefix=SOFTFP_MVE_ERR %s < %t +# SOFTFP_MVE-NOT: arm-none-eabi +# SOFTFP_MVE_ERR: clang: error: multilib configuration error: No library available for MVE with soft-float ABI. Try -mfloat-abi=hard. # RUN: %clang -print-multi-flags-experimental --target=arm-none-eabihf -mcpu=cortex-m55 | FileCheck --check-prefix=CORTEXM55 %s # CORTEXM55: -march=thumbv8.1m.main+fp16 diff --git a/test/multilib/armv8a.test b/test/multilib/armv8a.test new file mode 100644 index 00000000..c4b8b1e3 --- /dev/null +++ b/test/multilib/armv8a.test @@ -0,0 +1,25 @@ +# RUN: %clang -print-multi-directory --target=armv8a-none-eabi -mfpu=none | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabi -mfpu=none -marm | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabi -mfpu=none -mthumb | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabi -mfpu=none -march=armv9.5-a | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabi -mfpu=none -march=armv8.2-a+fp16 | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabi -mfpu=none -march=armv8.5-a+nodotprod | FileCheck %s +# CHECK: arm-none-eabi/armv7a_soft_nofp_exn_rtti_unaligned{{$}} +# CHECK-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=neon-vfpv3 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv3 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv3-d16-fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv3-fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv4-d16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv4 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=neon-fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=neon-vfpv4 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv3-d16 -marm | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=vfpv3-d16 -mthumb | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=fp-armv8 -march=armv9.5-a | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=fp-armv8 -march=armv8.2-a+fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8a-none-eabihf -mfpu=fp-armv8 -march=armv8.5-a+nodotprod | FileCheck --check-prefix=VFPV3 %s +# VFPV3: arm-none-eabi/armv7a_hard_vfpv3_d16_exn_rtti_unaligned{{$}} +# VFPV3-EMPTY: diff --git a/test/multilib/armv8m.main.test b/test/multilib/armv8m.main.test index 053c86c4..682570b3 100644 --- a/test/multilib/armv8m.main.test +++ b/test/multilib/armv8m.main.test @@ -8,5 +8,5 @@ # Fallback to armv7m # RUN: %clang -print-multi-directory --target=armv8m.main-none-eabi -mfpu=fpv5-sp-d16 | FileCheck --check-prefix=SOFTFP %s -# SOFTFP: arm-none-eabi/armv7m_soft_fpv4_sp_d16_exn_rtti{{$}} +# SOFTFP: arm-none-eabi/armv7m_soft_fpv4_sp_d16_exn_rtti_unaligned{{$}} # SOFTFP-EMPTY: diff --git a/test/multilib/armv8r.test b/test/multilib/armv8r.test new file mode 100644 index 00000000..17ed4e7c --- /dev/null +++ b/test/multilib/armv8r.test @@ -0,0 +1,43 @@ +# RUN: %clang -print-multi-directory --target=armv8r-none-eabi -mfpu=none | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabi -mfpu=none -marm | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabi -mfpu=none -mthumb | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabi -mfpu=none -march=armv8-r+ras | FileCheck %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabi -mfpu=none -mcpu=cortex-r52 | FileCheck %s +# CHECK: arm-none-eabi/armv7r_soft_nofp_exn_rtti_unaligned{{$}} +# CHECK-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv8r-none-eabi | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabi -march=armv8-r | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -mfloat-abi=softfp -march=armv8-r | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabi -march=armv8-r -marm | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabi -march=armv8-r -mthumb | FileCheck --check-prefix=SOFT-VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabi -march=armv8-r -mfpu=fpv5-d16 | FileCheck --check-prefix=SOFT-VFPV3 %s +# SOFT-VFPV3: arm-none-eabi/armv7r_soft_vfpv3xd_exn_rtti_unaligned{{$}} +# SOFT-VFPV3-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=neon-vfpv3 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv3 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv3-d16-fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv3-fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv4-d16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv4 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=neon-fp16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=neon-vfpv4 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv3-d16 -marm | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mfpu=vfpv3-d16 -mthumb | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf -mcpu=cortex-r52 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r -mfpu=fpv5-d16 | FileCheck --check-prefix=VFPV3 %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r -mfpu=fp-armv8 | FileCheck --check-prefix=VFPV3 %s +# VFPV3: arm-none-eabi/armv7r_hard_vfpv3_d16_exn_rtti_unaligned{{$}} +# VFPV3-EMPTY: + +# RUN: %clang -print-multi-directory --target=armv8r-none-eabihf | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r -marm | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r -mthumb | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r -mfpu=fpv4-sp-d16 | FileCheck --check-prefix=VFPV3XD %s +# RUN: %clang -print-multi-directory --target=arm-none-eabihf -march=armv8-r -mfpu=fpv5-sp-d16 | FileCheck --check-prefix=VFPV3XD %s +# VFPV3XD: arm-none-eabi/armv7r_hard_vfpv3xd_exn_rtti_unaligned{{$}} +# VFPV3XD-EMPTY: diff --git a/versions.json b/versions.json index 95b25230..341b38d6 100644 --- a/versions.json +++ b/versions.json @@ -12,12 +12,12 @@ "tag": "main" }, "picolibc": { - "tagType": "branch", - "tag": "main" + "tagType": "commithash", + "tag": "be1b69f5f5910d216c16f9fca927c1bdb4d38a51" }, "newlib": { "tagType": "tag", - "tag": "newlib-4.1.0" + "tag": "newlib-4.5.0" } } }