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

Unified Diff: build/config/linux/pkg_config.gni

Issue 1564503002: Plumb system_libdir variable from GN to pkg-config.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved the comments Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/linux/pkg-config.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/linux/pkg_config.gni
diff --git a/build/config/linux/pkg_config.gni b/build/config/linux/pkg_config.gni
index 914ca8d6e728ae8eb3826e760246c6561fe28df6..58769e26958ac066b0ed729a8dae6452739b9728 100644
--- a/build/config/linux/pkg_config.gni
+++ b/build/config/linux/pkg_config.gni
@@ -31,6 +31,17 @@ declare_args() {
# Leaving it blank defaults to searching PATH for 'pkg-config' and relying on
# the sysroot mechanism to find the right .pc files.
pkg_config = ""
+
+ # CrOS systemroots place pkgconfig files at <systemroot>/usr/share/pkgconfig
+ # and one of <systemroot>/usr/lib/pkgconfig or <systemroot>/usr/lib64/pkgconfig
+ # depending on whether the systemroot is for a 32 or 64 bit architecture.
+ #
+ # When build under GYP, CrOS board builds specify the 'system_libdir' variable
+ # as part of the GYP_DEFINES provided by the CrOS emerge build or simple
+ # chrome build scheme. This variable permits controlling this for GN builds
+ # in similar fashion by setting the `system_libdir` variable in the build's
+ # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture.
+ system_libdir = "lib"
}
pkg_config_script = "//build/config/linux/pkg-config.py"
@@ -44,11 +55,15 @@ if (sysroot != "") {
sysroot,
"-a",
current_cpu,
+ "--system_libdir",
+ system_libdir,
]
} else if (pkg_config != "") {
pkg_config_args = [
"-p",
pkg_config,
+ "--system_libdir",
+ system_libdir,
]
} else {
pkg_config_args = []
« no previous file with comments | « build/config/linux/pkg-config.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698