Remove ObjC static library target.
It's been unused for a while and starting to be a maintainance burden. Bug: webrtc:8943 Change-Id: Ie49d6b06bdeb002496007725009ea194b8130f2b Reviewed-on: https://webrtc-review.googlesource.com/60160 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22339}
This commit is contained in:

committed by
Commit Bot

parent
a9bb99e516
commit
a2d89fc9f5
14
sdk/BUILD.gn
14
sdk/BUILD.gn
@ -431,8 +431,7 @@ if (is_ios || is_mac) {
|
|||||||
# these objects are just thin wrappers of native C++ interfaces required
|
# these objects are just thin wrappers of native C++ interfaces required
|
||||||
# when implementing webrtc::PeerConnectionFactoryInterface and
|
# when implementing webrtc::PeerConnectionFactoryInterface and
|
||||||
# webrtc::PeerConnectionInterface.
|
# webrtc::PeerConnectionInterface.
|
||||||
# The applications which only use WebRTC DataChannel can depend on this
|
# The applications which only use WebRTC DataChannel can depend on this.
|
||||||
# target instead of rtc_sdk_objc.
|
|
||||||
rtc_static_library("peerconnectionfactory_no_media_objc") {
|
rtc_static_library("peerconnectionfactory_no_media_objc") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
defines = [ "HAVE_NO_MEDIA" ]
|
defines = [ "HAVE_NO_MEDIA" ]
|
||||||
@ -927,17 +926,6 @@ if (is_ios || is_mac) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_static_library("rtc_sdk_objc") {
|
|
||||||
complete_static_lib = true
|
|
||||||
deps = [
|
|
||||||
":ui_objc",
|
|
||||||
":videocapture_objc",
|
|
||||||
"../system_wrappers:field_trial_default",
|
|
||||||
"../system_wrappers:metrics_default",
|
|
||||||
"../system_wrappers:runtime_enabled_features_default",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
rtc_static_library("video_toolbox_cc") {
|
rtc_static_library("video_toolbox_cc") {
|
||||||
visibility = [ ":videotoolbox_objc" ]
|
visibility = [ ":videotoolbox_objc" ]
|
||||||
sources = [
|
sources = [
|
||||||
|
@ -30,7 +30,6 @@ sys.path.append(os.path.join(SRC_DIR, 'build'))
|
|||||||
import find_depot_tools
|
import find_depot_tools
|
||||||
|
|
||||||
SDK_OUTPUT_DIR = os.path.join(SRC_DIR, 'out_ios_libs')
|
SDK_OUTPUT_DIR = os.path.join(SRC_DIR, 'out_ios_libs')
|
||||||
SDK_LIB_NAME = 'librtc_sdk_objc.a'
|
|
||||||
SDK_FRAMEWORK_NAME = 'WebRTC.framework'
|
SDK_FRAMEWORK_NAME = 'WebRTC.framework'
|
||||||
|
|
||||||
DEFAULT_ARCHS = ENABLED_ARCHS = ['arm64', 'arm', 'x64', 'x86']
|
DEFAULT_ARCHS = ENABLED_ARCHS = ['arm64', 'arm', 'x64', 'x86']
|
||||||
@ -43,10 +42,6 @@ from generate_licenses import LicenseBuilder
|
|||||||
|
|
||||||
def _ParseArgs():
|
def _ParseArgs():
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
parser.add_argument('-b', '--build_type', default='framework',
|
|
||||||
choices=['framework', 'static_only'],
|
|
||||||
help='The build type. Can be "framework" or "static_only". '
|
|
||||||
'Defaults to "framework".')
|
|
||||||
parser.add_argument('--build_config', default='release',
|
parser.add_argument('--build_config', default='release',
|
||||||
choices=['debug', 'release'],
|
choices=['debug', 'release'],
|
||||||
help='The build config. Can be "debug" or "release". '
|
help='The build config. Can be "debug" or "release". '
|
||||||
@ -98,7 +93,7 @@ def _CleanTemporary(output_dir, architectures):
|
|||||||
|
|
||||||
def BuildWebRTC(output_dir, target_arch, flavor, gn_target_name,
|
def BuildWebRTC(output_dir, target_arch, flavor, gn_target_name,
|
||||||
ios_deployment_target, libvpx_build_vp9, use_bitcode,
|
ios_deployment_target, libvpx_build_vp9, use_bitcode,
|
||||||
use_goma, extra_gn_args, static_only):
|
use_goma, extra_gn_args):
|
||||||
output_dir = os.path.join(output_dir, target_arch + '_libs')
|
output_dir = os.path.join(output_dir, target_arch + '_libs')
|
||||||
gn_args = ['target_os="ios"', 'ios_enable_code_signing=false',
|
gn_args = ['target_os="ios"', 'ios_enable_code_signing=false',
|
||||||
'use_xcode_clang=true', 'is_component_build=false']
|
'use_xcode_clang=true', 'is_component_build=false']
|
||||||
@ -145,15 +140,6 @@ def BuildWebRTC(output_dir, target_arch, flavor, gn_target_name,
|
|||||||
cmd.extend(['-j', '200'])
|
cmd.extend(['-j', '200'])
|
||||||
_RunCommand(cmd)
|
_RunCommand(cmd)
|
||||||
|
|
||||||
# Strip debug symbols to reduce size.
|
|
||||||
if static_only:
|
|
||||||
gn_target_path = os.path.join(output_dir, 'obj', 'sdk',
|
|
||||||
'lib%s.a' % gn_target_name)
|
|
||||||
cmd = ['strip', '-S', gn_target_path, '-o',
|
|
||||||
os.path.join(output_dir, 'lib%s.a' % gn_target_name)]
|
|
||||||
_RunCommand(cmd)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = _ParseArgs()
|
args = _ParseArgs()
|
||||||
|
|
||||||
@ -170,39 +156,23 @@ def main():
|
|||||||
_CleanTemporary(args.output_dir, architectures)
|
_CleanTemporary(args.output_dir, architectures)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# Ignoring x86 except for static libraries for now because of a GN build issue
|
# Ignoring x86 for now because of a GN build issue
|
||||||
# where the generated dynamic framework has the wrong architectures.
|
# where the generated dynamic framework has the wrong architectures.
|
||||||
if 'x86' in architectures and args.build_type != 'static_only':
|
|
||||||
architectures.remove('x86')
|
architectures.remove('x86')
|
||||||
|
|
||||||
# Generate static or dynamic.
|
|
||||||
if args.build_type == 'static_only':
|
|
||||||
gn_target_name = 'rtc_sdk_objc'
|
|
||||||
elif args.build_type == 'framework':
|
|
||||||
gn_target_name = 'framework_objc'
|
gn_target_name = 'framework_objc'
|
||||||
if not args.bitcode:
|
if not args.bitcode:
|
||||||
gn_args.append('enable_dsyms=true')
|
gn_args.append('enable_dsyms=true')
|
||||||
gn_args.append('enable_stripping=true')
|
gn_args.append('enable_stripping=true')
|
||||||
else:
|
|
||||||
raise ValueError('Build type "%s" is not supported.' % args.build_type)
|
|
||||||
|
|
||||||
|
|
||||||
# Build all architectures.
|
# Build all architectures.
|
||||||
for arch in architectures:
|
for arch in architectures:
|
||||||
BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name,
|
BuildWebRTC(args.output_dir, arch, args.build_config, gn_target_name,
|
||||||
IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode,
|
IOS_DEPLOYMENT_TARGET, LIBVPX_BUILD_VP9, args.bitcode,
|
||||||
args.use_goma, gn_args, args.build_type == 'static_only')
|
args.use_goma, gn_args)
|
||||||
|
|
||||||
# Create FAT archive.
|
# Create FAT archive.
|
||||||
if args.build_type == 'static_only':
|
|
||||||
lib_paths = [os.path.join(args.output_dir, arch + '_libs', SDK_LIB_NAME)
|
|
||||||
for arch in architectures]
|
|
||||||
out_lib_path = os.path.join(args.output_dir, SDK_LIB_NAME)
|
|
||||||
# Combine the slices.
|
|
||||||
cmd = ['lipo'] + lib_paths + ['-create', '-output', out_lib_path]
|
|
||||||
_RunCommand(cmd)
|
|
||||||
|
|
||||||
elif args.build_type == 'framework':
|
|
||||||
lib_paths = [os.path.join(args.output_dir, arch + '_libs')
|
lib_paths = [os.path.join(args.output_dir, arch + '_libs')
|
||||||
for arch in architectures]
|
for arch in architectures]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user