mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix build
This commit is contained in:
parent
3cc76b3e40
commit
21d5fe177b
@ -100,13 +100,14 @@ class BazelCommandLine:
|
|||||||
|
|
||||||
# https://github.com/bazelbuild/rules_swift
|
# https://github.com/bazelbuild/rules_swift
|
||||||
# Use -Osize instead of -O when building swift modules.
|
# Use -Osize instead of -O when building swift modules.
|
||||||
#'--features=swift.opt_uses_osize',
|
'--features=swift.opt_uses_osize',
|
||||||
|
|
||||||
# --num-threads 0 forces swiftc to generate one object file per module; it:
|
# --num-threads 0 forces swiftc to generate one object file per module; it:
|
||||||
# 1. resolves issues with the linker caused by the swift-objc mixing.
|
# 1. resolves issues with the linker caused by the swift-objc mixing.
|
||||||
# 2. makes the resulting binaries significantly smaller (up to 9% for this project).
|
# 2. makes the resulting binaries significantly smaller (up to 9% for this project).
|
||||||
'--swiftcopt=-num-threads', '--swiftcopt=1',
|
#'--swiftcopt=-num-threads', '--swiftcopt=1',
|
||||||
'--swiftcopt=-j1',
|
'--swiftcopt=-j1',
|
||||||
|
'--features=swift._num_threads_0_in_swiftcopts',
|
||||||
|
|
||||||
# Strip unsused code.
|
# Strip unsused code.
|
||||||
'--features=dead_strip',
|
'--features=dead_strip',
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 25bc63e827951bd67376cd0f811a29d0c3924009
|
Subproject commit 86dc0f046269b3001f6f20cec38342c03120a209
|
@ -123,7 +123,9 @@ private final class VideoRecorderImpl {
|
|||||||
private var previousAppendTime: Double?
|
private var previousAppendTime: Double?
|
||||||
|
|
||||||
public func appendVideoSampleBuffer(_ sampleBuffer: CMSampleBuffer) {
|
public func appendVideoSampleBuffer(_ sampleBuffer: CMSampleBuffer) {
|
||||||
|
#if canImport(SwiftData) // Xcode 16
|
||||||
nonisolated(unsafe) let sampleBuffer = sampleBuffer
|
nonisolated(unsafe) let sampleBuffer = sampleBuffer
|
||||||
|
#endif
|
||||||
|
|
||||||
self.queue.async {
|
self.queue.async {
|
||||||
guard self.hasError() == nil && !self.stopped else {
|
guard self.hasError() == nil && !self.stopped else {
|
||||||
@ -248,7 +250,9 @@ private final class VideoRecorderImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func appendAudioSampleBuffer(_ sampleBuffer: CMSampleBuffer) {
|
public func appendAudioSampleBuffer(_ sampleBuffer: CMSampleBuffer) {
|
||||||
|
#if canImport(SwiftData) // Xcode 16
|
||||||
nonisolated(unsafe) let sampleBuffer = sampleBuffer
|
nonisolated(unsafe) let sampleBuffer = sampleBuffer
|
||||||
|
#endif
|
||||||
|
|
||||||
self.queue.async {
|
self.queue.async {
|
||||||
guard self.hasError() == nil && !self.stopped else {
|
guard self.hasError() == nil && !self.stopped else {
|
||||||
|
@ -2500,7 +2500,11 @@ public func channelStatsController(context: AccountContext, updatedPresentationD
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
var tooltipScreen: UndoOverlayController?
|
var tooltipScreen: UndoOverlayController?
|
||||||
|
#if canImport(SwiftData) // Xcode 16
|
||||||
nonisolated(unsafe) var timer: Foundation.Timer?
|
nonisolated(unsafe) var timer: Foundation.Timer?
|
||||||
|
#else
|
||||||
|
var timer: Foundation.Timer?
|
||||||
|
#endif
|
||||||
showTimeoutTooltipImpl = { cooldownUntilTimestamp in
|
showTimeoutTooltipImpl = { cooldownUntilTimestamp in
|
||||||
let remainingCooldownSeconds = cooldownUntilTimestamp - Int32(Date().timeIntervalSince1970)
|
let remainingCooldownSeconds = cooldownUntilTimestamp - Int32(Date().timeIntervalSince1970)
|
||||||
|
|
||||||
|
@ -2481,7 +2481,11 @@ private func renderVideo(context: AccountContext, backgroundImage: UIImage, user
|
|||||||
completion(nil)
|
completion(nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
#if canImport(SwiftData) // Xcode 16
|
||||||
nonisolated(unsafe) let export = exportValue
|
nonisolated(unsafe) let export = exportValue
|
||||||
|
#else
|
||||||
|
let export = exportValue
|
||||||
|
#endif
|
||||||
|
|
||||||
let videoName = UUID().uuidString
|
let videoName = UUID().uuidString
|
||||||
let exportURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(videoName).appendingPathExtension("mp4")
|
let exportURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(videoName).appendingPathExtension("mp4")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user