From a29d5ec613030e9eff897476b64ccab0c4e0f60a Mon Sep 17 00:00:00 2001 From: kjellander Date: Wed, 1 Feb 2017 23:51:13 -0800 Subject: [PATCH] Make 'webrtc' target a complete static library on Linux, Android and Windows It's currently not possible on Mac and iOS due to libtool. See webrtc:6418 for more info. BUG=webrtc:6418 NOTRY=True Review-Url: https://codereview.webrtc.org/2367313002 Cr-Commit-Position: refs/heads/master@{#16411} --- webrtc/BUILD.gn | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index b46b80c719..8969f13f10 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -227,16 +227,22 @@ if (!build_with_chromium) { visibility = [ "//:default" ] sources = [ - # TODO(kjellander): Remove this whenever possible. GN's static_library - # target type requires at least one object to avoid errors linking. - "no_op_function.cc", - # TODO(ossu): Keep this here until donwstream projects have updated. # http://bugs.webrtc.org/6716 "call.h", "config.h", ] + # complete_static_lib doesn't work on Mac since libtool cannot support + # multiple objects with the same filenames (https://bugs.webrtc.org/6418). + if (is_win || is_linux || is_android) { + complete_static_lib = true + } else { + # TODO(kjellander): Remove this whenever possible. GN's static_library + # target type requires at least one object to avoid errors linking. + sources += [ "no_op_function.cc" ] + } + defines = [] deps = [