3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-09 09:21:58 +00:00

misc: WITH_PYTHON -> YOSYS_ENABLE_PYTHON

For consistency.

Also trying a new thing: only rebuilding objects that use the pybind11 library. The idea is these are the only objects that include the Python/pybind headers and thus the only ones that depend on the Python ABI in any capacity, so other objects can be reused across wheel builds. This has the potential to cut down build times.
This commit is contained in:
Mohamed Gaber 2025-09-23 15:29:01 +03:00
parent dc88906c91
commit 447a6cb3f0
No known key found for this signature in database
12 changed files with 82 additions and 60 deletions

View file

@ -349,7 +349,7 @@ class PyosysWrapperGenerator(object):
cxx_std = os.getenv("CXX_STD", "c++17")
return ParserOptions(
preprocessor=make_gcc_preprocessor(
defines=["_YOSYS_", "WITH_PYTHON"],
defines=["_YOSYS_", "YOSYS_ENABLE_PYTHON"],
gcc_args=[preprocessor_bin, "-fsyntax-only", f"-std={cxx_std}"],
include_paths=[str(__yosys_root__), py_include, pybind11.get_include()],
),