mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 13:35:19 +00:00
Multiarch fixes
This commit is contained in:
parent
dfa641e968
commit
610f16fa82
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -84,6 +84,7 @@ jobs:
|
||||
--bazel="$HOME/bazel-dist/bazel" \
|
||||
--bazelUserRoot="$BAZEL_USER_ROOT" \
|
||||
build \
|
||||
--disableParallelSwiftmoduleGeneration \
|
||||
--configurationPath="$HOME/telegram-configuration" \
|
||||
--buildNumber=$BUILD_NUMBER \
|
||||
--configuration=release_universal
|
||||
|
@ -1237,9 +1237,20 @@ ios_extension(
|
||||
":disableProvisioningProfilesSetting": None,
|
||||
"//conditions:default": "@build_configuration//provisioning:Widget.mobileprovision",
|
||||
}),
|
||||
deps = [
|
||||
":WidgetExtensionLib",
|
||||
],
|
||||
deps = select({
|
||||
"@build_bazel_rules_apple//apple:ios_arm64": [
|
||||
":WidgetExtensionLib",
|
||||
],
|
||||
"//build-system:ios_sim_arm64": [
|
||||
":WidgetExtensionLib",
|
||||
],
|
||||
"@build_bazel_rules_apple//apple:ios_x86_64": [
|
||||
":WidgetExtensionLib",
|
||||
],
|
||||
"@build_bazel_rules_apple//apple:ios_armv7": [
|
||||
":WidgetExtensionLib",
|
||||
],
|
||||
}),
|
||||
frameworks = [
|
||||
":SwiftSignalKitFramework",
|
||||
":PostboxFramework",
|
||||
|
@ -1,3 +1,5 @@
|
||||
#if arch(arm64) || arch(x86_64)
|
||||
|
||||
import UIKit
|
||||
import NotificationCenter
|
||||
import BuildConfig
|
||||
@ -1000,3 +1002,5 @@ struct AllWidgets: WidgetBundle {
|
||||
Static_AvatarsWidget()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -27,6 +27,7 @@ class BazelCommandLine:
|
||||
self.build_number = None
|
||||
self.configuration_args = None
|
||||
self.configuration_path = None
|
||||
self.split_submodules = False
|
||||
|
||||
self.common_args = [
|
||||
# https://docs.bazel.build/versions/master/command-line-reference.html
|
||||
@ -49,12 +50,6 @@ class BazelCommandLine:
|
||||
]
|
||||
|
||||
self.common_build_args = [
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled and whole module optimisation is being used, the `*.swiftdoc`,
|
||||
# `*.swiftmodule` and `*-Swift.h` are generated with a separate action
|
||||
# rather than as part of the compilation.
|
||||
'--features=swift.split_derived_files_generation',
|
||||
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled the skip function bodies frontend flag is passed when using derived
|
||||
# files generation.
|
||||
@ -112,6 +107,9 @@ class BazelCommandLine:
|
||||
def set_build_number(self, build_number):
|
||||
self.build_number = build_number
|
||||
|
||||
def set_split_swiftmodules(self, value):
|
||||
self.split_submodules = value
|
||||
|
||||
def set_configuration_path(self, path):
|
||||
self.configuration_path = path
|
||||
|
||||
@ -151,6 +149,23 @@ class BazelCommandLine:
|
||||
# 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=armv7k,arm64_32',
|
||||
|
||||
# Generate DSYM files when building.
|
||||
'--apple_generate_dsym',
|
||||
|
||||
# Require DSYM files as build output.
|
||||
'--output_groups=+dsyms'
|
||||
] + self.common_release_args
|
||||
@ -217,6 +232,19 @@ class BazelCommandLine:
|
||||
|
||||
return combined_arguments
|
||||
|
||||
def get_additional_build_arguments(self):
|
||||
combined_arguments = []
|
||||
if self.split_submodules:
|
||||
combined_arguments += [
|
||||
# https://github.com/bazelbuild/rules_swift
|
||||
# If enabled and whole module optimisation is being used, the `*.swiftdoc`,
|
||||
# `*.swiftmodule` and `*-Swift.h` are generated with a separate action
|
||||
# rather than as part of the compilation.
|
||||
'--features=swift.split_derived_files_generation',
|
||||
]
|
||||
|
||||
return combined_arguments
|
||||
|
||||
def invoke_build(self):
|
||||
combined_arguments = [
|
||||
self.build_environment.bazel_path
|
||||
@ -237,6 +265,7 @@ class BazelCommandLine:
|
||||
combined_arguments += self.common_args
|
||||
combined_arguments += self.common_build_args
|
||||
combined_arguments += self.get_define_arguments()
|
||||
combined_arguments += self.get_additional_build_arguments()
|
||||
|
||||
if self.remote_cache is not None:
|
||||
combined_arguments += [
|
||||
@ -355,6 +384,8 @@ def build(arguments):
|
||||
bazel_command_line.set_configuration(arguments.configuration)
|
||||
bazel_command_line.set_build_number(arguments.buildNumber)
|
||||
|
||||
bazel_command_line.set_split_swiftmodules(not arguments.disableParallelSwiftmoduleGeneration)
|
||||
|
||||
bazel_command_line.invoke_build()
|
||||
|
||||
|
||||
@ -500,11 +531,18 @@ if __name__ == '__main__':
|
||||
'debug_arm64',
|
||||
'debug_armv7',
|
||||
'release_arm64',
|
||||
'release_armv7',
|
||||
'release_universal'
|
||||
],
|
||||
required=True,
|
||||
help='Build configuration'
|
||||
)
|
||||
buildParser.add_argument(
|
||||
'--disableParallelSwiftmoduleGeneration',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='Generate .swiftmodule files in parallel to building modules, can speed up compilation on multi-core systems.'
|
||||
)
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
parser.print_help()
|
||||
|
@ -104,7 +104,7 @@ final class WidgetDataContext {
|
||||
let queue = Queue()
|
||||
let updatedAdditionalPeerIds: Signal<[AccountRecordId: Set<PeerId>], NoError> = Signal { subscriber in
|
||||
if #available(iOSApplicationExtension 14.0, iOS 14.0, *) {
|
||||
#if arch(arm64) || arch(i386) || arch(x86_64)
|
||||
#if arch(arm64) || arch(x86_64)
|
||||
WidgetCenter.shared.getCurrentConfigurations { result in
|
||||
var peerIds: [AccountRecordId: Set<PeerId>] = [:]
|
||||
|
||||
|
1
third-party/webrtc/BUILD
vendored
1
third-party/webrtc/BUILD
vendored
@ -3174,6 +3174,7 @@ common_arm_specific_sources = [webrtc_source_dir + "/" + path for path in [
|
||||
armv7_specific_sources = [webrtc_source_dir + "/" + path for path in [
|
||||
"common_audio/signal_processing/filter_ar_fast_q12.c",
|
||||
"common_audio/signal_processing/complex_bit_reverse.c",
|
||||
"common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc",
|
||||
]]
|
||||
|
||||
arm64_specific_sources = [webrtc_source_dir + "/" + path for path in [
|
||||
|
Loading…
x
Reference in New Issue
Block a user