Skip to content

Commit e4cf40c

Browse files
committed
Merge pull request #304 from brave/fix_linux_build_error
Fix linux build error
1 parent 51897ba commit e4cf40c

File tree

6 files changed

+42
-13
lines changed

6 files changed

+42
-13
lines changed

browser/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ source_set("browser") {
101101

102102
deps = [
103103
"//brave/components/brave_shields/browser:brave_shields",
104-
"//brave/components/omnibox/browser:brave_autocomplete",
105104
"extensions",
106105
"net",
107106
]

chromium_src/chrome/common/channel_info_posix.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
#include "build/build_config.h"
1010
#include "components/version_info/version_info.h"
1111

12-
// Including here instead of build config because
13-
// our brave/common BUILD config still gets linking errors.
14-
#include "brave/common/brave_channel_info_posix.cc"
15-
1612
namespace chrome {
1713

1814
std::string GetChannelName() {

common/BUILD.gn

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
source_set("channel_info") {
2+
if (is_linux) {
3+
sources = [
4+
"brave_channel_info_posix.cc",
5+
"brave_channel_info_posix.h",
6+
]
7+
8+
configs += [
9+
"//brave/build/linux:linux_channel_names",
10+
]
11+
}
12+
}
13+
114
source_set("common") {
215
sources = [
316
"brave_paths.cc",
@@ -45,10 +58,6 @@ source_set("common") {
4558
"importer/brave_importer_utils_linux.cc",
4659
"importer/chrome_importer_utils_linux.cc",
4760
]
48-
49-
configs += [
50-
"//brave/build/linux:linux_channel_names",
51-
]
5261
}
5362

5463
if (is_win) {

components/omnibox/browser/BUILD.gn

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
source_set("brave_autocomplete") {
1+
source_set("browser") {
22
sources = [
33
"brave_autocomplete_controller.cc",
44
"brave_autocomplete_controller.h",
@@ -7,9 +7,10 @@ source_set("brave_autocomplete") {
77
"topsites_provider.h",
88
]
99

10+
# Don't make this target depends on chrome layer.
11+
# This target is compiled together with //components/omnibox/browser static lib.
1012
deps = [
11-
]
12-
public_deps = [
13-
"//chrome/common",
13+
"//skia",
14+
"//third_party/metrics_proto",
1415
]
1516
}

patches/chrome-common-BUILD.gn.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
2+
index 9a21e268447a0ea984101132329073dca486f6ad..a916c8e70e8f19a52f2a0993fc78712f8cb15778 100644
3+
--- a/chrome/common/BUILD.gn
4+
+++ b/chrome/common/BUILD.gn
5+
@@ -77,6 +77,7 @@ source_set("channel_info") {
6+
if (is_android) {
7+
public_deps += [ "//components/version_info/android:channel_getter" ]
8+
}
9+
+ if (brave_chromium_build) { deps = [ "//brave/common:channel_info" ] }
10+
}
11+
12+
source_set("ini_parser") {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn
2+
index c06139016ea7e4228c7442f4a1bd0ce0fc7c79bc..3b45fd207ba726dd6f1a23ac3992c83f6cf188e7 100644
3+
--- a/components/omnibox/browser/BUILD.gn
4+
+++ b/components/omnibox/browser/BUILD.gn
5+
@@ -194,6 +194,7 @@ static_library("browser") {
6+
"//ui/gfx",
7+
"//url",
8+
]
9+
+ if (brave_chromium_build) { deps += [ "//brave/components/omnibox/browser" ] }
10+
11+
if ((!is_android || enable_vr) && !is_ios) {
12+
sources += get_target_outputs(":omnibox_vector_icons")

0 commit comments

Comments
 (0)