Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 4f7fad7

Browse files
authored
Merge pull request #488 from jianjunz/ios-m88
Fix iOS build issues after rebasing to M88.
2 parents 8b30942 + 1bf05cf commit 4f7fad7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+127
-251
lines changed

DEPS

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,19 @@
3333
# This file contains dependencies for Intel CS for WebRTC Client SDKs.
3434
# It based on Chromium project.
3535

36+
gclient_gn_args_file = 'src/build/config/gclient_args.gni'
37+
gclient_gn_args = [
38+
'checkout_google_benchmark',
39+
]
40+
3641
vars = {
3742
'chromium_git': 'https://chromium.googlesource.com',
43+
44+
# By default, do not check out Google Benchmark. The library is only used by a
45+
# few specialized benchmarks that most developers do not interact with. Will
46+
# be overridden by gclient variables.
47+
'checkout_google_benchmark': True,
48+
3849
# By default, we should check out everything needed to run on the main
3950
# chromium waterfalls. More info at: crbug.com/570091.
4051
'checkout_configuration': 'default',
@@ -73,7 +84,7 @@ deps = {
7384
'src/base':
7485
Var('chromium_git') + '/chromium/src/base' + '@' + 'cdccd610777e3e49936c03a35b3ef7cb7d8a6794',
7586
'src/build':
76-
Var('chromium_git') + '/chromium/src/build' + '@' + '6b0abd7198f91211eb4b6ad65636cce6b2c0308c',
87+
Var('chromium_git') + '/chromium/src/build' + '@' + '57d7d0ceaed77728665884b58d60230b13906a9c',
7788
'src/buildtools':
7889
Var('chromium_git') + '/chromium/src/buildtools' + '@' + '6302c1175607a436e18947a5abe9df2209e845fc',
7990
# Gradle 4.3-rc4. Used for testing Android Studio project generation for WebRTC.
@@ -211,6 +222,7 @@ deps = {
211222
'https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git@c39ab82c90479341dcf28eaa8174af6f08c0d7ae',
212223
'src/third_party/google_benchmark/src': {
213224
'url': 'https://chromium.googlesource.com/external/github.com/google/benchmark.git@ffe1342eb2faa7d2e7c35b4db2ccf99fab81ec20',
225+
'condition': 'checkout_google_benchmark',
214226
},
215227
'src/third_party/gtest-parallel':
216228
Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + 'b0a18bc755c25e213b60868f97b72171c3601725',
@@ -319,7 +331,7 @@ deps = {
319331
Var('chromium_git') + '/infra/luci/client-py.git' + '@' + Var('swarming_revision'),
320332
# WebRTC-only dependencies (not present in Chromium).
321333
'src/third_party/webrtc':
322-
Var('deps_webrtc_git') + '/owt-deps-webrtc' + '@' + '2619b2535ce802ac36466a5f7141e40903691ba1',
334+
Var('deps_webrtc_git') + '/owt-deps-webrtc' + '@' + '51f552a0d00e3a25e2642582a1f0ac7373013804',
323335
'src/third_party/accessibility_test_framework': {
324336
'packages': [
325337
{

scripts/build.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
import re
2121
import distutils.dir_util
2222

23+
HOME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
24+
2325
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)),'build','config','mac'))
26+
sys.path.append(os.path.join(HOME_PATH, 'third_party', 'webrtc','tools_webrtc','apple'))
2427
import sdk_info
28+
import copy_framework_header
29+
2530

26-
HOME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
2731
OUT_PATH = os.path.join(HOME_PATH, 'out')
2832
# The lib contains all target architectures and external libs(OpenSSL).
2933
OUT_LIB_NAME = 'libowt.a'
@@ -79,7 +83,11 @@ def ninjabuild(arch, scheme, targets):
7983
def copyheaders(headers_target_folder):
8084
if os.path.exists(headers_target_folder):
8185
shutil.rmtree(headers_target_folder)
82-
shutil.copytree(HEADER_PATH, headers_target_folder)
86+
os.mkdir(headers_target_folder)
87+
for _, _, file_names in os.walk(HEADER_PATH):
88+
for file_name in file_names:
89+
copy_framework_header.process(os.path.join(
90+
HEADER_PATH, file_name), os.path.join(headers_target_folder, file_name))
8391

8492
def getexternalliblist(ssl_root):
8593
libs = []
@@ -147,7 +155,7 @@ def getsdkversion():
147155

148156
# Run unit tests on simulator. Return True if all tests are passed.
149157
def runtest(ssl_root):
150-
print 'Start running unit tests.'
158+
print('Start running unit tests.')
151159
# Build app targets checks link issue.
152160
if not ninjabuild(TEST_ARCH, TEST_SCHEME, SDK_TARGETS + APP_TARGETS + TEST_TARGETS):
153161
return False
@@ -197,7 +205,7 @@ def main():
197205
return 1
198206
if not runtest(opts.ssl_root):
199207
return 1
200-
print 'Done.'
208+
print('Done.')
201209
return 0
202210

203211
if __name__ == '__main__':

scripts/prepare_dev.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
('0007-Fix-examples-path-error.patch', BUILD_PATH),
3939
('0008-Disable-loop-range-analysis-when-build-with-Xcode-cl.patch', BUILD_PATH),
4040
('0009-Export-WebRTC-symbols-on-iOS.patch', BUILD_PATH),
41+
('0010-Restore-is_ash-for-backward-compatible.patch', BUILD_PATH),
4142
('0013-Remove-unused-gni-for-av1-build.patch', THIRD_PARTY_PATH),
4243
('0014-Fix-missing-ffmpeg-configure-item-for-msvc-build.patch', FFMPEG_PATH)
4344
]

talk/owt/BUILD.gn

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,20 +178,13 @@ static_library("owt_sdk_base") {
178178
include_dirs += [ owt_quic_header_root ]
179179
}
180180
}
181-
181+
182182
if (is_win || is_linux) {
183183
# Custom audio/video input and output.
184184
# When rebasing libwebrtc to a new version, custom audio/video input/output
185185
# usually need some changes to fit the latest API.
186186
defines += [ "OWT_CUSTOM_AVIO" ]
187187
}
188-
if (is_ios) {
189-
sources += [
190-
"sdk/base/ios/networkmonitorios.cc",
191-
"sdk/base/ios/networkmonitorios.h",
192-
]
193-
public_deps += [ "//third_party/webrtc/sdk:framework_objc+link" ]
194-
}
195188
if (is_win) {
196189
sources += [
197190
"sdk/base/desktopcapturer.cc",
@@ -341,9 +334,14 @@ if (is_ios) {
341334
":owt_sdk_p2p",
342335
"//third_party/jsoncpp",
343336
]
337+
if (is_ios) {
338+
deps += [ "//third_party/webrtc/sdk:framework_objc+link" ]
339+
}
344340
include_dirs = [
345341
"//third_party",
346-
"//third_party/webrtc/sdk/objc/Framework/Headers",
342+
"//third_party/webrtc/sdk/objc/api/peerconnection",
343+
"//third_party/webrtc/sdk/objc/api/logging",
344+
"//third_party/webrtc/sdk/objc/api/video_codec",
347345
"sdk/include/cpp",
348346
"sdk/include/objc",
349347
]
@@ -362,8 +360,6 @@ if (is_ios) {
362360
"sdk/base/objc/OWTDefaultVideoEncoderFactory.h",
363361
"sdk/base/objc/OWTDefaultVideoEncoderFactory.m",
364362
"sdk/base/objc/OWTErrors.m",
365-
366-
#"sdk/base/objc/OWTGlobalConfiguration.mm",
367363
"sdk/base/objc/OWTLocalStream+Private.h",
368364
"sdk/base/objc/OWTLocalStream.mm",
369365
"sdk/base/objc/OWTMediaFormat+Internal.h",
@@ -382,8 +378,6 @@ if (is_ios) {
382378
"sdk/base/objc/RemoteStreamObserverObjcImpl.mm",
383379
"sdk/base/objc/public/OWTErrors.h",
384380
"sdk/base/objc/public/OWTFrameGeneratorProtocol.h",
385-
386-
#"sdk/base/objc/public/OWTGlobalConfiguration.h",
387381
"sdk/base/objc/public/OWTLocalCameraStream.h",
388382
"sdk/base/objc/public/OWTLocalCameraStreamParameters.h",
389383
"sdk/base/objc/public/OWTLocalCustomizedStream.h",

talk/owt/patches/0005-Fixed-compile-issue-and-disable-thin-archive.patch

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ index 77f0e4516..cd7288683 100644
1313
--- a/config/c++/c++.gni
1414
+++ b/config/c++/c++.gni
1515
@@ -13,7 +13,7 @@ declare_args() {
16-
use_custom_libcxx =
17-
is_fuchsia || is_android || is_mac || (is_ios && !use_xcode_clang) ||
18-
(is_win && is_clang) ||
19-
- ((is_linux || is_chromeos) &&
20-
+ ((is_linux && is_clang) &&
21-
(!is_chromeos || default_toolchain != "//build/toolchain/cros:target"))
16+
# is not supported.
17+
use_custom_libcxx = is_fuchsia || is_android || is_mac ||
18+
(is_ios && !use_xcode_clang) || (is_win && is_clang) ||
19+
- ((is_linux || is_chromeos) &&
20+
+ ((is_linux && is_clang) &&
21+
(!is_chromeos_ash ||
22+
default_toolchain != "//build/toolchain/cros:target"))
2223

23-
# Use libc++ instead of stdlibc++ when using the host_cpu toolchain, even if
2424
diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
2525
index 9bc7dda39..1b002fe08 100644
2626
--- a/config/compiler/BUILD.gn
2727
+++ b/config/compiler/BUILD.gn
28-
@@ -1764,7 +1764,7 @@ config("thin_archive") {
29-
# Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't
30-
# have a "thin archive" mode (it does accept -T, but it means truncating
31-
# archive names to 16 characters, which is not what we want).
32-
- if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
33-
+ if ((is_posix && !is_nacl && !is_apple && !is_linux) || is_fuchsia) {
28+
@@ -1836,7 +1836,7 @@ config("export_dynamic") {
29+
config("thin_archive") {
30+
# The macOS and iOS default linker ld64 does not support reading thin
31+
# archives.
32+
- if ((is_posix && !is_nacl && (!is_apple || use_lld)) || is_fuchsia) {
33+
+ if ((is_posix && !is_nacl && !is_linux && (!is_apple || use_lld)) || is_fuchsia) {
3434
arflags = [ "-T" ]
3535
} else if (is_win && use_lld) {
3636
arflags = [ "/llvmlibthin" ]
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
From 0b6bce6a68a44c1915d102d9636060d0fd4763a3 Mon Sep 17 00:00:00 2001
2-
From: Qiu Jainlin <jianlin.qiu@intel.com>
3-
Date: Thu, 7 May 2020 10:06:20 +0800
4-
Subject: [PATCH] Fix examples path error
1+
From 9c3dae0473f6d2f1011a0917436a536af7deec0c Mon Sep 17 00:00:00 2001
2+
From: Jianjun Zhu <jianjun.zhu@intel.com>
3+
Date: Sun, 14 Feb 2021 10:37:08 +0800
4+
Subject: [PATCH] Fix examples path error.
55

66
---
77
config/linux/gtk/BUILD.gn | 2 +-
88
1 file changed, 1 insertion(+), 1 deletion(-)
99

1010
diff --git a/config/linux/gtk/BUILD.gn b/config/linux/gtk/BUILD.gn
11-
index 8bfa55924..60ca70c48 100644
11+
index 5491aef73..6bae2dcf0 100644
1212
--- a/config/linux/gtk/BUILD.gn
1313
+++ b/config/linux/gtk/BUILD.gn
14-
@@ -34,7 +34,7 @@ group("gtk") {
15-
"//remoting/host/file_transfer",
16-
"//remoting/host:remoting_me2me_host_static",
14+
@@ -38,7 +38,7 @@ group("gtk") {
15+
"//remoting/host/it2me:remote_assistance_host",
16+
"//remoting/host/linux",
1717
"//remoting/test:it2me_standalone_host_main",
1818
- "//webrtc/examples:peerconnection_client",
19-
+ "//third_party//webrtc/examples:peerconnection_client",
19+
+ "//third_party/webrtc/examples:peerconnection_client",
2020
]
2121

2222
public_configs = [ ":gtk_internal_config" ]
2323
--
24-
2.24.1.windows.2
24+
2.30.0
2525

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 4c01af961bd7f4111ce24cbe884d52d46d4b2956 Mon Sep 17 00:00:00 2001
2+
From: Jianjun Zhu <[email protected]>
3+
Date: Wed, 24 Feb 2021 15:06:02 +0800
4+
Subject: [PATCH] Restore is_ash for backward compatible.
5+
6+
---
7+
config/chromeos/ui_mode.gni | 3 +++
8+
1 file changed, 3 insertions(+)
9+
10+
diff --git a/config/chromeos/ui_mode.gni b/config/chromeos/ui_mode.gni
11+
index df578bc92..12a973f84 100644
12+
--- a/config/chromeos/ui_mode.gni
13+
+++ b/config/chromeos/ui_mode.gni
14+
@@ -31,6 +31,9 @@ declare_args() {
15+
# toolchains.
16+
is_chromeos_ash = is_chromeos && !chromeos_is_browser_only
17+
18+
+# Restore is_ash for backward compatible.
19+
+is_ash = is_chromeos_ash
20+
+
21+
# TODO(crbug.com/1052397): Remove is_linux once lacros-chrome switches
22+
# to target_os=chromeos
23+
is_chromeos_lacros = (is_chromeos || is_linux) && chromeos_is_browser_only
24+
--
25+
2.30.1
26+

talk/owt/sdk/base/ios/networkmonitorios.cc

Lines changed: 0 additions & 82 deletions
This file was deleted.

talk/owt/sdk/base/ios/networkmonitorios.h

Lines changed: 0 additions & 48 deletions
This file was deleted.

talk/owt/sdk/base/ios/readme.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)