Skip to content

Commit

Permalink
Merge pull request #16 from zama-ai/fix/static_linking
Browse files Browse the repository at this point in the history
Fix static linking on Mac
  • Loading branch information
david-zk authored Oct 20, 2023
2 parents e344e38 + a76ba47 commit b863ebb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ test: build-tfhe-rs-capi

.PHONY: build-tfhe-rs-capi
build-tfhe-rs-capi:
cd tfhe-rs && make build_c_api_experimental_deterministic_fft
cd tfhe-rs && make build_c_api_experimental_deterministic_fft \
&& cd target/release && rm -f *.dylib *.dll *.so

.PHONY: clean
clean:
Expand Down
6 changes: 4 additions & 2 deletions fhevm/tfhe.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
package fhevm

/*
#cgo CFLAGS: -O3 -I../tfhe-rs/target/release
#cgo LDFLAGS: -L../tfhe-rs/target/release -ltfhe -lm
#cgo linux CFLAGS: -O3 -I../tfhe-rs/target/release
#cgo linux LDFLAGS: -L../tfhe-rs/target/release -l:libtfhe.a -lm
#cgo darwin CFLAGS: -O3 -I../tfhe-rs/target/release
#cgo darwin LDFLAGS: -framework Security -L../tfhe-rs/target/release -ltfhe -lm
#include <tfhe.h>
Expand Down

0 comments on commit b863ebb

Please sign in to comment.