aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-04 09:26:31 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-04 10:38:25 +0100
commit961cc3afb3b4c680f98dd52bb3d5a2d03cb424c1 (patch)
tree5fe3925ce7d7f0330efa6117f30b07fde3526253 /build_scripts
parent88baa74455119d7159f459a3ceeefdfff62e8200 (diff)
Add option for switching the protected hack
It is useful to test it on non-Windows platforms as well. Change-Id: I6886900e9f619250c4281f2012d2c14bd7310a4c Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/main.py3
-rw-r--r--build_scripts/options.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 1d79621c8..669a1754c 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -761,6 +761,9 @@ class PysideBuild(_build, DistUtilsCommandMixin):
cmake_cmd.append(f"-DQT_SRC_DIR={cmake_src_dir}")
log.info(f"Qt Source dir: {cmake_src_dir}")
+ if OPTION['AVOID_PROTECTED_HACK']:
+ cmake_cmd.append("-DAVOID_PROTECTED_HACK=1")
+
if self.build_type.lower() == 'debug':
cmake_cmd.append(f"-DPYTHON_DEBUG_LIBRARY={self.py_library}")
diff --git a/build_scripts/options.py b/build_scripts/options.py
index d7f878519..862f5eb9a 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -187,6 +187,7 @@ class DistUtilsCommandMixin(object):
_finalized = False
mixin_user_options = [
+ ('avoid-protected-hack', None, 'Force --avoid-protected-hack'),
('debug', None, 'Build with debug information'),
('relwithdebinfo', None, 'Build in release mode with debug information'),
('only-package', None, 'Package only'),
@@ -221,6 +222,7 @@ class DistUtilsCommandMixin(object):
('qt-src-dir=', None, 'Qt source directory')]
def __init__(self):
+ self.avoid_protected_hack = False
self.debug = False
self.relwithdebinfo = False
self.only_package = False
@@ -266,6 +268,7 @@ class DistUtilsCommandMixin(object):
def _do_finalize(self):
if not self._determine_defaults_and_check():
sys.exit(-1)
+ OPTION['AVOID_PROTECTED_HACK'] = self.avoid_protected_hack
OPTION['DEBUG'] = self.debug
OPTION['RELWITHDEBINFO'] = self.relwithdebinfo
OPTION['ONLYPACKAGE'] = self.only_package