Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linux build error #304

Merged
merged 2 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ source_set("browser") {

deps = [
"//brave/components/brave_shields/browser:brave_shields",
"//brave/components/omnibox/browser:brave_autocomplete",
"extensions",
"net",
]
Expand Down
4 changes: 0 additions & 4 deletions chromium_src/chrome/common/channel_info_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
#include "build/build_config.h"
#include "components/version_info/version_info.h"

// Including here instead of build config because
// our brave/common BUILD config still gets linking errors.
#include "brave/common/brave_channel_info_posix.cc"

namespace chrome {

std::string GetChannelName() {
Expand Down
17 changes: 13 additions & 4 deletions common/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
source_set("channel_info") {
if (is_linux) {
sources = [
"brave_channel_info_posix.cc",
"brave_channel_info_posix.h",
]

configs += [
"//brave/build/linux:linux_channel_names",
]
}
}

source_set("common") {
sources = [
"brave_paths.cc",
Expand Down Expand Up @@ -45,10 +58,6 @@ source_set("common") {
"importer/brave_importer_utils_linux.cc",
"importer/chrome_importer_utils_linux.cc",
]

configs += [
"//brave/build/linux:linux_channel_names",
]
}

if (is_win) {
Expand Down
9 changes: 5 additions & 4 deletions components/omnibox/browser/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source_set("brave_autocomplete") {
source_set("browser") {
sources = [
"brave_autocomplete_controller.cc",
"brave_autocomplete_controller.h",
Expand All @@ -7,9 +7,10 @@ source_set("brave_autocomplete") {
"topsites_provider.h",
]

# Don't make this target depends on chrome layer.
# This target is compiled together with //components/omnibox/browser static lib.
deps = [
]
public_deps = [
"//chrome/common",
"//skia",
"//third_party/metrics_proto",
]
}
12 changes: 12 additions & 0 deletions patches/chrome-common-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
index 9a21e268447a0ea984101132329073dca486f6ad..a916c8e70e8f19a52f2a0993fc78712f8cb15778 100644
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -77,6 +77,7 @@ source_set("channel_info") {
if (is_android) {
public_deps += [ "//components/version_info/android:channel_getter" ]
}
+ if (brave_chromium_build) { deps = [ "//brave/common:channel_info" ] }
}

source_set("ini_parser") {
12 changes: 12 additions & 0 deletions patches/components-omnibox-browser-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn
index c06139016ea7e4228c7442f4a1bd0ce0fc7c79bc..3b45fd207ba726dd6f1a23ac3992c83f6cf188e7 100644
--- a/components/omnibox/browser/BUILD.gn
+++ b/components/omnibox/browser/BUILD.gn
@@ -194,6 +194,7 @@ static_library("browser") {
"//ui/gfx",
"//url",
]
+ if (brave_chromium_build) { deps += [ "//brave/components/omnibox/browser" ] }

if ((!is_android || enable_vr) && !is_ios) {
sources += get_target_outputs(":omnibox_vector_icons")