diff --git a/README.md b/README.md index 3264cbc0..7dd67362 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,14 @@ If you're running a timelord, the following tests are available, depending of wh Those tests will simulate the vdf_client and verify for correctness the produced proofs. +## Debug builds + +To build and install a debug build of the python module, run: + +```bash +python setup.py build_ext --debug install +``` + ## Contributing and workflow Contributions are welcome and more details are available in chia-blockchain's diff --git a/setup.py b/setup.py index e84f7fdc..143dafa1 100644 --- a/setup.py +++ b/setup.py @@ -130,6 +130,8 @@ def build_extension(self, ext): build_args += ["--", "/m"] else: cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] + cmake_args += ["-DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -fsanitize=undefined", + "-DCMAKE_LINKER_FLAGS_DEBUG=-fsanitize=address -fsanitize=undefined"] build_args += ["--", "-j", "6"] env = os.environ.copy() @@ -137,7 +139,7 @@ def build_extension(self, ext): env.get("CXXFLAGS", ""), self.distribution.get_version() ) subprocess.check_call(["cmake", ext.sourcedir] + cmake_args, env=env) - subprocess.check_call(["cmake", "--build", "."] + build_args) + subprocess.check_call(["cmake", "--build", "."] + build_args + ["--", "VERBOSE=1"]) class get_pybind_include(object):