| OLD | NEW |
| 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. | |
| 12 "-static-libstdc++", | |
| 13 "-static-libgcc", | |
| 14 | |
| 15 # Don't allow visible symbols from libraries that contain | 11 # Don't allow visible symbols from libraries that contain |
| 16 # assembly code with symbols that aren't hidden properly. | 12 # assembly code with symbols that aren't hidden properly. |
| 17 # http://b/26390825 | 13 # http://b/26390825 |
| 18 "-Wl,--exclude-libs=libffmpeg.a", | 14 "-Wl,--exclude-libs=libffmpeg.a", |
| 19 ] | 15 ] |
| 16 |
| 17 if (!is_android) { |
| 18 ldflags += [ |
| 19 # We want to statically link libstdc++/libgcc on Linux. |
| 20 # (On Android, libstdc++ and libgcc aren't used.) |
| 21 "-static-libstdc++", |
| 22 "-static-libgcc", |
| 23 ] |
| 24 } |
| 20 } | 25 } |
| 21 | 26 |
| 22 config("ldconfig") { | 27 config("ldconfig") { |
| 23 visibility = [ ":*" ] | 28 visibility = [ ":*" ] |
| 24 | 29 |
| 25 # Chromecast executables depend on several shared libraries in | 30 # Chromecast executables depend on several shared libraries in |
| 26 # /oem_cast_shlib, $ORIGIN, and $ORIGIN/lib. Add these rpaths to each binary. | 31 # /oem_cast_shlib, $ORIGIN, and $ORIGIN/lib. Add these rpaths to each binary. |
| 27 # This is explicitly disabled in Chrome for security reasons (see comments in | 32 # This is explicitly disabled in Chrome for security reasons (see comments in |
| 28 # //build/config/gcc/BUILD.gn), but necessary on Chromecast so that OEM's may | 33 # //build/config/gcc/BUILD.gn), but necessary on Chromecast so that OEM's may |
| 29 # override the default libraries shipped in the Cast receiver package. | 34 # override the default libraries shipped in the Cast receiver package. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 60 configs += [ ":static_config" ] | 65 configs += [ ":static_config" ] |
| 61 } | 66 } |
| 62 } | 67 } |
| 63 | 68 |
| 64 config("shared_library_config") { | 69 config("shared_library_config") { |
| 65 configs = [ ":ldconfig" ] | 70 configs = [ ":ldconfig" ] |
| 66 if (current_cpu == "arm") { | 71 if (current_cpu == "arm") { |
| 67 configs += [ ":static_config" ] | 72 configs += [ ":static_config" ] |
| 68 } | 73 } |
| 69 } | 74 } |
| OLD | NEW |