Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Mike Bjorge dd5adf3f10 [Chromecast] Don't set RUNPATH on shared_libraries.
The cast executables set RPATH. If shared_libraries set RUNPATH, this
can causes issues since the RUNPATH in the shard_lib suppresses the RPATH from
the parent executable, but libraries are placed such that the parent
binary RPATH will find them.

If RUNPATH/RPATH are not set on the shared_libraries, then the parent
RPATH gets used correctly.

BUG=internal b/37514052
TEST=build libcast_media_1.0.so
readelf -a libcast_media_1.0.so | grep PATH
RUNPATh and RPATH are not set

Change-Id: I3866ddd84ced393a3926b023160298054d9a4adb
Reviewed-on: https://chromium-review.googlesource.com/487827
Reviewed-by: Stephen Lanham <slan@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Mike Bjorge <mbjorge@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#467562}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b38b5bbfa9a59152bdb56a528c772715845b3e37
2017-04-27 03:14:09 +00:00
bcf 6aff78628a [Chromecast] Make static_config a noop for clang builds
Previously this was guarded with use_clang on shared_library_config, but
some targets use static_config directly.

BUG=b/37232530
TEST=Build and run device. Check {C/LD}FLAGS

Review-Url: https://codereview.chromium.org/2808253003
Cr-Original-Commit-Position: refs/heads/master@{#463795}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 58a97b349697f6764d0d0304a8374da957ef2207
2017-04-11 22:09:51 +00:00
bcf 6e87ab9e0d [Chromecast] Don't use static c++ libraries for clang builds
BUG=internal b/25696204
TEST=Build and run netflix on device

Review-Url: https://codereview.chromium.org/2726013002
Cr-Original-Commit-Position: refs/heads/master@{#455193}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e03d6f332a76e587d802634757c3e9e74778d5aa
2017-03-07 20:17:46 +00:00
slan e62b61f097 [Chromecast] Add /system/chrome to the rpath for component builds.
We recently hit a corner case on the component build from the following
dependency structure:
  /chrome/crash_uploader ("//chromecast/crash:crash_uploader") ->
  /chrome/lib/libcast_reboot_1.0.so ("//chromecast/system/reboot") ->
  /chrome/libnet.so ("//net")

In libcast_reboot_1.0.so's RPATH, $ORIGIN resolves to /chrome/lib,
meaning that it never searches /chrome/ for libnet.so, causing it to
crash. Explicitly adding the location of component libs to the RPATH
solves this issue.

Note: The RPATH will not be changed in production builds, which do not
use the component build.

BUG=

Change-Id: I0646a063ad787d3fe846fd0755f7f84a4cb6033b
Review-Url: https://codereview.chromium.org/2686903002
Cr-Original-Commit-Position: refs/heads/master@{#449130}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3301fc1e1974b51ccb59f24519de0dcde34b9333
2017-02-08 23:14:04 +00:00
thakis 6cbffcdc2a Enable -Werror for links in chromecast builds.
BUG=669076

Review-Url: https://codereview.chromium.org/2532193002
Cr-Original-Commit-Position: refs/heads/master@{#434755}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 21b2e5f86e4ac1ecd5bcc3da195cf2f7fd427eff
2016-11-28 22:55:12 +00:00
antz 68378cc90a Revert "[Chromecast] Only include all libstdc++/libgcc symbols in executable as needed"
Reason for revert:
The original fix is opt-in, which causes unit test binaries to miss symbols. I will
reimplement an opt-out for binaries that we do not want to whole-archive libs.

Original issue description:
>> All chromecast executable include all libstdc++/libgcc symbols by default
>> due to b/25566835. Added a config for --whole-archive for only ones that
>> depend on shared libs. ~700kb saving per executable.

BUG=internal b/31417380

This reverts commit 92947f235fcf22912990029925b4154e7ea08f74.

Review-Url: https://codereview.chromium.org/2334163004
Cr-Original-Commit-Position: refs/heads/master@{#418640}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 19adc908726781b299b441d3142f29143f234753
2016-09-14 19:39:39 +00:00
antz ac66e2635f [Chromecast] Only include all libstdc++/libgcc symbols in executable as needed
All chromecast executable include all libstdc++/libgcc symbols by default
due to b/25566835. Added a config for --whole-archive for only ones that
depend on shared libs. ~700kb saving per executable.

BUG=internal b/30398176

Review-Url: https://codereview.chromium.org/2288953002
Cr-Original-Commit-Position: refs/heads/master@{#416588}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 92947f235fcf22912990029925b4154e7ea08f74
2016-09-06 05:44:37 +00:00
slan a9b61398e2 [Chromecast][GN] Update Chromecast default rpath.
Update default rpath for Chromecast builds to include:
 * $ORIGIN
 * $ORIGIN/lib
 * /oem_cast_shlib

Verified by running executables on-device. Our scripts put shared libraries
in each of these three places.

BUG=516899
Bug: b/17615224

Review URL: https://codereview.chromium.org/1650233002

Cr-Original-Commit-Position: refs/heads/master@{#372464}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d909442b74ce4874f3032233b0e08846028c2cb
2016-01-29 23:29:26 +00:00
slan 80392cd14c [GN][Chromecast] Add "-Wl,-rpath=\$ORIGIN" to executable and shlib defaults.
Chromecast executables depend on several shared libraries in $ORIGIN for
platform and OEM abstraction. The rpath for executables should be
updated so that these libraries can be found at runtime. This logic is
added here, instead of //build/config/gcc:executable_ldconfig, to keep
Chromecast-specific configs as concentrated as possible.

A note about security concerns: Chrome only enables this by default for
component and sanitizer builds, never shipped builds. This is to protect
users from arbitrary binaries being run in the shared lib directory.
Chromecast does not share these concerns, as it only runs trusted web
applications in practice.

BUG=516899

Review URL: https://codereview.chromium.org/1639343002

Cr-Original-Commit-Position: refs/heads/master@{#371886}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 875b6f2a243ffbfb5bc3cd86f8ae97c3659c010d
2016-01-27 22:11:34 +00:00
wzhong 5b1df2a83c Fix typo
GN string needs double rather than single quote.

BUG=

Review URL: https://codereview.chromium.org/1576113005

Cr-Original-Commit-Position: refs/heads/master@{#368961}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f36b8e8274a5f07914c27a1abefb38f4c9a6ec24
2016-01-12 20:04:20 +00:00
wzhong c45169a0b7 [Chromecast] Don't export symbols from libffmpeg.a
Use "--exclude-libs" flag to prevent libffmpeg.a from exporting
symbols implemented by assembly.

Assembly functions marked with ".global" directive are automatically
with global visibility and exported in executable and DSO. This is
unnecessary and causes incorrect symbol resolution at run-time as
Chromecast executable is built with "-Wl,--export-dynamic".

BUG= internal b/26390825
TEST= 1) Use "nm" and make sure ff_* are not exported.
      2) Test TuneIn playback.

Review URL: https://codereview.chromium.org/1561833007

Cr-Original-Commit-Position: refs/heads/master@{#368737}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a39bee512a85a6a015769ced60015a2fe7d3d767
2016-01-12 00:43:52 +00:00
bcf f1a5305447 [Chromecast] GN - Only apply linker flags for arm
BUG= internal b/25566835

Review URL: https://codereview.chromium.org/1510973005

Cr-Original-Commit-Position: refs/heads/master@{#364489}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1c863d917bad2dac8aed686d8220fcaae3b466b6
2015-12-10 21:53:37 +00:00
bcf 23a285b6ef [Chromecast] Include all stdlibc++/libgcc symbols in cast executables.
For GN this change required refactoring the way default configs are
applied to executables and shared libraries. The targets
//build/config:{executable_config, shared_library_config} were
created for this purpose.

BUG= internal b/25566835

Review URL: https://codereview.chromium.org/1476923004

Cr-Original-Commit-Position: refs/heads/master@{#364118}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fbf4f9ac36e9e121620d65ca85dd998a67745049
2015-12-09 19:17:28 +00:00