mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-16 20:26:12 +00:00
Makefile: parse TENDERMINT_BUILD_OPTIONS (#4738)
Reduce the number of targets and make the buildsystem more flexible by parsing the TENDERMINT_BUILD_OPTIONS command line variable (a-la Debian, inspired by dpkg-buildpackage's DEB_BUILD_OPTIONS), e.g: $ make install TENDERMINT_BUILD_OPTIONS='cleveldb' replaces the old: $ make install_c Options can be mix&match'd, e.g.: $ make install TENDERMINT_BUILD_OPTIONS='cleveldb race nostrip' Three options are available: - nostrip: don't strip debugging symbols nor DWARF tables. - cleveldb: use cleveldb as db backend instead of goleveldb; it switches on the CGO_ENABLED Go environment variale. - race: pass -race to go build and enable data race detection. This changeset is a port of gaia pull request: cosmos/gaia#363.
This commit is contained in:
@@ -119,13 +119,13 @@ db_backend = "cleveldb"
|
||||
To install Tendermint, run:
|
||||
|
||||
```
|
||||
CGO_LDFLAGS="-lsnappy" make install_c
|
||||
CGO_LDFLAGS="-lsnappy" make install TENDERMINT_BUILD_OPTIONS=cleveldb
|
||||
```
|
||||
|
||||
or run:
|
||||
|
||||
```
|
||||
CGO_LDFLAGS="-lsnappy" make build_c
|
||||
CGO_LDFLAGS="-lsnappy" make build TENDERMINT_BUILD_OPTIONS=cleveldb
|
||||
```
|
||||
|
||||
which puts the binary in `./build`.
|
||||
|
||||
@@ -10,7 +10,7 @@ By default, Tendermint uses the `syndtr/goleveldb` package for its in-process
|
||||
key-value database. Unfortunately, this implementation of LevelDB seems to suffer under heavy load (see
|
||||
[#226](https://github.com/syndtr/goleveldb/issues/226)). It may be best to
|
||||
install the real C-implementation of LevelDB and compile Tendermint to use
|
||||
that using `make build_c`. See the [install instructions](../introduction/install.md) for details.
|
||||
that using `make build TENDERMINT_BUILD_OPTIONS=cleveldb`. See the [install instructions](../introduction/install.md) for details.
|
||||
|
||||
Tendermint keeps multiple distinct databases in the `$TMROOT/data`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user