GN: Fixes for Chromium builds.

When building WebRTC from a Chromium checkout (i.e. with
https://codereview.chromium.org/321313006/ applied) GN
cannot execute successfully.

This CL fixes:
- include path for video_processing module's SSE2 target.
- NSS/SSL targets

BUG=3441
TEST=
Passing WebRTC GN trybots.
Passing build from a Chromium checkout with https://codereview.chromium.org/321313006 applied and src/third_party/webrtc symlinked to the WebRTC checkout with this CL:
gn gen out/Default --args="clang_use_chrome_plugins=false" && ninja -C out/Default
gn gen out/Default --args="os=\"android\" cpu_arch=\"arm\"  clang_use_chrome_plugins=false" && ninja -C out/Default

R=brettw@chromium.org

Review URL: https://webrtc-codereview.appspot.com/21179005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6921 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2014-08-18 17:56:28 +00:00
parent d798095a37
commit 4a25199b76
2 changed files with 22 additions and 30 deletions

View File

@ -86,41 +86,24 @@ config("mac_x86_config") {
]
}
config("linux_system_ssl_config") {
visibility = ":*" # Only targets in this file can depend on this.
if (is_linux && !build_with_chromium) {
# Provides the same functionality as the //crypto:platform target, which
# WebRTC cannot use as we don't sync src/crypto from Chromium.
group("linux_system_ssl") {
if (use_openssl) {
deps = [ "//third_party/boringssl" ]
} else {
deps = [ "//net/third_party/nss/ssl:libssl" ]
# TODO(kjellander): Find out how to convert GYP include_dirs+ (i.e. insert
# first in the include path?).
include_dirs = [ "//net/third_party/nss/ssl" ]
configs = [ "//third_party/nss:system_nss_no_ssl_config" ]
}
# Provides the same functionality as the build/linux/system.gyp:ssl GYP target.
# This cannot be in build/linux/BUILD.gn since targets in build/ are not allowed
# to depend on targets outside of it. This could be replaced by the Chromium
# //crypto:platform target, but as WebRTC currently don't sync src/crypto from
# Chromium, it is not possible today.
config("linux_system_ssl") {
if (use_openssl) {
deps = [ "//third_party/boringssl" ]
} else {
deps = [ "//net/third_party/nss/ssl:libssl" ]
direct_dependent_configs = [
":linux_system_ssl_config",
]
if (is_clang) {
cflags = [
# There is a broken header guard in /usr/include/nss/secmod.h:
# https://bugzilla.mozilla.org/show_bug.cgi?id=884072
"-Wno-header-guard",
direct_dependent_configs = [
"//net/third_party/nss/ssl:ssl_config",
"//third_party/nss:system_nss_no_ssl_config",
]
}
}
}
static_library("webrtc_base") {
cflags = []
cflags_cc = []
@ -587,6 +570,10 @@ static_library("webrtc_base") {
}
if (is_posix && !is_mac && !is_ios && !is_android) {
configs += [ ":linux_system_ssl" ]
if (build_with_chromium) {
deps += [ "//crypto:platform" ]
} else {
deps += [ ":linux_system_ssl" ]
}
}
}

View File

@ -49,6 +49,11 @@ source_set("video_processing") {
if (build_video_processing_sse2) {
source_set("video_processing_sse2") {
sources = [ "main/source/content_analysis_sse2.cc" ]
configs += [
"../..:common_inherited_config",
]
if (is_posix) {
cflags = [ "-msse2" ]
}