aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Herrmann <adrian.herrmann@qt.io>2022-11-11 20:31:37 +0100
committerAdrian Herrmann <adrian.herrmann@qt.io>2022-11-16 14:38:30 +0000
commit7386c2a7acc30f909029ad89a583793b8f84ae6f (patch)
treeba81468a2ce39f557abe0402e844a71636b446b0
parenta49e0dd004798f8277dc7fb63564f5f5a77c3f68 (diff)
Fix debug build problems on Win re: limited-api
There is a build error on Windows when limited-api=yes and debug where the linker does not know the right paths to look for libraries. Supporting this configuration is not desirable anyway because there are no released Python builds on Windows with this configuration. Therefore: 1. Display a warning to the user that the combination debug + limited=api=yes does not really "exist" if they choose it explicitly on Windows. 2. Have the default for debug builds be limited-api=no on Windows. Change-Id: Ifed99f80abb02c9d512a1321526e949d56ff08a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 72107fc39f15e3827297530dfad3c63f8e4ffcaa)
-rw-r--r--build_scripts/main.py6
-rw-r--r--build_scripts/options.py5
2 files changed, 9 insertions, 2 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index aeeaf5c67..6ce9bfe8f 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -686,10 +686,12 @@ class PysideBuild(_build, DistUtilsCommandMixin, 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 DistutilsSetupError("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 92e77aabc..c27ecb3d9 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -519,4 +519,9 @@ class DistUtilsCommandMixin(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