From 9af0095a1691dbfc062485eec3fc48bb87ad8c95 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 17 Oct 2023 17:05:07 +0800 Subject: [PATCH] fix libtfhe load on mac --- Makefile | 4 ++++ fhevm/tfhe.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b988d25..2a2c042 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +TFHE_BUILD_DIR=${TFHE_RS_FOLDER}/target/release/ +CGO_CFLAGS="-I${TFHE_BUILD_DIR}" +CGO_LDFLAGS="-L${TFHE_BUILD_DIR}" + .PHONY: build build: build-tfhe-rs-capi cd fhevm && go build . diff --git a/fhevm/tfhe.go b/fhevm/tfhe.go index 1edc529..3eb6616 100644 --- a/fhevm/tfhe.go +++ b/fhevm/tfhe.go @@ -18,7 +18,7 @@ package fhevm /* #cgo CFLAGS: -O3 -I../tfhe-rs/target/release -#cgo LDFLAGS: -L../tfhe-rs/target/release -l:libtfhe.a -lm +#cgo LDFLAGS: -L../tfhe-rs/target/release -ltfhe -lm #include