Install bitcoin from source - were
Install bitcoin from source - excellent
You can run to see all the various configuration options. It's a long list, so it may be more practical to search for what you want with grep:
If you're re-compiling frequently (e.g. for testing small changes), as long as you're not changing the build configuration you can skip directly to the step for subsequent builds.
On the other hand, when you change the build configuration (e.g. for a fuzz build), or you are building a branch containing substantial changes to the autoconf/automake scripts, or when the build isn't working, it's often best to start with a clean slate using or . Here's a complete example:
To compile with Clang instead of GCC (e.g. for fuzzing, sanitizers, better warnings/errors, or to use less resources), add to your configure flags:
To compile for fuzz testing, build with Clang using the following:
Be sure to use to speed up your builds. You can also gain time by building only what you need. See the Bitcoin Core productivity notes for more.
If you build often, bash aliases may be helpful for abstracting the repetitive details down to short commands. These are probably not a great example, but here are mine.
-