From 7a5c85d463d6c9ce4bbfe2ffd6ebda0f503b4d4e Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 13:18:09 +0400 Subject: [PATCH 01/14] Try to build watch app --- Telegram/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index ac96cc11c6..13a610b262 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -1970,7 +1970,7 @@ ios_application( }), watch_application = select({ ":disableExtensionsSetting": None, - "//conditions:default": None#":TelegramWatchApp", + "//conditions:default": ":TelegramWatchApp", }) if telegram_enable_watch else None, deps = [ ":Main", From c49700f06a89e08f2e58ba9fea6d6de5738e013b Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 13:47:49 +0400 Subject: [PATCH 02/14] Disable bitcode --- build-system/Make/Make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index 6506859acb..a1dae7e1c0 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -112,7 +112,7 @@ class BazelCommandLine: '--objc_enable_binary_stripping', # Always embed bitcode into Watch binaries. This is required by the App Store. - '--apple_bitcode=watchos=embedded', + #'--apple_bitcode=watchos=embedded', ] def add_remote_cache(self, host): From 19eb498df6762dea1ae0f0521e45c755c37c8bed Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 13:59:23 +0400 Subject: [PATCH 03/14] Ok then --- Telegram/BUILD | 2 +- build-system/Make/Make.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index 13a610b262..34a68de913 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -1970,7 +1970,7 @@ ios_application( }), watch_application = select({ ":disableExtensionsSetting": None, - "//conditions:default": ":TelegramWatchApp", + "//conditions:default": #":TelegramWatchApp", }) if telegram_enable_watch else None, deps = [ ":Main", diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index a1dae7e1c0..6506859acb 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -112,7 +112,7 @@ class BazelCommandLine: '--objc_enable_binary_stripping', # Always embed bitcode into Watch binaries. This is required by the App Store. - #'--apple_bitcode=watchos=embedded', + '--apple_bitcode=watchos=embedded', ] def add_remote_cache(self, host): From 7941fd2d53e9db5b374d4eaff3afd3d59e12c1c1 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 22:59:04 +0400 Subject: [PATCH 04/14] Try again --- Telegram/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index 34a68de913..fc05f4cd57 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -771,7 +771,7 @@ watchos_application( ":disableProvisioningProfilesSetting": None, "//conditions:default": "@build_configuration//provisioning:WatchApp.mobileprovision", }), - ipa_post_processor = ":StripWatchosStubBinary", + #ipa_post_processor = ":StripWatchosStubBinary", resources = [ ":TelegramWatchAppResources", ":TelegramWatchAppAssets", @@ -1970,7 +1970,7 @@ ios_application( }), watch_application = select({ ":disableExtensionsSetting": None, - "//conditions:default": #":TelegramWatchApp", + "//conditions:default": ":TelegramWatchApp", }) if telegram_enable_watch else None, deps = [ ":Main", From ccf1b2c7947c0950caf852e39a768a3ff7412d68 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 23:13:08 +0400 Subject: [PATCH 05/14] Again --- Telegram/BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index fc05f4cd57..2e31c8441e 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -740,7 +740,7 @@ genrule( name = "StripWatchosStubBinary", cmd_bash = """ - echo 'lipo -remove armv7k -remove arm64 -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK' > $(location StripWatchosStubBinary.sh) + echo 'lipo -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK' > $(location StripWatchosStubBinary.sh) echo '' >> $(location StripWatchosStubBinary.sh) """, outs = [ @@ -771,7 +771,7 @@ watchos_application( ":disableProvisioningProfilesSetting": None, "//conditions:default": "@build_configuration//provisioning:WatchApp.mobileprovision", }), - #ipa_post_processor = ":StripWatchosStubBinary", + ipa_post_processor = ":StripWatchosStubBinary", resources = [ ":TelegramWatchAppResources", ":TelegramWatchAppAssets", From cddd414aa7042eb3eebd7775b2c2c5ad6ccc9e2b Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 23:35:44 +0400 Subject: [PATCH 06/14] Again --- Telegram/BUILD | 2 +- build-system/Make/Make.py | 59 ++------------------------------------- 2 files changed, 3 insertions(+), 58 deletions(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index 2e31c8441e..2f4ab1de72 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -740,7 +740,7 @@ genrule( name = "StripWatchosStubBinary", cmd_bash = """ - echo 'lipo -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK' > $(location StripWatchosStubBinary.sh) + echo 'lipo -remove arm64e -remove armv7k $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e -remove armv7k $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) echo '' >> $(location StripWatchosStubBinary.sh) """, outs = [ diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index 6506859acb..f328b87e73 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -149,18 +149,7 @@ class BazelCommandLine: self.disable_provisioning_profiles = True def set_configuration(self, configuration): - if configuration == 'debug_universal': - self.configuration_args = [ - # bazel debug build configuration - '-c', 'dbg', - - # Build universal binaries. - '--ios_multi_cpus=armv7,arm64', - - # Always build universal Watch binaries. - '--watchos_cpus=arm64_32' - ] + self.common_debug_args - elif configuration == 'debug_arm64': + if configuration == 'debug_arm64': self.configuration_args = [ # bazel debug build configuration '-c', 'dbg', @@ -190,16 +179,6 @@ class BazelCommandLine: # Build single-architecture binaries. It is almost 2 times faster is 32-bit support is not required. '--ios_multi_cpus=sim_arm64', - # Always build universal Watch binaries. - '--watchos_cpus=arm64_32' - ] + self.common_debug_args - elif configuration == 'debug_armv7': - self.configuration_args = [ - # bazel debug build configuration - '-c', 'dbg', - - '--ios_multi_cpus=armv7', - # Always build universal Watch binaries. '--watchos_cpus=arm64_32' ] + self.common_debug_args @@ -212,45 +191,11 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=arm64_32', + '--watchos_cpus=arm64_32,arm64', # Generate DSYM files when building. '--apple_generate_dsym', - # Require DSYM files as build output. - '--output_groups=+dsyms' - ] + self.common_release_args - elif configuration == 'release_armv7': - self.configuration_args = [ - # bazel optimized build configuration - '-c', 'opt', - - # Build single-architecture binaries. It is almost 2 times faster is 32-bit support is not required. - '--ios_multi_cpus=armv7', - - # Always build universal Watch binaries. - '--watchos_cpus=arm64_32', - - # Generate DSYM files when building. - '--apple_generate_dsym', - - # Require DSYM files as build output. - '--output_groups=+dsyms' - ] + self.common_release_args - elif configuration == 'release_universal': - self.configuration_args = [ - # bazel optimized build configuration - '-c', 'opt', - - # Build universal binaries. - '--ios_multi_cpus=armv7,arm64', - - # Always build universal Watch binaries. - '--watchos_cpus=arm64_32', - - # Generate DSYM files when building. - '--apple_generate_dsym', - # Require DSYM files as build output. '--output_groups=+dsyms' ] + self.common_release_args From c1b576551e551bc054907dff8dfd5a53af0ec30e Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 23:46:24 +0400 Subject: [PATCH 07/14] Again --- Telegram/BUILD | 4 ++-- build-system/Make/Make.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index 2f4ab1de72..f52f037129 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -123,7 +123,7 @@ genrule( ) minimum_os_version = "11.0" -minimum_watchos_version="9.0" +minimum_watchos_version="5.0" empty_languages = [ "ar", @@ -740,7 +740,7 @@ genrule( name = "StripWatchosStubBinary", cmd_bash = """ - echo 'lipo -remove arm64e -remove armv7k $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e -remove armv7k $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) + echo 'lipo -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) echo '' >> $(location StripWatchosStubBinary.sh) """, outs = [ diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index f328b87e73..f92d89e684 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -191,7 +191,7 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=arm64_32,arm64', + '--watchos_cpus=arm64_32,arm64,armv7k', # Generate DSYM files when building. '--apple_generate_dsym', From 3da465bdc116af4d0a94962b36e209797e38acf3 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 6 Apr 2023 23:54:54 +0400 Subject: [PATCH 08/14] Remove v7 --- build-system/Make/Make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index f92d89e684..f328b87e73 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -191,7 +191,7 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=arm64_32,arm64,armv7k', + '--watchos_cpus=arm64_32,arm64', # Generate DSYM files when building. '--apple_generate_dsym', From 28e34d19fd2087465c550f712fd54ac1659d706c Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 7 Apr 2023 00:23:00 +0400 Subject: [PATCH 09/14] Test --- build-system/Make/Make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index f328b87e73..9702d701d6 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -191,7 +191,7 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=arm64_32,arm64', + '--watchos_cpus=arm64_32,armv7k', # Generate DSYM files when building. '--apple_generate_dsym', From 9998d5a23bd0d31641ece74cafce026b5583776b Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 7 Apr 2023 13:38:21 +0400 Subject: [PATCH 10/14] Test --- Telegram/BUILD | 2 +- WORKSPACE | 14 +++++++------- build-system/Make/Make.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index f52f037129..563c1ef6b1 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -740,7 +740,7 @@ genrule( name = "StripWatchosStubBinary", cmd_bash = """ - echo 'lipo -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) + echo 'lipo -remove arm64e -remove arm64 $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e -remove arm64 $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) echo '' >> $(location StripWatchosStubBinary.sh) """, outs = [ diff --git a/WORKSPACE b/WORKSPACE index fa23cf7b1a..ad6d31c26b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -31,6 +31,13 @@ local_repository( path = "build-system/bazel-rules/rules_xcodeproj", ) +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", +) + +apple_support_dependencies() + load( "@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies", @@ -45,13 +52,6 @@ load( swift_rules_dependencies() -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() - load( "@rules_xcodeproj//xcodeproj:repositories.bzl", "xcodeproj_rules_dependencies", diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index 9702d701d6..97328b2efc 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -191,7 +191,7 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=arm64_32,armv7k', + '--watchos_cpus=armv7k,arm64_32', # Generate DSYM files when building. '--apple_generate_dsym', From edbbaff5aaf8c4b629cfe7b968f5d2c17739479c Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 7 Apr 2023 13:49:53 +0400 Subject: [PATCH 11/14] Remove watch app --- Telegram/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/BUILD b/Telegram/BUILD index 563c1ef6b1..cf9d015746 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -1970,7 +1970,7 @@ ios_application( }), watch_application = select({ ":disableExtensionsSetting": None, - "//conditions:default": ":TelegramWatchApp", + "//conditions:default": None,#":TelegramWatchApp", }) if telegram_enable_watch else None, deps = [ ":Main", From 58695a9d5afb66fed58b868f8f245fec74b4fa21 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 7 Apr 2023 18:43:41 +0400 Subject: [PATCH 12/14] Try again --- .bazelrc | 3 +++ .gitmodules | 2 +- Telegram/BUILD | 4 ++-- build-system/Make/Make.py | 2 +- build-system/bazel-rules/apple_support | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.bazelrc b/.bazelrc index f1cda53727..9f455285f7 100644 --- a/.bazelrc +++ b/.bazelrc @@ -35,3 +35,6 @@ build --spawn_strategy=standalone build --strategy=SwiftCompile=standalone build --define RULES_SWIFT_BUILD_DUMMY_WORKER=1 +build --apple_crosstool_top=@local_config_apple_cc//:toolchain +build --crosstool_top=@local_config_apple_cc//:toolchain +build --host_crosstool_top=@local_config_apple_cc//:toolchain diff --git a/.gitmodules b/.gitmodules index d4b6047ecd..62be224db0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,7 +10,7 @@ url=https://github.com/ali-fareed/rules_apple.git url=https://github.com/bazelbuild/rules_swift.git [submodule "build-system/bazel-rules/apple_support"] path = build-system/bazel-rules/apple_support - url = https://github.com/bazelbuild/apple_support.git +url=https://github.com/ali-fareed/apple_support.git [submodule "submodules/TgVoip/libtgvoip"] path = submodules/TgVoip/libtgvoip url = https://github.com/telegramdesktop/libtgvoip.git diff --git a/Telegram/BUILD b/Telegram/BUILD index cf9d015746..f52f037129 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -740,7 +740,7 @@ genrule( name = "StripWatchosStubBinary", cmd_bash = """ - echo 'lipo -remove arm64e -remove arm64 $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e -remove arm64 $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) + echo 'lipo -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) echo '' >> $(location StripWatchosStubBinary.sh) """, outs = [ @@ -1970,7 +1970,7 @@ ios_application( }), watch_application = select({ ":disableExtensionsSetting": None, - "//conditions:default": None,#":TelegramWatchApp", + "//conditions:default": ":TelegramWatchApp", }) if telegram_enable_watch else None, deps = [ ":Main", diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index 97328b2efc..52767ccc79 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -191,7 +191,7 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=armv7k,arm64_32', + '--watchos_cpus=armv7k,arm64_32,arm64', # Generate DSYM files when building. '--apple_generate_dsym', diff --git a/build-system/bazel-rules/apple_support b/build-system/bazel-rules/apple_support index 7cecc12692..12fc37b370 160000 --- a/build-system/bazel-rules/apple_support +++ b/build-system/bazel-rules/apple_support @@ -1 +1 @@ -Subproject commit 7cecc126925fef811c274b10b99329179574f9cb +Subproject commit 12fc37b370ff460c8712f16eb61a4d1f5abfc565 From 065bf2d0255fd7851861e332b2fef0b39c876210 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 12 Apr 2023 23:44:40 +0400 Subject: [PATCH 13/14] Revert watch experiments --- .bazelrc | 3 -- .gitmodules | 2 +- Telegram/BUILD | 6 ++-- WORKSPACE | 14 +++++----- build-system/Make/Make.py | 59 +++++++++++++++++++++++++++++++++++++-- 5 files changed, 68 insertions(+), 16 deletions(-) diff --git a/.bazelrc b/.bazelrc index 9f455285f7..f1cda53727 100644 --- a/.bazelrc +++ b/.bazelrc @@ -35,6 +35,3 @@ build --spawn_strategy=standalone build --strategy=SwiftCompile=standalone build --define RULES_SWIFT_BUILD_DUMMY_WORKER=1 -build --apple_crosstool_top=@local_config_apple_cc//:toolchain -build --crosstool_top=@local_config_apple_cc//:toolchain -build --host_crosstool_top=@local_config_apple_cc//:toolchain diff --git a/.gitmodules b/.gitmodules index 62be224db0..d4b6047ecd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,7 +10,7 @@ url=https://github.com/ali-fareed/rules_apple.git url=https://github.com/bazelbuild/rules_swift.git [submodule "build-system/bazel-rules/apple_support"] path = build-system/bazel-rules/apple_support -url=https://github.com/ali-fareed/apple_support.git + url = https://github.com/bazelbuild/apple_support.git [submodule "submodules/TgVoip/libtgvoip"] path = submodules/TgVoip/libtgvoip url = https://github.com/telegramdesktop/libtgvoip.git diff --git a/Telegram/BUILD b/Telegram/BUILD index f52f037129..ac96cc11c6 100644 --- a/Telegram/BUILD +++ b/Telegram/BUILD @@ -123,7 +123,7 @@ genrule( ) minimum_os_version = "11.0" -minimum_watchos_version="5.0" +minimum_watchos_version="9.0" empty_languages = [ "ar", @@ -740,7 +740,7 @@ genrule( name = "StripWatchosStubBinary", cmd_bash = """ - echo 'lipo -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK && lipo -remove arm64e $$1/TelegramWatch.app/TelegramWatch -output $$1/TelegramWatch.app/TelegramWatch' > $(location StripWatchosStubBinary.sh) + echo 'lipo -remove armv7k -remove arm64 -remove arm64e $$1/TelegramWatch.app/_WatchKitStub/WK -output $$1/TelegramWatch.app/_WatchKitStub/WK' > $(location StripWatchosStubBinary.sh) echo '' >> $(location StripWatchosStubBinary.sh) """, outs = [ @@ -1970,7 +1970,7 @@ ios_application( }), watch_application = select({ ":disableExtensionsSetting": None, - "//conditions:default": ":TelegramWatchApp", + "//conditions:default": None#":TelegramWatchApp", }) if telegram_enable_watch else None, deps = [ ":Main", diff --git a/WORKSPACE b/WORKSPACE index ad6d31c26b..fa23cf7b1a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -31,13 +31,6 @@ local_repository( path = "build-system/bazel-rules/rules_xcodeproj", ) -load( - "@build_bazel_apple_support//lib:repositories.bzl", - "apple_support_dependencies", -) - -apple_support_dependencies() - load( "@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies", @@ -52,6 +45,13 @@ load( swift_rules_dependencies() +load( + "@build_bazel_apple_support//lib:repositories.bzl", + "apple_support_dependencies", +) + +apple_support_dependencies() + load( "@rules_xcodeproj//xcodeproj:repositories.bzl", "xcodeproj_rules_dependencies", diff --git a/build-system/Make/Make.py b/build-system/Make/Make.py index 52767ccc79..6506859acb 100644 --- a/build-system/Make/Make.py +++ b/build-system/Make/Make.py @@ -149,7 +149,18 @@ class BazelCommandLine: self.disable_provisioning_profiles = True def set_configuration(self, configuration): - if configuration == 'debug_arm64': + if configuration == 'debug_universal': + self.configuration_args = [ + # bazel debug build configuration + '-c', 'dbg', + + # Build universal binaries. + '--ios_multi_cpus=armv7,arm64', + + # Always build universal Watch binaries. + '--watchos_cpus=arm64_32' + ] + self.common_debug_args + elif configuration == 'debug_arm64': self.configuration_args = [ # bazel debug build configuration '-c', 'dbg', @@ -179,6 +190,16 @@ class BazelCommandLine: # Build single-architecture binaries. It is almost 2 times faster is 32-bit support is not required. '--ios_multi_cpus=sim_arm64', + # Always build universal Watch binaries. + '--watchos_cpus=arm64_32' + ] + self.common_debug_args + elif configuration == 'debug_armv7': + self.configuration_args = [ + # bazel debug build configuration + '-c', 'dbg', + + '--ios_multi_cpus=armv7', + # Always build universal Watch binaries. '--watchos_cpus=arm64_32' ] + self.common_debug_args @@ -191,11 +212,45 @@ class BazelCommandLine: '--ios_multi_cpus=arm64', # Always build universal Watch binaries. - '--watchos_cpus=armv7k,arm64_32,arm64', + '--watchos_cpus=arm64_32', # Generate DSYM files when building. '--apple_generate_dsym', + # Require DSYM files as build output. + '--output_groups=+dsyms' + ] + self.common_release_args + elif configuration == 'release_armv7': + self.configuration_args = [ + # bazel optimized build configuration + '-c', 'opt', + + # Build single-architecture binaries. It is almost 2 times faster is 32-bit support is not required. + '--ios_multi_cpus=armv7', + + # Always build universal Watch binaries. + '--watchos_cpus=arm64_32', + + # Generate DSYM files when building. + '--apple_generate_dsym', + + # Require DSYM files as build output. + '--output_groups=+dsyms' + ] + self.common_release_args + elif configuration == 'release_universal': + self.configuration_args = [ + # bazel optimized build configuration + '-c', 'opt', + + # Build universal binaries. + '--ios_multi_cpus=armv7,arm64', + + # Always build universal Watch binaries. + '--watchos_cpus=arm64_32', + + # Generate DSYM files when building. + '--apple_generate_dsym', + # Require DSYM files as build output. '--output_groups=+dsyms' ] + self.common_release_args From cb22202ce94a03aff8f8da9d6ce8925462d795d6 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 13 Apr 2023 00:38:49 +0400 Subject: [PATCH 14/14] Fix ff_seek_frame_binary bug with Xcode 14.3 --- submodules/ffmpeg/Sources/FFMpeg/ffmpeg-4.1/libavformat/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/ffmpeg/Sources/FFMpeg/ffmpeg-4.1/libavformat/utils.c b/submodules/ffmpeg/Sources/FFMpeg/ffmpeg-4.1/libavformat/utils.c index 72dd9044e1..e6d9a285d8 100644 --- a/submodules/ffmpeg/Sources/FFMpeg/ffmpeg-4.1/libavformat/utils.c +++ b/submodules/ffmpeg/Sources/FFMpeg/ffmpeg-4.1/libavformat/utils.c @@ -2164,7 +2164,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts, int flags) { AVInputFormat *avif = s->iformat; - int64_t av_uninit(pos_min), av_uninit(pos_max), pos, pos_limit; + int64_t pos_min = 0, pos_max = 0, pos, pos_limit; int64_t ts_min, ts_max, ts; int index; int64_t ret;