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

Side by Side Diff: build/config/chromecast/BUILD.gn

Issue 1650233002: [Chromecast][GN] Update Chromecast default rpath. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add $ORIGIN/lib, concentrate rpaths. Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chromecast_build.gni") 5 import("//build/config/chromecast_build.gni")
6 6
7 assert(is_chromecast) 7 assert(is_chromecast)
8 8
9 config("static_config") { 9 config("static_config") {
10 ldflags = [ 10 ldflags = [
11 # We want to statically link libstdc++/libgcc. 11 # We want to statically link libstdc++/libgcc.
12 "-static-libstdc++", 12 "-static-libstdc++",
13 "-static-libgcc", 13 "-static-libgcc",
14 14
15 # Don't allow visible symbols from libraries that contain 15 # Don't allow visible symbols from libraries that contain
16 # assembly code with symbols that aren't hidden properly. 16 # assembly code with symbols that aren't hidden properly.
17 # http://b/26390825 17 # http://b/26390825
18 "-Wl,--exclude-libs=libffmpeg.a", 18 "-Wl,--exclude-libs=libffmpeg.a",
19 ] 19 ]
20 } 20 }
21 21
22 config("ldconfig") { 22 config("ldconfig") {
23 visibility = [ ":*" ] 23 visibility = [ ":*" ]
24 24
25 # Chromecast executables depend on several shared libraries in $ORIGIN. Add 25 # Chromecast executables depend on several shared libraries in
26 # $ORIGIN to the rpath of these executables. This is not inherited by default 26 # /oem_cast_shlib, $ORIGIN, and $ORIGIN/lib. Add these rpaths to each binary.
27 # when depending on these targets for security reasons (see comments in 27 # This is explicitly disabled in Chrome for security reasons (see comments in
28 # //build/config/gcc/BUILD.gn) 28 # //build/config/gcc/BUILD.gn), but necessary on Chromecast so that OEM's may
29 configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ] 29 # override the default libraries shipped in the Cast receiver package.
30 ldflags = [
31 "-Wl,-rpath=/oem_cast_shlib",
32 "-Wl,-rpath=\$ORIGIN/lib",
33 "-Wl,-rpath=\$ORIGIN",
34 ]
30 } 35 }
31 36
32 config("executable_config") { 37 config("executable_config") {
33 configs = [ ":ldconfig" ] 38 configs = [ ":ldconfig" ]
34 39
35 if (current_cpu == "arm") { 40 if (current_cpu == "arm") {
36 ldflags = [ 41 ldflags = [
37 # Export stdlibc++ and libgcc symbols to force shlibs to refer to these 42 # Export stdlibc++ and libgcc symbols to force shlibs to refer to these
38 # symbols from the executable. 43 # symbols from the executable.
39 "-Wl,--export-dynamic", 44 "-Wl,--export-dynamic",
(...skipping 15 matching lines...) Expand all
55 configs += [ ":static_config" ] 60 configs += [ ":static_config" ]
56 } 61 }
57 } 62 }
58 63
59 config("shared_library_config") { 64 config("shared_library_config") {
60 configs = [ ":ldconfig" ] 65 configs = [ ":ldconfig" ]
61 if (current_cpu == "arm") { 66 if (current_cpu == "arm") {
62 configs += [ ":static_config" ] 67 configs += [ ":static_config" ]
63 } 68 }
64 } 69 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698