Skip to content

Commit 211f1dc

Browse files
authored
Merge pull request #26 from hax0kartik/main
Allow targeting specific commit/tags of dependencies during compilation
2 parents 3399d94 + 5c46ec2 commit 211f1dc

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ifeq ($(UNAME_S),Darwin)
1010
LDFLAGS += -framework CoreFoundation -Wl,-ld_classic
1111
endif
1212

13-
bitcoinfuzz: $(OBJS) cargo go
13+
bitcoinfuzz: set $(OBJS) cargo go
1414
$(CXX) fuzzer.cpp -o $@ $(OBJS) $(CXXFLAGS) $(LDFLAGS)
1515

1616
$(OBJS) : build/%.o: %.cpp
@@ -31,3 +31,7 @@ go:
3131
clean:
3232
rm -f bitcoinfuzz $(OBJS) btcd_lib/libbtcd_wrapper.*
3333
rm -Rdf rust_bitcoin_lib/target
34+
35+
set:
36+
@$(if $(strip $(BTCD)), cd dependencies/btcd && git fetch origin master && git checkout $(BTCD))
37+
@$(if $(strip $(RUST_BITCOIN)), cd dependencies/rust-bitcoin && git fetch origin master && git checkout $(RUST_BITCOIN))

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ Now, you can build the project by running:
2424
make
2525
```
2626

27+
It is also possible to target a specific commit or tag of the dependencies during compilation:
28+
29+
```bash
30+
make BTCD=v0.24.0 RUST_BITCOIN=aedb097
31+
```
32+
2733
Once the compilation is complete bitcoinfuzz can be executed by:
2834

2935
```bash
@@ -35,5 +41,5 @@ FUZZ=target_name ./bitcoinfuzz
3541

3642
- sipa/miniscript: https://github.com/sipa/miniscript/issues/140
3743
- rust-miniscript: https://github.com/rust-bitcoin/rust-miniscript/issues/633
38-
- rust-bitcoin: https://github.com/rust-bitcoin/rust-bitcoin/issues/268
44+
- rust-bitcoin: https://github.com/rust-bitcoin/rust-bitcoin/issues/2681
3945
- btcd: https://github.com/btcsuite/btcd/issues/2195

0 commit comments

Comments
 (0)