Make 'webrtc' a static library.

Most other targets were converted to static_library to match the
GYP build in https://codereview.webrtc.org/2361623004.

The monolithic 'webrtc' wasn't converted due to a limitation in
libtool on Mac: it will fail if there are no object files to link
(see http://crbug.com/625874).
Because of that, a no_op_function.cc source file was added to
the sources here, even if it's not used. This will be further
refactored in the future as part of the Slim and Modular
effort (bugs.webrtc.org/5716).

BUG=webrtc:6418, webrtc:6410
NOTRY=True

Review-Url: https://codereview.webrtc.org/2372983002
Cr-Commit-Position: refs/heads/master@{#14403}
This commit is contained in:
kjellander 2016-09-27 12:13:13 -07:00 committed by Commit bot
parent 822a16f64c
commit ee99696592
2 changed files with 27 additions and 1 deletions

View File

@ -240,8 +240,11 @@ config("common_objc") {
}
if (!is_ios || !build_with_chromium) {
rtc_source_set("webrtc") {
rtc_static_library("webrtc") {
sources = [
# TODO(kjellander): Remove this whenever possible. GN's static_library
# target type requires at least one object to avoid errors linking.
"build/no_op_function.cc",
"call.h",
"config.h",
"transport.h",

View File

@ -0,0 +1,23 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
namespace webrtc {
// TODO(kjellander): Remove this whenever possible. GN's static_library
// target type requires at least one object to avoid errors linking.
// No-op function that can be used to compile an object necessary
// for linking into a static library.
int foobarbaz() {
return 0;
}
} // namespace webrtc