mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
The target `build` creates a build directory with the same name and initializes through an invocation of CMake. Regardless of the success or failure of the CMake invocation, all subsequent invocations of the target do not invoke CMake anymore, as the target's prerequisites are satisfied through the existence of the build directory created upon the first invocation. This patch changes the dependencies to the build directory with an intermediate target that depends on a stamp file that is only created when the first CMake invocation in the build directory succeeds.
Building the compiler
Install MLIR following https://mlir.llvm.org/getting_started/ Use commit c2415d67a564
Install pybind11:
pip install pybind11
Build concrete library:
git clone https://github.com/zama-ai/concrete
cd concrete
git checkout feature/core_c_api
cd concrete-ffi
RUSTFLAGS="-C target-cpu=native" cargo build --release
Generate the compiler build system, in the build directory
export LLVM_PROJECT="PATH_TO_LLVM_PROJECT"
export CONCRETE_PROJECT="PATH_TO_CONCRETE_PROJECT"
make build
Build the compiler
make zamacompiler
Test the compiler
#TODO: let cmake set this PATH
export LD_LIBRARY_PATH="path_to_homomorphizer/compiler/build/lib/Runtime/"
make test
Run the compiler
./build/src/zamacompiler