Commit 2e8aa0d1 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Convert //ui to not depend on set_sources_assignment_filter()

set_sources_assignment_filter() is considered as a mis-feature
of gn (as it makes it difficult to reason about the BUILD.gn
files individually).

Convert BUILD.gn files below //ui to instead use conditional
to include source files only on the platformn where they are
used.

The conversion was done by using a modified version of gn that
display all files filtered by set_sources_assignment_filter()
and updating the BUILD.gn files manually to explicitly add the
source files only on the platform that used them.

This CL was uploaded by git cl split.

Bug: 1018739
Change-Id: Ieda60fcfd3fc525d679d29b0f8665004abc8e730
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929822
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Robert Flack <flackr@chromium.org>
Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719548}
parent ac12dd4e
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
# See build/no_sources_assignment_filter.md for more information.
# TODO(crbug.com/1018739): remove this when migration is done.
set_sources_assignment_filter([])
if (is_android) { if (is_android) {
import("//build/config/android/config.gni") import("//build/config/android/config.gni")
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
...@@ -14,31 +20,38 @@ jumbo_component("animation") { ...@@ -14,31 +20,38 @@ jumbo_component("animation") {
sources = [ sources = [
"animation.cc", "animation.cc",
"animation.h", "animation.h",
"animation_android.cc",
"animation_container.cc", "animation_container.cc",
"animation_container.h", "animation_container.h",
"animation_container_element.h", "animation_container_element.h",
"animation_container_observer.h", "animation_container_observer.h",
"animation_delegate.h", "animation_delegate.h",
"animation_export.h", "animation_export.h",
"animation_mac.mm",
"animation_runner.cc", "animation_runner.cc",
"animation_runner.h", "animation_runner.h",
"animation_win.cc",
"linear_animation.cc", "linear_animation.cc",
"linear_animation.h", "linear_animation.h",
"multi_animation.cc", "multi_animation.cc",
"multi_animation.h", "multi_animation.h",
"slide_animation.cc", "slide_animation.cc",
"slide_animation.h", "slide_animation.h",
"throb_animation.cc",
"throb_animation.h",
"tween.cc", "tween.cc",
"tween.h", "tween.h",
] ]
if (is_android) { if (is_android) {
sources -= [ sources += [ "animation_android.cc" ]
}
if (is_mac) {
sources += [ "animation_mac.mm" ]
}
if (is_win) {
sources += [ "animation_win.cc" ]
}
if (!is_android) {
sources += [
"throb_animation.cc", "throb_animation.cc",
"throb_animation.h", "throb_animation.h",
] ]
......
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