Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: build/config/chromecast/BUILD.gn

Issue 2023703002: Beginning work on GN build (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Really add //build. Add dart_bootstrap rule. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/chrome_build.gni ('k') | build/config/chromecast_build.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/chromecast/BUILD.gn
diff --git a/build/config/chromecast/BUILD.gn b/build/config/chromecast/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..f1cbfe61946fb68e18ab195dc1e3e9aae4012ad7
--- /dev/null
+++ b/build/config/chromecast/BUILD.gn
@@ -0,0 +1,69 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/chromecast_build.gni")
+
+assert(is_chromecast)
+
+config("static_config") {
+ ldflags = [
+ # We want to statically link libstdc++/libgcc.
+ "-static-libstdc++",
+ "-static-libgcc",
+
+ # Don't allow visible symbols from libraries that contain
+ # assembly code with symbols that aren't hidden properly.
+ # http://b/26390825
+ "-Wl,--exclude-libs=libffmpeg.a",
+ ]
+}
+
+config("ldconfig") {
+ visibility = [ ":*" ]
+
+ # Chromecast executables depend on several shared libraries in
+ # /oem_cast_shlib, $ORIGIN, and $ORIGIN/lib. Add these rpaths to each binary.
+ # This is explicitly disabled in Chrome for security reasons (see comments in
+ # //build/config/gcc/BUILD.gn), but necessary on Chromecast so that OEM's may
+ # override the default libraries shipped in the Cast receiver package.
+ ldflags = [
+ "-Wl,-rpath=/oem_cast_shlib",
+ "-Wl,-rpath=\$ORIGIN/lib",
+ "-Wl,-rpath=\$ORIGIN",
+ ]
+}
+
+config("executable_config") {
+ configs = [ ":ldconfig" ]
+
+ if (current_cpu == "arm") {
+ ldflags = [
+ # Export stdlibc++ and libgcc symbols to force shlibs to refer to these
+ # symbols from the executable.
+ "-Wl,--export-dynamic",
+
+ "-lm", # stdlibc++ requires math.h
+
+ # In case we redefined stdlibc++ symbols (e.g. tc_malloc)
+ "-Wl,--allow-multiple-definition",
+
+ "-Wl,--whole-archive",
+ "-l:libstdc++.a",
+ "-l:libgcc.a",
+ "-Wl,--no-whole-archive",
+ ]
+
+ # Despite including libstdc++/libgcc archives, we still need to specify
+ # static linking for them in order to prevent the executable from having a
+ # dynamic dependency on them.
+ configs += [ ":static_config" ]
+ }
+}
+
+config("shared_library_config") {
+ configs = [ ":ldconfig" ]
+ if (current_cpu == "arm") {
+ configs += [ ":static_config" ]
+ }
+}
« no previous file with comments | « build/config/chrome_build.gni ('k') | build/config/chromecast_build.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698