mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-04-04 18:03:17 +00:00
Add static linking to witness generator.
This commit is contained in:
parent
8e3ed28ecf
commit
cd86f86a39
18
.github/resources/witness-generator/linux.Makefile
vendored
Normal file
18
.github/resources/witness-generator/linux.Makefile
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
CC=g++
|
||||
CFLAGS=-std=c++11 -O3 -I.
|
||||
LDFLAGS = -lgmp -static
|
||||
|
||||
DEPS_HPP = circom.hpp calcwit.hpp fr.hpp pol.cpp
|
||||
DEPS_O = main.o calcwit.o fr.o pol.o
|
||||
|
||||
all: pol
|
||||
|
||||
%.o: %.cpp $(DEPS_HPP)
|
||||
$(CC) -Wno-address-of-packed-member -c $< $(CFLAGS) -o $@
|
||||
|
||||
pol: $(DEPS_O)
|
||||
$(CC) -o pol $(DEPS_O) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f *.o pol
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
CC = g++
|
||||
CFLAGS = -std=c++11 -O3 -I. -I/opt/homebrew/include -include gmp_patch.hpp
|
||||
LDFLAGS = -L/opt/homebrew/lib -lgmp
|
||||
CFLAGS = -std=c++11 -O3 -I. -I/opt/homebrew/include -include gmp_patch.hpp -Wno-address-of-packed-member
|
||||
LDFLAGS = -Wl,-search_paths_first -Wl,-dead_strip -L/opt/homebrew/lib
|
||||
LDLIBS = /opt/homebrew/lib/libgmp.a
|
||||
|
||||
DEPS_HPP = circom.hpp calcwit.hpp fr.hpp pol.cpp
|
||||
DEPS_O = main.o calcwit.o fr.o pol.o
|
||||
@ -8,10 +9,11 @@ DEPS_O = main.o calcwit.o fr.o pol.o
|
||||
all: pol
|
||||
|
||||
%.o: %.cpp $(DEPS_HPP)
|
||||
$(CC) -Wno-address-of-packed-member -c $< $(CFLAGS) -o $@
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
pol: $(DEPS_O)
|
||||
$(CC) -o pol $(DEPS_O) $(LDFLAGS)
|
||||
$(CC) -o $@ $(DEPS_O) $(LDFLAGS) $(LDLIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o pol
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
CC = g++
|
||||
CFLAGS = -std=c++11 -O3 -I. -I/include -Duint="unsigned int"
|
||||
LDFLAGS = -L/lib -lgmp -lmman
|
||||
LDFLAGS = -L/lib -lgmp -lmman -static
|
||||
|
||||
DEPS_HPP = circom.hpp calcwit.hpp fr.hpp pol.cpp
|
||||
DEPS_O = main.o calcwit.o fr.o pol.o
|
||||
|
||||
4
.github/workflows/build-circuits.yml
vendored
4
.github/workflows/build-circuits.yml
vendored
@ -94,6 +94,10 @@ jobs:
|
||||
working-directory: repo/circom_circuits/Mantle
|
||||
run: circom --c --r1cs --no_asm --O2 pol.circom
|
||||
|
||||
- name: Replace Witness Generator Makefile # TODO: Make a fork generate the appropriate Linux Makefile
|
||||
working-directory: repo
|
||||
run: cp .github/resources/witness-generator/${{ env.OS }}.Makefile circom_circuits/Mantle/pol_cpp/Makefile
|
||||
|
||||
- name: Compile Witness Generator
|
||||
working-directory: repo/circom_circuits/Mantle/pol_cpp
|
||||
run: make pol
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user