Skip to content

Makefile: parse TENDERMINT_BUILD_OPTIONS#4738

Merged
alessio merged 6 commits intomasterfrom
alessio/build-options
Apr 25, 2020
Merged

Makefile: parse TENDERMINT_BUILD_OPTIONS#4738
alessio merged 6 commits intomasterfrom
alessio/build-options

Conversation

@alessio
Copy link
Contributor

@alessio alessio commented Apr 24, 2020

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


For contributor use:

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer
  • Applied Appropriate Labels

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
@alessio alessio force-pushed the alessio/build-options branch from 70276e2 to 56f440e Compare April 24, 2020 22:20
@alessio alessio marked this pull request as ready for review April 24, 2020 22:25
@alessio alessio requested a review from tessr as a code owner April 24, 2020 22:25
@erikgrinaker
Copy link
Contributor

I like it! 👍 Do we need to update any scripts or documentation or anything?

Copy link
Contributor

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!!

could we just add a few sentences here https://docs.tendermint.com/master/introduction/install.html#compile

@codecov-io
Copy link

Codecov Report

Merging #4738 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4738      +/-   ##
==========================================
- Coverage   64.52%   64.51%   -0.01%     
==========================================
  Files         228      228              
  Lines       20696    20696              
==========================================
- Hits        13354    13353       -1     
  Misses       6257     6257              
- Partials     1085     1086       +1     
Impacted Files Coverage Δ
privval/signer_server.go 91.30% <0.00%> (-8.70%) ⬇️
blockchain/v2/reactor.go 36.06% <0.00%> (-3.28%) ⬇️
p2p/pex/pex_reactor.go 82.17% <0.00%> (-0.56%) ⬇️
blockchain/v0/pool.go 78.66% <0.00%> (-0.32%) ⬇️
blockchain/v0/reactor.go 73.91% <0.00%> (ø)
privval/signer_endpoint.go 81.08% <0.00%> (ø)
consensus/state.go 74.85% <0.00%> (+0.19%) ⬆️
consensus/reactor.go 78.34% <0.00%> (+0.69%) ⬆️
consensus/replay.go 73.64% <0.00%> (+0.77%) ⬆️
privval/signer_listener_endpoint.go 89.13% <0.00%> (+4.34%) ⬆️

@alessio
Copy link
Contributor Author

alessio commented Apr 25, 2020

@erikgrinaker

I like it! +1 Do we need to update any scripts or documentation or anything?

I'm taking a look at docker files, etc. Expect few additional commits (and a CHANGELOG entry, I guess it might be worth it)

@alessio
Copy link
Contributor Author

alessio commented Apr 25, 2020

Alright, I've updated docs and CHANGELOG_PENDING.md. Wrt CONTRIBUTING.md, I'm not sure about what the next version is going be, so I didn't update it.

@erikgrinaker @marbar3778

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff, LGTM!

@alessio alessio merged commit 8c6d1e6 into master Apr 25, 2020
@alessio alessio deleted the alessio/build-options branch April 25, 2020 18:17
@melekes
Copy link
Contributor

melekes commented Apr 27, 2020

tACK

erikgrinaker pushed a commit that referenced this pull request May 26, 2020
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.
erikgrinaker added a commit that referenced this pull request May 26, 2020
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.

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
tessr pushed a commit that referenced this pull request May 28, 2020
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.

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
@tessr tessr added the R:minor Release: Minor label May 28, 2020
alessio pushed a commit to cosmos/cosmos-sdk that referenced this pull request Jul 7, 2020
Look for build options in the make's COSMOS_BUILD_OPTIONS
variable. This allows one to build simd with ledger support.

References:
* cosmos/gaia#363
* tendermint/tendermint#4738
alessio pushed a commit to cosmos/cosmos-sdk that referenced this pull request Jul 7, 2020
Makefile: parse COSMOS_BUILD_OPTIONS

Look for build options in the make's COSMOS_BUILD_OPTIONS
variable. This allows one to build simd with ledger support.

References:
* cosmos/gaia#363
* tendermint/tendermint#4738

fix tiny typo in nolint: statement that causes golangci-lint to
misbehave.
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this pull request May 5, 2021
Makefile: parse COSMOS_BUILD_OPTIONS

Look for build options in the make's COSMOS_BUILD_OPTIONS
variable. This allows one to build simd with ledger support.

References:
* cosmos/gaia#363
* tendermint/tendermint#4738

fix tiny typo in nolint: statement that causes golangci-lint to
misbehave.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R:minor Release: Minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants