chia-plotter
chia-plotter copied to clipboard
Modifications necessary to compile with clang/llvm on Linux
To compile with clang on Linux a few small changes are necessary.
- Add the following to the
make_devel.shor similar build script beforecmakefor compilers like clang to work on Linux:
export LDFLAGS="-lstdc++ -lm"
To build with clang instead of gcc, people should set these before running the make script:
export CC=clang
export CXX=clang
export LD=ld.lld
That is sufficient for it to compile with clang 10 such as Ubuntu 20.04 has available as a package.
- For a recent version of clang (I used clang 13), the lib/libbech32 submodule needs a tweak to fix it's copy of googletest for https://github.com/dcdpr/libbech32/issues/9 by removing
-Werrorfrom thelib/libbech32/test/googletest/googletest/cmake/internal_utils.cmakefile.
(Clang 10 and 13 produces a reliably 3% faster binary than Ubuntu 20.04's gcc 9.3 on my zen3.)