diff options
author | kochi <kochi@chromium.org> | 2015-07-06 19:53:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-07 02:54:12 +0000 |
commit | 95d4b8b0e8343ff6baa31271e864640f09227a94 (patch) | |
tree | 4e4394f21ff3c5f76f0ba494b10c9b27e0b73870 | |
parent | b76befda7705dedbffcb01d8fdd3c4c3d1fbee97 (diff) | |
download | chromium_src-95d4b8b0e8343ff6baa31271e864640f09227a94.zip chromium_src-95d4b8b0e8343ff6baa31271e864640f09227a94.tar.gz chromium_src-95d4b8b0e8343ff6baa31271e864640f09227a94.tar.bz2 |
Fix is_component_build=false build for GN
The previous CL
https://codereview.chromium.org/1222653002
failed for GN when is_component_build=false.
The 'ldflags' settings was not properly propagated
to its library users. This corrects it so that
the flag is propagated for linking final chrome executable.
libgtk2ui is the only user in Chromium, so any user of
libgtk2ui gets fixed by this.
BUG=462689
Review URL: https://codereview.chromium.org/1218623003
Cr-Commit-Position: refs/heads/master@{#337550}
-rw-r--r-- | chrome/browser/ui/libgtk2ui/BUILD.gn | 7 | ||||
-rw-r--r-- | third_party/harfbuzz-ng/BUILD.gn | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/chrome/browser/ui/libgtk2ui/BUILD.gn b/chrome/browser/ui/libgtk2ui/BUILD.gn index 4770c0a..b85f67d 100644 --- a/chrome/browser/ui/libgtk2ui/BUILD.gn +++ b/chrome/browser/ui/libgtk2ui/BUILD.gn @@ -68,6 +68,13 @@ component("libgtk2ui") { "//printing:cups", ] + # GTK2 pulls pangoft2 as dependency, and pangoft2 depends on harfbuzz. + # To avoid missing indirectly referenced harfbuzz symbols from pango, + # some hack is required when bundled harfbuzz is used and component build is + # disabled. + # See crbug.com/462689 for details. + all_dependent_configs = [ "//third_party/harfbuzz-ng:pangoft2_link_hack" ] + # gn orders flags on a target before flags from configs. The default config # adds -Wall, and these flags have to be after -Wall -- so they need to come # from a config and can't be on the target directly. diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn index 6f7af20..6e735ab 100644 --- a/third_party/harfbuzz-ng/BUILD.gn +++ b/third_party/harfbuzz-ng/BUILD.gn @@ -182,11 +182,17 @@ if (use_system_harfbuzz) { "src/hb-glib.cc", "src/hb-glib.h", ] - ldflags = [ + } + + # See also chrome/browser/ui/libgtk2ui/BUILD.gn which pulls this. + config("pangoft2_link_hack") { + if (is_linux && use_pango && !is_chromeos && !is_official_build && + current_cpu != "arm" && !is_component_build) { # These symbols are referenced from libpangoft2, which will be # dynamically linked later. - "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs", - ] + ldflags = + [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] + } } } } |