
All of Chromium and third-party dependencies have been converted away from sources assignment filter, so update the documentation to say that the conversion is complete. Bug: 1018739 Change-Id: Ia47e6e6054744e5aeaccef638e5b081af1abdfe7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2471418 Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/master@{#817047}
1.0 KiB
1.0 KiB
No sources_assignment_filter
There is a strong consensus 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.
Since October 2020, the filter is no longer used.
Chromium build does not set a default sources assignment filter, and all build
files must manage sources
with explicit if
statements.
Explicit assignment
If you have a target that have platform specific implementation files, you can use the following pattern:
source_set("foo") {
sources = [
"foo.h",
]
if (is_mac) {
sources += [
"foo_mac.mm",
]
}
if (is_win) {
sources += [
"foo_win.cc",
]
}
if (is_linux) {
sources += [
"foo_linux.cc",
]
}
}