aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-03-11 11:52:34 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-03-14 11:49:39 +0100
commit54480637fb019f2a1603e5263b949e3bd918a0c9 (patch)
tree895165692a95cdeca827fb16227ccedf4f6fd225 /build_scripts
parenta41e27cf932f736441b0bb7e8fe09a0962446a9f (diff)
Strip libraries in release mode
[ChangeLog][PySide6] Libraries are now stripped. Task-number: PYSIDE-661 Change-Id: I20ea056b8e91cca917017afa62811208c297d51d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/main.py9
-rw-r--r--build_scripts/options.py3
2 files changed, 9 insertions, 3 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index 2a1f46797..39ee4837e 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -640,9 +640,12 @@ class PysideBuild(_build, DistUtilsCommandMixin, BuildInfoCollectorMixin):
if numpy and not self.is_cross_compile:
cmake_cmd.append(f"-DNUMPY_INCLUDE_DIR={numpy}")
- if self.build_type.lower() == 'debug' and not self.is_cross_compile:
- cmake_cmd.append(f"-DPYTHON_DEBUG_LIBRARY={self.py_library}")
-
+ if self.build_type.lower() == 'debug':
+ if not self.is_cross_compile:
+ cmake_cmd.append(f"-DPYTHON_DEBUG_LIBRARY={self.py_library}")
+ else:
+ if OPTION['NO_STRIP']:
+ cmake_cmd.append("-DQFP_NO_STRIP=1")
if OPTION["LIMITED_API"] == "yes":
cmake_cmd.append("-DFORCE_LIMITED_API=yes")
elif OPTION["LIMITED_API"] == "no":
diff --git a/build_scripts/options.py b/build_scripts/options.py
index 6ce53b982..76fb5ce9c 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -208,6 +208,7 @@ class DistUtilsCommandMixin(object):
('debug', None, 'Build with debug information'),
('relwithdebinfo', None, 'Build in release mode with debug information'),
('only-package', None, 'Package only'),
+ ('no-strip', None, 'Do not strip package libraries (release mode)'),
('standalone', None, 'Standalone build'),
('ignore-git', None, 'Do update subrepositories'),
('skip-docs', None, 'Skip documentation build'),
@@ -260,6 +261,7 @@ class DistUtilsCommandMixin(object):
self.avoid_protected_hack = False
self.debug = False
self.relwithdebinfo = False
+ self.no_strip = False
self.only_package = False
self.standalone = False
self.ignore_git = False
@@ -365,6 +367,7 @@ class DistUtilsCommandMixin(object):
OPTION['AVOID_PROTECTED_HACK'] = self.avoid_protected_hack
OPTION['DEBUG'] = self.debug
OPTION['RELWITHDEBINFO'] = self.relwithdebinfo
+ OPTION['NO_STRIP'] = self.no_strip
OPTION['ONLYPACKAGE'] = self.only_package
OPTION['STANDALONE'] = self.standalone
OPTION['IGNOREGIT'] = self.ignore_git