New issue
Advanced search Search tips

Issue 843317 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Linux builds import -Wl,--export-dynamic ldflag from GModule pkconfig

Project Member Reported by vtsyrklevich@chromium.org, May 15 2018

Issue description

Right now the GModule pkgconfig in build/linux/*/usr/lib/pkgconfig/gmodule-2.0.pc and build/linux/*/usr/lib/pkgconfig/gmodule-export-2.0.pc includes the -Wl,--export-dynamic link flag which is then propagated to all other Linux builds due to gmodule being required by glib. This increases the size of nacl_helper by ~2%, though chrome seems to be unaffected. I don't believe we actually require -export-dynamic for anything, though I'm not sure.
 
Cc: thomasanderson@chromium.org
Thomas, are you the right person to ask about glib/pkgconfig? 1) Do you know wju -export-dynamic would be necessary? and 2) If it's not what would be the right way to remove it from our ldflags given that it's in the pkgconfig in the sysroot?
Owner: thomasanderson@chromium.org
Status: Assigned (was: Untriaged)
Cc: p...@chromium.org
Components: Build
Labels: -Pri-3 Pri-2
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f

commit 8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f
Author: Tom Anderson <thomasanderson@chromium.org>
Date: Fri Jun 01 04:28:30 2018

Don't allow dependencies to set ldflags via pkgconfig

Currently gmodule is the only package in the sysroot that sets an ldflag.  The
flag it adds is -Wl,--export-dynamic, which increases the size of nacl_helper by
~2%.  The chrome binary appears to be unaffected (possibly because a linker
script is used to limit which symbols get put into the dynamic symbol table).
Only Chromium build files should be allowed to add ldflags.

This CL adds a new global config: //build/config/linux:export_dynamic which is
removed in nacl_helper to reduce binary size.

BUG= 843317 
R=thestig,dpranke

Change-Id: Id23862483f7c4067a4a028cdc2fd19d91c0abbbe
Reviewed-on: https://chromium-review.googlesource.com/1065110
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Derek Schuff <dschuff@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563534}
[modify] https://crrev.com/8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f/build/config/BUILDCONFIG.gn
[modify] https://crrev.com/8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f/build/config/linux/BUILD.gn
[modify] https://crrev.com/8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f/build/config/linux/pkg-config.py
[modify] https://crrev.com/8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f/build/config/linux/pkg_config.gni
[modify] https://crrev.com/8b2aefd2ab65e6ab4f50aad7ab86e905bf1df51f/components/nacl/loader/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment