From 2fbb79fdf24c7145fd7dd0a0d9d23736e85458db Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 1 Mar 2021 20:23:52 +0000 Subject: [PATCH] externals: Build vixl --- externals/CMakeLists.txt | 4 +++ externals/README.md | 3 ++ externals/vixl/CMakeLists.txt | 52 +++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 externals/vixl/CMakeLists.txt diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 2fb4f1ea..3fb20a51 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -25,6 +25,10 @@ add_library(robin_map INTERFACE) add_library(tsl::robin_map ALIAS robin_map) target_include_directories(robin_map SYSTEM INTERFACE "$") +# vixl + +add_subdirectory(vixl) + # xbyak if (NOT TARGET xbyak) diff --git a/externals/README.md b/externals/README.md index 78d9cd57..c1caca55 100644 --- a/externals/README.md +++ b/externals/README.md @@ -6,6 +6,7 @@ This repository uses subtrees to manage some of its externals. git remote add externals-fmt https://github.com/fmtlib/fmt.git --no-tags git remote add externals-mp https://github.com/MerryMage/mp.git --no-tags git remote add externals-robin-map https://github.com/Tessil/robin-map.git --no-tags +git remote add externals-vixl https://git.linaro.org/arm/vixl.git --no-tags git remote add externals-xbyak https://github.com/herumi/xbyak.git --no-tags ``` @@ -17,9 +18,11 @@ Change `` to refer to the appropriate git reference. git fetch externals-fmt git fetch externals-mp git fetch externals-robin-map +git fetch externals-vixl git fetch externals-xbyak git subtree pull --squash --prefix=externals/fmt externals-fmt git subtree pull --squash --prefix=externals/mp externals-mp git subtree pull --squash --prefix=externals/robin-map externals-robin-map +git subtree pull --squash --prefix=externals/vixl/vixl externals-vixl git subtree pull --squash --prefix=externals/xbyak externals-xbyak ``` diff --git a/externals/vixl/CMakeLists.txt b/externals/vixl/CMakeLists.txt new file mode 100644 index 00000000..0cc5a15b --- /dev/null +++ b/externals/vixl/CMakeLists.txt @@ -0,0 +1,52 @@ +add_library(vixl + vixl/src/aarch64/abi-aarch64.h + vixl/src/aarch64/assembler-aarch64.cc + vixl/src/aarch64/assembler-aarch64.h + vixl/src/aarch64/constants-aarch64.h + vixl/src/aarch64/cpu-aarch64.cc + vixl/src/aarch64/cpu-aarch64.h + vixl/src/aarch64/cpu-features-auditor-aarch64.cc + vixl/src/aarch64/cpu-features-auditor-aarch64.h + vixl/src/aarch64/decoder-aarch64.cc + vixl/src/aarch64/decoder-aarch64.h + vixl/src/aarch64/decoder-constants-aarch64.h + vixl/src/aarch64/disasm-aarch64.cc + vixl/src/aarch64/disasm-aarch64.h + vixl/src/aarch64/instructions-aarch64.cc + vixl/src/aarch64/instructions-aarch64.h + vixl/src/aarch64/logic-aarch64.cc + vixl/src/aarch64/macro-assembler-aarch64.cc + vixl/src/aarch64/macro-assembler-aarch64.h + vixl/src/aarch64/operands-aarch64.cc + vixl/src/aarch64/operands-aarch64.h + vixl/src/aarch64/pointer-auth-aarch64.cc + vixl/src/aarch64/simulator-aarch64.cc + vixl/src/aarch64/simulator-aarch64.h + vixl/src/aarch64/simulator-constants-aarch64.h + vixl/src/assembler-base-vixl.h + vixl/src/code-buffer-vixl.cc + vixl/src/code-buffer-vixl.h + vixl/src/code-generation-scopes-vixl.h + vixl/src/compiler-intrinsics-vixl.cc + vixl/src/compiler-intrinsics-vixl.h + vixl/src/cpu-features.cc + vixl/src/cpu-features.h + vixl/src/globals-vixl.h + vixl/src/invalset-vixl.h + vixl/src/macro-assembler-interface.h + vixl/src/platform-vixl.h + vixl/src/pool-manager-impl.h + vixl/src/pool-manager.h + vixl/src/utils-vixl.cc + vixl/src/utils-vixl.h +) +target_include_directories(vixl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vixl/src) +target_compile_definitions(vixl PUBLIC VIXL_INCLUDE_TARGET_AARCH64=1) +if (MSVC) + target_compile_options(vixl PUBLIC /Zc:__cplusplus) +endif() +if (UNIX AND NOT APPLE) + target_compile_definitions(vixl PUBLIC VIXL_CODE_BUFFER_MMAP=1) +else() + target_compile_definitions(vixl PUBLIC VIXL_CODE_BUFFER_MALLOC=1) +endif()