Make RTC_OBJC_EXPORT respect is_component_build.

While RTC_EXPORT is aware of component builds (selecting "default"
visibility only when WebRTC is built as a shared library),
RTC_OBJC_EXPORT (which predates RTC_EXPORT) was always marking symbols
as "default" visible.

This CL fixes the problem but on the other hand it will require
standalone builds of the WebRTC.framework to set the GN argument
`rtc_enable_symbol_export` to true.

No-Presubmit: True
Bug: chromium:1159620
Change-Id: I4a16f9bd3c1564140a5a30f03b3e77caed1df591
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/198082
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#32856}
This commit is contained in:
Mirko Bonadei
2020-12-17 15:56:13 +01:00
committed by Commit Bot
parent 0ff2b4cd42
commit c1254e84a5
2 changed files with 13 additions and 2 deletions

View File

@ -146,6 +146,7 @@ def BuildWebRTC(output_dir, target_arch, flavor, gn_target_name,
gn_args.append('enable_ios_bitcode=' +
('true' if use_bitcode else 'false'))
gn_args.append('use_goma=' + ('true' if use_goma else 'false'))
gn_args.append('rtc_enable_symbol_export=true')
args_string = ' '.join(gn_args + extra_gn_args)
logging.info('Building WebRTC with args: %s', args_string)