Commit d19467df authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Remove now-unused deprecated_default_sources_assignment_filter \o/

Bug: 1018739
Change-Id: I710889166513273096968144299f35471d7c2cf0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2456507
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814676}
parent 3be31a27
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# =============================================================================
# SOURCES FILTERS
# =============================================================================
#
# These patterns filter out platform-specific files when assigning to the
# sources variable. The magic variable |sources_assignment_filter| is applied
# to each assignment or appending to the sources variable and matches are
# automatically removed.
#
# Note that the patterns are NOT regular expressions. Only "*" and "\b" (path
# boundary = end of string or slash) are supported, and the entire string
# must match the pattern (so you need "*.cc" to match all .cc files, for
# example).
# DO NOT ADD MORE PATTERNS TO THIS LIST, see https://crbug.com/1018739.
deprecated_default_sources_assignment_filter = []
if (!is_win) {
deprecated_default_sources_assignment_filter += [
"*_win.cc",
"*_win.h",
"*_win_unittest.cc",
"*\bwin/*",
"*.def",
"*.rc",
]
}
if (!is_mac) {
deprecated_default_sources_assignment_filter += [
"*_mac.h",
"*_mac.cc",
"*_mac.mm",
"*_mac_unittest.h",
"*_mac_unittest.cc",
"*_mac_unittest.mm",
"*\bmac/*",
"*_cocoa.h",
"*_cocoa.cc",
"*_cocoa.mm",
"*_cocoa_unittest.h",
"*_cocoa_unittest.cc",
"*_cocoa_unittest.mm",
"*\bcocoa/*",
]
}
if (!is_ios) {
deprecated_default_sources_assignment_filter += [
"*_ios.h",
"*_ios.cc",
"*_ios.mm",
"*_ios_unittest.h",
"*_ios_unittest.cc",
"*_ios_unittest.mm",
"*\bios/*",
]
}
if (!is_apple) {
deprecated_default_sources_assignment_filter += [ "*.mm" ]
}
if (!is_linux && !is_chromeos) {
deprecated_default_sources_assignment_filter += [
"*_linux.h",
"*_linux.cc",
"*_linux_unittest.h",
"*_linux_unittest.cc",
"*\blinux/*",
]
}
if (!is_android) {
deprecated_default_sources_assignment_filter += [
"*_android.h",
"*_android.cc",
"*_android_unittest.h",
"*_android_unittest.cc",
"*\bandroid/*",
]
}
if (!is_chromeos) {
deprecated_default_sources_assignment_filter += [
"*_chromeos.h",
"*_chromeos.cc",
"*_chromeos_unittest.h",
"*_chromeos_unittest.cc",
"*\bchromeos/*",
]
}
# DO NOT ADD MORE PATTERNS TO THIS LIST, see https://crbug.com/1018739.
# Actually save 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.
......@@ -4,6 +4,11 @@ There is a [strong][0] [consensus][1] that the set_sources_assignment_filter
feature from GN is a mis-feature and should be removed. This requires that
Chromium's BUILD.gn file stop using the feature.
This conversion is now complete. There are a few straggler calls to
`set_sources_assignment_filter([])` that are no longer needed, but
the Chromium build now no longer sets a default sources assignment filter,
and all build files must manage `sources` with explicit if statements.
## Why convert
When set_sources_assignment_filter is called, it configures a list of patterns
......@@ -27,8 +32,7 @@ had multiple drawbacks:
in the whole project, thus it has significant negative impact on the
performance of gn
Since September 2020, the filter is enabled only for the files that have not
yet been converted. Eventually, this will be removed.
Since October 2020, the filter is no longer used.
## Conversion pattern
......@@ -74,14 +78,5 @@ Since the second pattern never assign a name that will be filtered out, then
it is compatible whether the set_sources_assignment_filter feature is used or
not.
Once conversion is done, remove the following lines from the top of the file
to avoid regressions:
```
import("//build/config/deprecated_default_sources_assignment_filter.gni")
sources_assignment_filter = deprecated_default_sources_assignment_filter
```
[0]: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/hyLuCU6g2V4/discussion
[1]: https://groups.google.com/a/chromium.org/d/topic/gn-dev/oQcYStl_WkI/discussion
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment