1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
https://github.com/chromium/chromium/commit/570332aad61afab5d9d88a8438bae53ea28a298a
From: Noah Rose Ledesma <noahrose@google.com>
Date: Wed, 31 Jul 2024 17:59:12 +0000
Subject: [PATCH] Use libs instead of pkg_config for linux deps
pkg_config can cause builds to fail if the requested packages are not
present, regardless of if the lib is depended upon by the target being
built.
This issue can be avoided by setting 'libs' instead. I'm not sure why we
didn't do so in the first place.
Bug: 355967882
Change-Id: Ie5dc4c03b08d7c1e26458ea143f6dc812b670544
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5749680
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Commit-Queue: Noah Rose Ledesma <noahrose@google.com>
Cr-Commit-Position: refs/heads/main@{#1335558}
--- a/chrome/updater/BUILD.gn
+++ b/chrome/updater/BUILD.gn
@@ -367,9 +367,10 @@ if (is_win || is_mac || is_linux) {
"update_service_internal_impl_qualifying_linux.cc",
"update_usage_stats_task_linux.cc",
]
- public_configs = [
- "linux:libcurl",
- "linux:libsystemd",
+
+ libs = [
+ "curl",
+ "systemd",
]
}
}
@@ -1040,7 +1041,7 @@ if (is_win || is_mac || is_linux) {
data += [ "//chrome/test/data/updater/updater_qualification_app.crx" ]
data_deps += [ "//chrome/updater/linux:updater_test" ]
- public_configs = [ "linux:libsystemd" ]
+ libs = [ "systemd" ]
}
if (is_posix) {
--- a/chrome/updater/linux/BUILD.gn
+++ b/chrome/updater/linux/BUILD.gn
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/linux/pkg_config.gni")
import("//chrome/updater/zip.gni")
# This target builds the updater executable and unittests.
@@ -13,18 +12,10 @@ group("linux") {
]
}
-pkg_config("libcurl") {
- packages = [ "libcurl" ]
-}
-
-pkg_config("libsystemd") {
- packages = [ "libsystemd" ]
-}
-
source_set("updater_executable") {
sources = [ "main.cc" ]
deps = [ "//chrome/updater:base" ]
- public_configs = [ ":libsystemd" ]
+ libs = [ "systemd" ]
}
executable("updater") {
|