chore(ffi): support ARM64 chips

This commit is contained in:
Luis Montero
2022-11-16 16:29:05 +01:00
committed by Luis Montero
parent 76c58c6305
commit aad2a42634
3 changed files with 30 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
BUILD_TYPE?=Release
BUILD_DIR?=./build
Python3_EXECUTABLE?=python3
Python3_EXECUTABLE?=$(shell which python3)
BINDINGS_PYTHON_ENABLED=ON
DATAFLOW_EXECUTION_ENABLED=OFF
TIMING_ENABLED=OFF
@@ -22,12 +22,23 @@ HPX_LOCAL_DIR=$(shell pwd)/hpx-$(HPX_VERSION)
HPX_INSTALL_DIR?=$(HPX_LOCAL_DIR)/build
CONCRETE_CORE_FFI_VERSION?=0.2.0
OS=undefined
ifeq ($(shell uname), Linux)
CONCRETE_CORE_FFI_TARBALL=concrete-core-ffi_$(CONCRETE_CORE_FFI_VERSION)_linux_amd64.tar.gz
else
CONCRETE_CORE_FFI_TARBALL=concrete-core-ffi_$(CONCRETE_CORE_FFI_VERSION)_darwin_amd64.tar.gz
OS=linux
else ifeq ($(shell uname), Darwin)
OS=darwin
endif
ARCHITECTURE=undefined
ifeq ($(shell uname -m), arm64)
ARCHITECTURE=aarch64
else
ARCHITECTURE=amd64
endif
CONCRETE_CORE_FFI_TARBALL=concrete-core-ffi_$(CONCRETE_CORE_FFI_VERSION)_$(OS)_$(ARCHITECTURE).tar.gz
export PATH := $(abspath $(BUILD_DIR))/bin:$(PATH)
ifeq ($(shell which ccache),)

View File

@@ -120,6 +120,8 @@ pybind11 is required to build the python package, you can install it in your cur
$ pip install pybind11
```
To specify which python executable to target you can specify the `Python3_EXECUTABLE` environment variable.
#### Build wheels in your environment
Building the wheels is actually simple.

View File

@@ -12,13 +12,25 @@
SeederBuilder *get_best_seeder() {
SeederBuilder *builder = NULL;
#if defined(__x86_64__) || defined(_M_X64)
bool rdseed_seeder_available = false;
CAPI_ASSERT_ERROR(rdseed_seeder_is_available(&rdseed_seeder_available));
if (rdseed_seeder_available) {
CAPI_ASSERT_ERROR(get_rdseed_seeder_builder(&builder));
return builder;
}
#endif
#if __APPLE__
bool apple_seeder_available = false;
CAPI_ASSERT_ERROR(
apple_secure_enclave_seeder_is_available(&apple_seeder_available));
if (apple_seeder_available) {
CAPI_ASSERT_ERROR(get_apple_secure_enclave_seeder_builder(&builder));
return builder;
}
#endif
bool unix_seeder_available = false;
CAPI_ASSERT_ERROR(unix_seeder_is_available(&unix_seeder_available));