Skip to content

Commit

Permalink
build(crypto): make valgrind flag compatible with secp256k1-zkp
Browse files Browse the repository at this point in the history
  • Loading branch information
onvej-sl committed Nov 17, 2021
1 parent 36077ce commit dc78566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ ZKP_PATH = ../vendor/secp256k1-zkp
CFLAGS += -DSECP256K1_CONTEXT_SIZE=208

VALGRIND ?= 1
ifeq ($(VALGRIND),1)
CFLAGS += -DVALGRIND
endif

CFLAGS += -I.
CFLAGS += -I..
CFLAGS += -DVALGRIND=$(VALGRIND)
CFLAGS += -DUSE_ETHEREUM=1
CFLAGS += -DUSE_GRAPHENE=1
CFLAGS += -DUSE_KECCAK=1
Expand Down
4 changes: 2 additions & 2 deletions crypto/tests/test_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "check_mem.h"

#if VALGRIND
#ifdef VALGRIND
#include <valgrind/memcheck.h>
#include <valgrind/valgrind.h>
#endif
Expand Down Expand Up @@ -77,7 +77,7 @@
#include "zkp_context.h"
#include "zkp_ecdsa.h"

#if VALGRIND
#ifdef VALGRIND
/*
* This is a clever trick to make Valgrind's Memcheck verify code
* is constant-time with respect to secret data.
Expand Down

0 comments on commit dc78566

Please sign in to comment.