From 8aee5dd5c359875fa51c9cbc203e1b5bbcf6a368 Mon Sep 17 00:00:00 2001 From: youben11 Date: Fri, 27 Aug 2021 13:50:28 +0100 Subject: [PATCH] chore(runtime): link concrete statically with runtime lib --- compiler/CMakeLists.txt | 4 ++-- compiler/lib/Runtime/CMakeLists.txt | 4 +++- compiler/lib/Support/CMakeLists.txt | 2 +- compiler/python/CMakeLists.txt | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt index a4bfd71e4..bff0c39e8 100644 --- a/compiler/CMakeLists.txt +++ b/compiler/CMakeLists.txt @@ -30,8 +30,8 @@ add_definitions(${LLVM_DEFINITIONS}) # Concrete FFI Configuration #------------------------------------------------------------------------------- include_directories(${CONCRETE_FFI_RELEASE}) -add_library(Concrete SHARED IMPORTED) -set_target_properties(Concrete PROPERTIES IMPORTED_LOCATION ${CONCRETE_FFI_RELEASE}/libconcrete_ffi.so ) +add_library(Concrete STATIC IMPORTED) +set_target_properties(Concrete PROPERTIES IMPORTED_LOCATION ${CONCRETE_FFI_RELEASE}/libconcrete_ffi.a ) #------------------------------------------------------------------------------- # Python Configuration diff --git a/compiler/lib/Runtime/CMakeLists.txt b/compiler/lib/Runtime/CMakeLists.txt index 693dae055..973a9a48c 100644 --- a/compiler/lib/Runtime/CMakeLists.txt +++ b/compiler/lib/Runtime/CMakeLists.txt @@ -1,4 +1,6 @@ add_library(ZamalangRuntime SHARED context.c wrappers.c -) \ No newline at end of file +) + +target_link_libraries(ZamalangRuntime Concrete) \ No newline at end of file diff --git a/compiler/lib/Support/CMakeLists.txt b/compiler/lib/Support/CMakeLists.txt index 42b8e2ee9..1f69d329b 100644 --- a/compiler/lib/Support/CMakeLists.txt +++ b/compiler/lib/Support/CMakeLists.txt @@ -19,5 +19,5 @@ add_mlir_library(ZamalangSupport MLIRExecutionEngine ${LLVM_PTHREAD_LIB} - Concrete + ZamalangRuntime ) diff --git a/compiler/python/CMakeLists.txt b/compiler/python/CMakeLists.txt index ab7e6b263..4c0ae9a39 100644 --- a/compiler/python/CMakeLists.txt +++ b/compiler/python/CMakeLists.txt @@ -18,7 +18,7 @@ add_mlir_python_extension(ZamalangBindingsPythonExtension _zamalang LowLFHEDialect MidLFHEDialect HLFHEDialect - Concrete + ZamalangRuntime ) add_dependencies(ZamalangBindingsPython ZamalangBindingsPythonExtension)