From 385392349a6b7647a155e3743a6fb35e61dc4d3c Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 6 Jan 2021 20:30:40 -0500 Subject: [PATCH] Fixes for Apple Silicon - Use -stdlib++-isystem for atdna - Remove unnecessary constexpr from simd_neon --- atdna/atdnaConfig.cmake.in | 4 ++-- atdna/atdnaHelpers.cmake | 4 ++-- atdna/main.cpp | 2 ++ include/athena/simd/simd_neon.hpp | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/atdna/atdnaConfig.cmake.in b/atdna/atdnaConfig.cmake.in index 1e77791..3d87e20 100644 --- a/atdna/atdnaConfig.cmake.in +++ b/atdna/atdnaConfig.cmake.in @@ -57,8 +57,8 @@ function(atdna out) message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set") endif() list(APPEND extraargs - -I ${COMPILER_DIR}/../include/c++/v1 - -isysroot ${CMAKE_OSX_SYSROOT}) + -isysroot ${CMAKE_OSX_SYSROOT} + -stdlib++-isystem "${COMPILER_DIR}/../include/c++/v1") endif() # Make target diff --git a/atdna/atdnaHelpers.cmake b/atdna/atdnaHelpers.cmake index e4cab12..0b27396 100644 --- a/atdna/atdnaHelpers.cmake +++ b/atdna/atdnaHelpers.cmake @@ -108,8 +108,8 @@ function(atdna out incdirs cdefs) message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set") endif() list(APPEND extraargs - -I ${COMPILER_DIR}/../include/c++/v1 - -isysroot ${CMAKE_OSX_SYSROOT}) + -isysroot ${CMAKE_OSX_SYSROOT} + -stdlib++-isystem "${COMPILER_DIR}/../include/c++/v1") endif() # Make target diff --git a/atdna/main.cpp b/atdna/main.cpp index eec04f5..c0c04a9 100644 --- a/atdna/main.cpp +++ b/atdna/main.cpp @@ -51,6 +51,8 @@ static llvm::cl::list IncludeSearchPaths("I", llvm::cl::desc("Heade static llvm::cl::list SystemIncludeSearchPaths("isystem", llvm::cl::desc("System Header search path")); +static llvm::cl::list StandardCXXLibISystem("stdlib++-isystem", llvm::cl::desc("Standard C++ library search path")); + static llvm::cl::opt StandardCXXLib("stdlib", llvm::cl::desc("Standard C++ library")); static llvm::cl::opt DepFile("MD", llvm::cl::desc("Make Dependency file")); diff --git a/include/athena/simd/simd_neon.hpp b/include/athena/simd/simd_neon.hpp index 75dd80c..93cd04d 100644 --- a/include/athena/simd/simd_neon.hpp +++ b/include/athena/simd/simd_neon.hpp @@ -18,7 +18,7 @@ class __simd_storage { public: using storage_type = float32x4_t; storage_type __storage_{}; - [[nodiscard]] constexpr float __get(size_t __index) const noexcept { return __storage_[__index]; } + [[nodiscard]] float __get(size_t __index) const noexcept { return __storage_[__index]; } inline void __set(size_t __index, float __val) noexcept { __storage_[__index] = __val; } constexpr __simd_storage(float a, float b, float c, float d) : __storage_{a, b, c, d} {} constexpr void __set4(float a, float b, float c, float d) noexcept { __storage_ = storage_type{a, b, c, d}; }