diff options
-rw-r--r-- | build_scripts/main.py | 6 | ||||
-rw-r--r-- | build_scripts/options.py | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index 8c24ceb75..f1a151caa 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -683,10 +683,12 @@ class PysideBuild(_build, CommandMixin, BuildInfoCollectorMixin): elif OPTION["LIMITED_API"] == "no": cmake_cmd.append("-DFORCE_LIMITED_API=no") elif not OPTION["LIMITED_API"]: - pass + if sys.platform == 'win32' and self.debug: + cmake_cmd.append("-DFORCE_LIMITED_API=no") else: raise SetupError("option limited-api must be 'yes' or 'no' " - "(default yes if applicable, i.e. python version >= 3.7)") + "(default yes if applicable, i.e. Python " + "version >= 3.7 and release build if on Windows)") if OPTION["VERBOSE_BUILD"]: cmake_cmd.append("-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON") diff --git a/build_scripts/options.py b/build_scripts/options.py index 08a2f8b9f..b00f1a1b8 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -517,4 +517,9 @@ class CommandMixin(object): log.error("Option --jobs can only be used with jom on Windows.") return False + if sys.platform == 'win32' and OPTION["LIMITED_API"] and self.debug: + log.error("It is not possible to make a debug build of PySide6 with limited API. " + "Please select a release build or disable limited API.") + return False + return True |