diff --git a/src/build_tools/build_qt.py b/src/build_tools/build_qt.py index b3e7db769b..f893699dba 100755 --- a/src/build_tools/build_qt.py +++ b/src/build_tools/build_qt.py @@ -262,7 +262,6 @@ def make_configure_options(args: argparse.Namespace) -> list[str]: qt_configure_options = ['-opensource', '-c++std', 'c++20', - '-optimize-size', '-silent', '-no-cups', '-no-dbus', @@ -362,6 +361,9 @@ def make_configure_options(args: argparse.Namespace) -> list[str]: elif args.release: qt_configure_options += ['-release'] + if args.release: + qt_configure_options += ['-optimize-size'] + qt_src_dir = pathlib.Path(args.qt_src_dir).resolve() qt_dest_dir = pathlib.Path(args.qt_dest_dir).resolve() if qt_src_dir != qt_dest_dir: