mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
fix(dfr): add runtime termination call on compiler main exit.
This commit is contained in:
committed by
Ayoub Benaissa
parent
27318ff29a
commit
337a9bb5c2
@@ -1,6 +1,7 @@
|
||||
add_library(ConcretelangRuntime SHARED
|
||||
context.cpp
|
||||
wrappers.cpp
|
||||
dfr_terminate.cpp
|
||||
)
|
||||
|
||||
if(CONCRETELANG_PARALLEL_EXECUTION_ENABLED)
|
||||
|
||||
@@ -344,7 +344,6 @@ int __wrap_main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**********************/
|
||||
/* Debug interface. */
|
||||
/**********************/
|
||||
|
||||
11
compiler/lib/Runtime/dfr_terminate.cpp
Normal file
11
compiler/lib/Runtime/dfr_terminate.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
// Part of the Concrete Compiler Project, under the BSD3 License with Zama
|
||||
// Exceptions. See
|
||||
// https://github.com/zama-ai/concrete-compiler-internal/blob/master/LICENSE.txt
|
||||
// for license information.
|
||||
|
||||
#ifndef CONCRETELANG_PARALLEL_EXECUTION_ENABLED
|
||||
|
||||
#include <concretelang/Runtime/runtime_api.h>
|
||||
void _dfr_terminate() {}
|
||||
|
||||
#endif
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "concretelang/Dialect/RT/IR/RTDialect.h"
|
||||
#include "concretelang/Dialect/TFHE/IR/TFHEDialect.h"
|
||||
#include "concretelang/Dialect/TFHE/IR/TFHETypes.h"
|
||||
#include "concretelang/Runtime/runtime_api.h"
|
||||
#include "concretelang/Support/Error.h"
|
||||
#include "concretelang/Support/JitCompilerEngine.h"
|
||||
#include "concretelang/Support/LLVMEmitFile.h"
|
||||
@@ -480,8 +481,10 @@ mlir::LogicalResult compilerMain(int argc, char **argv) {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int result = 0;
|
||||
if (mlir::failed(compilerMain(argc, argv)))
|
||||
return 1;
|
||||
result = 1;
|
||||
|
||||
return 0;
|
||||
_dfr_terminate();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user