Fixes for Apple Silicon

- Use -stdlib++-isystem for atdna
- Remove unnecessary constexpr from simd_neon
This commit is contained in:
Luke Street 2021-01-06 20:30:40 -05:00
parent 04cbd546b7
commit 385392349a
4 changed files with 7 additions and 5 deletions

View File

@ -57,8 +57,8 @@ function(atdna out)
message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set") message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set")
endif() endif()
list(APPEND extraargs 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() endif()
# Make target # Make target

View File

@ -108,8 +108,8 @@ function(atdna out incdirs cdefs)
message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set") message(FATAL_ERROR "CMAKE_OSX_SYSROOT not set")
endif() endif()
list(APPEND extraargs 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() endif()
# Make target # Make target

View File

@ -51,6 +51,8 @@ static llvm::cl::list<std::string> IncludeSearchPaths("I", llvm::cl::desc("Heade
static llvm::cl::list<std::string> SystemIncludeSearchPaths("isystem", llvm::cl::desc("System Header search path")); static llvm::cl::list<std::string> SystemIncludeSearchPaths("isystem", llvm::cl::desc("System Header search path"));
static llvm::cl::list<std::string> StandardCXXLibISystem("stdlib++-isystem", llvm::cl::desc("Standard C++ library search path"));
static llvm::cl::opt<std::string> StandardCXXLib("stdlib", llvm::cl::desc("Standard C++ library")); static llvm::cl::opt<std::string> StandardCXXLib("stdlib", llvm::cl::desc("Standard C++ library"));
static llvm::cl::opt<bool> DepFile("MD", llvm::cl::desc("Make Dependency file")); static llvm::cl::opt<bool> DepFile("MD", llvm::cl::desc("Make Dependency file"));

View File

@ -18,7 +18,7 @@ class __simd_storage<float, m128_abi> {
public: public:
using storage_type = float32x4_t; using storage_type = float32x4_t;
storage_type __storage_{}; 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; } 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 __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}; } constexpr void __set4(float a, float b, float c, float d) noexcept { __storage_ = storage_type{a, b, c, d}; }