summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 23:06:17 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 23:06:17 +0000
commit51f425785d503b53236c3597fd70bdc7d9b5ed27 (patch)
tree91ee53c7e02f0fee2e3ac7071c8e6eba5b5b88bd
parent164aa4ea183b18dbad33c2ab19bca9f1936153a2 (diff)
downloadchromium_src-51f425785d503b53236c3597fd70bdc7d9b5ed27.zip
chromium_src-51f425785d503b53236c3597fd70bdc7d9b5ed27.tar.gz
chromium_src-51f425785d503b53236c3597fd70bdc7d9b5ed27.tar.bz2
GN Windows build fixes
This also removes some patterns from the sources assignment filter, and adds scary comments not to make it bigger. The GYP version of this is out of control so I want to set a clear policy of what is included and not. I removed X-related stuff from the filter (there are only about 50 files around the tree) and added manual rules for the affected files. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/235983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263394 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/BUILD.gn14
-rw-r--r--build/config/BUILDCONFIG.gn21
-rw-r--r--skia/BUILD.gn15
-rw-r--r--skia/skia_gn_files.gypi1
-rw-r--r--third_party/libusb/BUILD.gn4
-rw-r--r--ui/events/BUILD.gn11
-rw-r--r--ui/gfx/BUILD.gn20
7 files changed, 74 insertions, 12 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn
index cc9500d..1eddbf7 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -788,13 +788,6 @@ component("base") {
linux_configs += [
"//build/config/linux:x11",
]
- } else {
- # On non-Linux platforms, the X11 files will already have been filtered
- # out using the sources assignment filter.
- sources -= [
- "message_loop/message_pump_x11.cc",
- "message_loop/message_pump_x11.h",
- ]
}
configs += linux_configs
@@ -819,6 +812,13 @@ component("base") {
]
}
+ if (!use_x11) {
+ sources -= [
+ "message_loop/message_pump_x11.cc",
+ "message_loop/message_pump_x11.h",
+ ]
+ }
+
if (!use_glib) {
sources -= [
"message_loop/message_pump_glib.cc",
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 350d880..57a3486 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -200,6 +200,8 @@ if (is_win) {
# muct match the pattern (so you need "*.cc" to match all .cc files, for
# example).
+# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call
+# below.
windows_sources_filters = [
"*_win.cc",
"*_win.h",
@@ -240,8 +242,6 @@ linux_sources_filters = [
"*_linux_unittest.h",
"*_linux_unittest.cc",
"*\blinux/*",
- "*_x11.cc",
- "*_x11.h",
]
android_sources_filters = [
"*_android.h",
@@ -257,6 +257,8 @@ posix_sources_filters = [
"*_posix_unittest.cc",
"*\bposix/*",
]
+# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call
+# below.
# Construct the full list of sources we're using for this platform.
sources_assignment_filter = []
@@ -281,7 +283,20 @@ if (!is_android) {
sources_assignment_filter += android_sources_filters
}
-# This is the actual set.
+# Actually save this list.
+#
+# DO NOT ADD MORE PATTERNS TO THIS LIST.
+#
+# These patterns are executed for every file in the source tree of every run.
+# Therefore, adding more patterns slows down the build for everybody. We should
+# only add automatic patterns for configurations affecting hundreds of files
+# across many projects in the tree.
+#
+# Therefore, we only add rules to this list corresponding to platforms on the
+# Chromium waterfall. This is not for non-officially-supported platforms
+# (FreeBSD, etc.) toolkits, (X11, GTK, etc.), or features. For these cases,
+# write a conditional in the target to remove the file(s) from the list when
+# your platform/toolkit/feature doesn't apply.
set_sources_assignment_filter(sources_assignment_filter)
# =============================================================================
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index 8e924b6..904e8b8 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/features.gni")
+import("//build/config/ui.gni")
if (cpu_arch == "arm") {
import("//build/config/arm.gni")
}
@@ -258,7 +259,6 @@ component("skia") {
"//third_party/skia/src/ports/SkFontHost_win_dw.cpp",
"//third_party/skia/src/ports/SkFontMgr_default_gdi.cpp",
"//third_party/skia/src/ports/SkOSFile_win.cpp",
- "//third_party/skia/src/ports/SkThread_win.cpp",
"//third_party/skia/src/ports/SkTLS_win.cpp",
"//third_party/skia/src/utils/SkThreadUtils_win.cpp",
]
@@ -281,6 +281,7 @@ component("skia") {
"//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
"//third_party/skia/src/ports/SkFontHost_fontconfig.cpp",
"//third_party/skia/src/ports/SkFontHost_linux.cpp",
+ "//third_party/skia/src/utils/SkThreadUtils_pthread_linux.cpp",
]
} else if (!is_android) {
sources -= [
@@ -288,6 +289,18 @@ component("skia") {
"//third_party/skia/src/fonts/SkFontMgr_fontconfig.cpp",
]
}
+ if (!is_posix) {
+ sources -= [
+ "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
+ ]
+ }
+
+ if (!use_cairo) {
+ sources -= [
+ "ext/bitmap_platform_device_cairo.cc",
+ "ext/bitmap_platform_device_cairo.h",
+ ]
+ }
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
diff --git a/skia/skia_gn_files.gypi b/skia/skia_gn_files.gypi
index d8c7c2e..c2d41dc 100644
--- a/skia/skia_gn_files.gypi
+++ b/skia/skia_gn_files.gypi
@@ -789,7 +789,6 @@
'<(skia_src_path)/ports/SkOSFile_posix.cpp',
'<(skia_src_path)/ports/SkOSFile_stdio.cpp',
'<(skia_src_path)/ports/SkOSFile_win.cpp',
- '<(skia_src_path)/ports/SkThread_win.cpp',
'<(skia_src_path)/ports/SkTime_Unix.cpp',
'<(skia_src_path)/ports/SkTLS_pthread.cpp',
'<(skia_src_path)/ports/SkTLS_win.cpp',
diff --git a/third_party/libusb/BUILD.gn b/third_party/libusb/BUILD.gn
index 837e53c..27761ef 100644
--- a/third_party/libusb/BUILD.gn
+++ b/third_party/libusb/BUILD.gn
@@ -91,6 +91,10 @@ static_library("libusb") {
if (is_win) {
include_dirs += [ "src/msvc" ]
+ sources -= [
+ "src/libusb/os/poll_posix.c",
+ "src/libusb/os/threads_posix.c",
+ ]
} else {
include_dirs += [ "src" ]
sources -= [
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index a751655..1a50b81 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -54,6 +54,17 @@ component("events_base") {
if (use_x11) {
configs += [ "//build/config/linux:x11" ]
+ } else {
+ sources -= [
+ "keycodes/keyboard_code_conversion_x.cc",
+ "keycodes/keyboard_code_conversion_x.h",
+ "x/device_data_manager.cc",
+ "x/device_data_manager.h",
+ "x/device_list_cache_x.cc",
+ "x/device_list_cache_x.h",
+ "x/touch_factory_x11.cc",
+ "x/touch_factory_x11.h",
+ ]
}
}
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index 2062929..5f16feb 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -361,6 +361,17 @@ component("gfx") {
}
if (use_x11) {
configs += [ "//build/config/linux:x11" ]
+ } else {
+ sources -= [
+ "path_x11.cc",
+ "path_x11.h",
+ "x/x11_atom_cache.cc",
+ "x/x11_atom_cache.h",
+ "x/x11_error_tracker.cc",
+ "x/x11_error_tracker.h",
+ "x/x11_types.cc",
+ "x/x11_types.h",
+ ]
}
if (use_pango) {
sources -= [
@@ -368,6 +379,15 @@ component("gfx") {
"render_text_ozone.cc",
]
configs += [ "//build/config/linux:pangocairo" ]
+ } else {
+ sources -= [
+ "pango_util.cc",
+ "pango_util.h",
+ "platform_font_pango.cc",
+ "platform_font_pango.h",
+ "render_text_pango.cc",
+ "render_text_pango.h",
+ ]
}
}