Fix building without sysroot for ChromeOS device build
Explcitly link with libcups when building for ChromeOS device. cups-config is currently used from debian sysroot which does not makes sense for ChromeOS device builds. Without it, Chrome fails to build for ChromeOS device target. Bug: b:265165506 Change-Id: I75a64823c4d4d13161c3215218ffd76dcc7496bf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4157994 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Cr-Commit-Position: refs/heads/main@{#1096510}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
c93cdf07bc
commit
08fb9ab67b
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import("//build/config/chromeos/ui_mode.gni")
|
import("//build/config/chromeos/ui_mode.gni")
|
||||||
import("//build/config/features.gni")
|
import("//build/config/features.gni")
|
||||||
|
import("//build/config/linux/pkg_config.gni")
|
||||||
import("//build/config/sysroot.gni")
|
import("//build/config/sysroot.gni")
|
||||||
import("//build/config/ui.gni")
|
import("//build/config/ui.gni")
|
||||||
import("//pdf/features.gni")
|
import("//pdf/features.gni")
|
||||||
@@ -426,23 +427,29 @@ test("printing_unittests") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (use_cups) {
|
if (use_cups) {
|
||||||
config("cups") {
|
if (is_chromeos_device) {
|
||||||
if (is_mac) {
|
pkg_config("cups") {
|
||||||
libs = [ "cups" ]
|
packages = [ "cups" ]
|
||||||
lib_dirs = [ "$mac_sdk_path/usr/lib" ]
|
}
|
||||||
} else {
|
} else {
|
||||||
# rebase_path does not accept an empty string
|
config("cups") {
|
||||||
if (use_sysroot) {
|
if (is_mac) {
|
||||||
cups_sysroot = rebase_path(sysroot)
|
libs = [ "cups" ]
|
||||||
|
lib_dirs = [ "$mac_sdk_path/usr/lib" ]
|
||||||
} else {
|
} else {
|
||||||
cups_sysroot = ""
|
# rebase_path does not accept an empty string
|
||||||
|
if (use_sysroot) {
|
||||||
|
cups_sysroot = rebase_path(sysroot)
|
||||||
|
} else {
|
||||||
|
cups_sysroot = ""
|
||||||
|
}
|
||||||
|
libs = exec_script("cups_config_helper.py",
|
||||||
|
[
|
||||||
|
"--libs-for-gn",
|
||||||
|
cups_sysroot,
|
||||||
|
],
|
||||||
|
"value")
|
||||||
}
|
}
|
||||||
libs = exec_script("cups_config_helper.py",
|
|
||||||
[
|
|
||||||
"--libs-for-gn",
|
|
||||||
cups_sysroot,
|
|
||||||
],
|
|
||||||
"value")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user