Commit c0d0da84 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

Stop //remoting from using global filter for sources

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).

Change code in //remoting to check the platform before adding
plaform-specific source files to "sources" variable and clear
the filter to prevent regressions.

Bug: 1018739
Change-Id: I55117af22cc41733056bd570907d9540168e5ad1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416690
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: default avatarYuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808002}
parent bce500a8
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
import("//third_party/protobuf/proto_library.gni") import("//third_party/protobuf/proto_library.gni")
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
# See docs/no_sources_assignment_filter.md for more information.
# TODO(crbug.com/1018739): remove this when migration is done.
set_sources_assignment_filter([])
proto_library("protobuf_http_client_messages_proto") { proto_library("protobuf_http_client_messages_proto") {
sources = [ "protobuf_http_client_messages.proto" ] sources = [ "protobuf_http_client_messages.proto" ]
} }
...@@ -54,7 +60,6 @@ source_set("base") { ...@@ -54,7 +60,6 @@ source_set("base") {
"running_samples.h", "running_samples.h",
"scoped_protobuf_http_request.cc", "scoped_protobuf_http_request.cc",
"scoped_protobuf_http_request.h", "scoped_protobuf_http_request.h",
"scoped_sc_handle_win.h",
"service_urls.cc", "service_urls.cc",
"service_urls.h", "service_urls.h",
"session_options.cc", "session_options.cc",
...@@ -99,6 +104,10 @@ source_set("base") { ...@@ -99,6 +104,10 @@ source_set("base") {
"//third_party/webrtc_overrides:webrtc_component", "//third_party/webrtc_overrides:webrtc_component",
"//url", "//url",
] ]
if (is_win) {
sources += [ "scoped_sc_handle_win.h" ]
}
} }
source_set("authorization") { source_set("authorization") {
...@@ -129,20 +138,23 @@ source_set("authorization") { ...@@ -129,20 +138,23 @@ source_set("authorization") {
} }
source_set("breakpad") { source_set("breakpad") {
sources = [ sources = [ "breakpad.h" ]
"breakpad.h",
"breakpad_linux.cc",
"breakpad_mac.mm",
"breakpad_win.cc",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ] configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [ "//base" ] deps = [ "//base" ]
if (is_linux || is_chromeos) {
sources += [ "breakpad_linux.cc" ]
}
if (is_mac) { if (is_mac) {
sources += [ "breakpad_mac.mm" ]
deps += [ "//third_party/breakpad" ] deps += [ "//third_party/breakpad" ]
} else if (is_win) { }
if (is_win) {
sources += [ "breakpad_win.cc" ]
deps += [ "//third_party/breakpad:breakpad_handler" ] deps += [ "//third_party/breakpad:breakpad_handler" ]
} }
} }
...@@ -199,7 +211,6 @@ source_set("unit_tests") { ...@@ -199,7 +211,6 @@ source_set("unit_tests") {
sources = [ sources = [
"auto_thread_task_runner_unittest.cc", "auto_thread_task_runner_unittest.cc",
"auto_thread_unittest.cc", "auto_thread_unittest.cc",
"breakpad_win_unittest.cc",
"buffered_socket_writer_unittest.cc", "buffered_socket_writer_unittest.cc",
"capabilities_unittest.cc", "capabilities_unittest.cc",
"compound_buffer_unittest.cc", "compound_buffer_unittest.cc",
...@@ -233,6 +244,7 @@ source_set("unit_tests") { ...@@ -233,6 +244,7 @@ source_set("unit_tests") {
} }
if (is_win) { if (is_win) {
sources += [ "breakpad_win_unittest.cc" ]
libs = [ "rpcrt4.lib" ] # For UuidCreate in breakpad_win_unittest.cc. libs = [ "rpcrt4.lib" ] # For UuidCreate in breakpad_win_unittest.cc.
} }
} }
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
# See docs/no_sources_assignment_filter.md for more information.
# TODO(crbug.com/1018739): remove this when migration is done.
set_sources_assignment_filter([])
source_set("audio") { source_set("audio") {
sources = [ sources = [
"async_audio_data_supplier.cc", "async_audio_data_supplier.cc",
...@@ -13,8 +19,6 @@ source_set("audio") { ...@@ -13,8 +19,6 @@ source_set("audio") {
"audio_playback_stream.h", "audio_playback_stream.h",
"audio_player.cc", "audio_player.cc",
"audio_player.h", "audio_player.h",
"audio_player_android.cc",
"audio_player_android.h",
"audio_stream_format.cc", "audio_stream_format.cc",
"audio_stream_format.h", "audio_stream_format.h",
] ]
...@@ -30,6 +34,10 @@ source_set("audio") { ...@@ -30,6 +34,10 @@ source_set("audio") {
libs = [] libs = []
if (is_android) { if (is_android) {
sources += [
"audio_player_android.cc",
"audio_player_android.h",
]
libs += [ libs += [
"android", "android",
"OpenSLES", "OpenSLES",
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
# See docs/no_sources_assignment_filter.md for more information.
# TODO(crbug.com/1018739): remove this when migration is done.
set_sources_assignment_filter([])
source_set("input") { source_set("input") {
sources = [ sources = [
"client_input_injector.h", "client_input_injector.h",
...@@ -16,8 +22,6 @@ source_set("input") { ...@@ -16,8 +22,6 @@ source_set("input") {
"keycode_map.h", "keycode_map.h",
"native_device_keymap.cc", "native_device_keymap.cc",
"native_device_keymap.h", "native_device_keymap.h",
"native_device_keymap_android.cc",
"native_device_keymap_ios.cc",
"text_keyboard_input_strategy.cc", "text_keyboard_input_strategy.cc",
"text_keyboard_input_strategy.h", "text_keyboard_input_strategy.h",
"touch_input_scaler.cc", "touch_input_scaler.cc",
...@@ -36,6 +40,14 @@ source_set("input") { ...@@ -36,6 +40,14 @@ source_set("input") {
"//ui/events:dom_keycode_converter", "//ui/events:dom_keycode_converter",
] ]
if (is_android) {
sources += [ "native_device_keymap_android.cc" ]
}
if (is_ios) {
sources += [ "native_device_keymap_ios.cc" ]
}
if (is_android || is_ios) { if (is_android || is_ios) {
sources -= [ "native_device_keymap.cc" ] sources -= [ "native_device_keymap.cc" ]
} }
...@@ -44,7 +56,6 @@ source_set("input") { ...@@ -44,7 +56,6 @@ source_set("input") {
source_set("normalizing_input_filter") { source_set("normalizing_input_filter") {
# Disabled the source filters because there are _mac files that need to # Disabled the source filters because there are _mac files that need to
# be compiled on all platforms. # be compiled on all platforms.
set_sources_assignment_filter([])
sources = [ sources = [
"normalizing_input_filter_cros.cc", "normalizing_input_filter_cros.cc",
"normalizing_input_filter_cros.h", "normalizing_input_filter_cros.h",
...@@ -53,7 +64,6 @@ source_set("normalizing_input_filter") { ...@@ -53,7 +64,6 @@ source_set("normalizing_input_filter") {
"normalizing_input_filter_win.cc", "normalizing_input_filter_win.cc",
"normalizing_input_filter_win.h", "normalizing_input_filter_win.h",
] ]
set_sources_assignment_filter(sources_assignment_filter)
deps = [ deps = [
"//remoting/base", "//remoting/base",
...@@ -92,13 +102,11 @@ source_set("unit_tests") { ...@@ -92,13 +102,11 @@ source_set("unit_tests") {
source_set("normalizing_input_filter_unit_tests") { source_set("normalizing_input_filter_unit_tests") {
testonly = true testonly = true
set_sources_assignment_filter([])
sources = [ sources = [
"normalizing_input_filter_cros_unittest.cc", "normalizing_input_filter_cros_unittest.cc",
"normalizing_input_filter_mac_unittest.cc", "normalizing_input_filter_mac_unittest.cc",
"normalizing_input_filter_win_unittest.cc", "normalizing_input_filter_win_unittest.cc",
] ]
set_sources_assignment_filter(sources_assignment_filter)
configs += [ configs += [
"//remoting/build/config:version", "//remoting/build/config:version",
......
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