Commit bd378629 authored by Stephen Lanham's avatar Stephen Lanham Committed by Commit Bot

[Chromecast] Introduce cast_{shared_library|executable}.

This is a temporary workaround to allow the component build to work
until crbug.com/746091 is resolved. This introduces a dependency on
libc++ when use_custom_libcxx is true.

BUG=746091

Change-Id: I14ae65c0ac7d986649f5f70b47b0ad6f37ceff89
Reviewed-on: https://chromium-review.googlesource.com/578554Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Stephen Lanham <slan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488237}
parent b83e1382
......@@ -393,7 +393,7 @@ group("cast_shell_lib") {
}
}
executable("cast_shell") {
cast_executable("cast_shell") {
sources = [
"app/cast_main.cc",
]
......
......@@ -17,7 +17,7 @@ source_set("platform_jni_loader") {
]
}
shared_library("libcast_shell_android") {
cast_shared_library("libcast_shell_android") {
sources = [
"//chromecast/app/android/cast_jni_loader.cc",
"cast_jni_registrar.cc",
......
......@@ -178,7 +178,7 @@ source_set("cast_sys_info") {
# Target for OEM partners to override sys_info shared library, i.e.
# libcast_sys_info_1.0.so.
shared_library("libcast_sys_info_1.0") {
cast_shared_library("libcast_sys_info_1.0") {
sources = [
"cast_sys_info_dummy.cc",
"cast_sys_info_dummy.h",
......
......@@ -68,3 +68,25 @@ if (chromecast_branding == "public") {
# reference for all GN files referencing a locales list. |locales| is declared
# in //build/config/locales.gni.
cast_locales = locales
# These templates are a temporary fix fo link libc++ into shared libraries and
# executables. These should be removed as soon as crbug.com/746091 is resolved.
template("cast_shared_library") {
shared_library(target_name) {
forward_variables_from(invoker, "*")
if (!defined(deps)) {
deps = []
}
deps += [ "//build/config:exe_and_shlib_deps" ]
}
}
template("cast_executable") {
executable(target_name) {
forward_variables_from(invoker, "*")
if (!defined(deps)) {
deps = []
}
deps += [ "//build/config:exe_and_shlib_deps" ]
}
}
......@@ -48,7 +48,7 @@ source_set("crash") {
}
}
executable("crash_uploader") {
cast_executable("crash_uploader") {
sources = [
"linux/crash_uploader.cc",
]
......
......@@ -53,7 +53,7 @@ source_set("graphics") {
}
}
shared_library("libcast_graphics_1.0") {
cast_shared_library("libcast_graphics_1.0") {
sources = [
"cast_egl_platform_default.cc",
"graphics_properties_default.cc",
......
......@@ -53,7 +53,7 @@ source_set("cast_media_android_dummy") {
# Target for OEM partners to override media shared library, i.e.
# libcast_media_1.0.so. This target is only used to build executables
# with correct linkage information.
shared_library("libcast_media_1.0") {
cast_shared_library("libcast_media_1.0") {
if (is_cast_desktop_build) {
deps = [
":default",
......
......@@ -17,7 +17,7 @@ declare_args() {
# Alsa must be used for these targets to build.
assert(use_alsa)
shared_library("libcast_media_1.0_audio") {
cast_shared_library("libcast_media_1.0_audio") {
sources = [
"cast_media_shlib.cc",
"media_codec_support_cast_audio.cc",
......@@ -162,7 +162,7 @@ source_set("test_support") {
# This is separate from ":governor" because the associated unittest needs
# to create a Governor directly (to use test functions).
shared_library("libcast_governor_1.0") {
cast_shared_library("libcast_governor_1.0") {
sources = [
"post_processors/governor_create.cc",
]
......@@ -186,7 +186,7 @@ source_set("governor") {
public_configs = [ "//chromecast/public:public_config" ]
}
shared_library("libcast_saturated_gain_1.0") {
cast_shared_library("libcast_saturated_gain_1.0") {
sources = [
"post_processors/saturated_gain.cc",
"post_processors/saturated_gain.h",
......
......@@ -37,7 +37,7 @@ test("cast_reboot_unittests") {
# Target for OEM partners to override reboot shared library, i.e.
# libcast_reboot_1.0.so.
shared_library("libcast_reboot_1.0") {
cast_shared_library("libcast_reboot_1.0") {
sources = [
"reboot_dummy.cc",
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment