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 @@
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") {
sources = [ "protobuf_http_client_messages.proto" ]
}
......@@ -54,7 +60,6 @@ source_set("base") {
"running_samples.h",
"scoped_protobuf_http_request.cc",
"scoped_protobuf_http_request.h",
"scoped_sc_handle_win.h",
"service_urls.cc",
"service_urls.h",
"session_options.cc",
......@@ -99,6 +104,10 @@ source_set("base") {
"//third_party/webrtc_overrides:webrtc_component",
"//url",
]
if (is_win) {
sources += [ "scoped_sc_handle_win.h" ]
}
}
source_set("authorization") {
......@@ -129,20 +138,23 @@ source_set("authorization") {
}
source_set("breakpad") {
sources = [
"breakpad.h",
"breakpad_linux.cc",
"breakpad_mac.mm",
"breakpad_win.cc",
]
sources = [ "breakpad.h" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [ "//base" ]
if (is_linux || is_chromeos) {
sources += [ "breakpad_linux.cc" ]
}
if (is_mac) {
sources += [ "breakpad_mac.mm" ]
deps += [ "//third_party/breakpad" ]
} else if (is_win) {
}
if (is_win) {
sources += [ "breakpad_win.cc" ]
deps += [ "//third_party/breakpad:breakpad_handler" ]
}
}
......@@ -199,7 +211,6 @@ source_set("unit_tests") {
sources = [
"auto_thread_task_runner_unittest.cc",
"auto_thread_unittest.cc",
"breakpad_win_unittest.cc",
"buffered_socket_writer_unittest.cc",
"capabilities_unittest.cc",
"compound_buffer_unittest.cc",
......@@ -233,6 +244,7 @@ source_set("unit_tests") {
}
if (is_win) {
sources += [ "breakpad_win_unittest.cc" ]
libs = [ "rpcrt4.lib" ] # For UuidCreate in breakpad_win_unittest.cc.
}
}
......@@ -2,6 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# 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") {
sources = [
"async_audio_data_supplier.cc",
......@@ -13,8 +19,6 @@ source_set("audio") {
"audio_playback_stream.h",
"audio_player.cc",
"audio_player.h",
"audio_player_android.cc",
"audio_player_android.h",
"audio_stream_format.cc",
"audio_stream_format.h",
]
......@@ -30,6 +34,10 @@ source_set("audio") {
libs = []
if (is_android) {
sources += [
"audio_player_android.cc",
"audio_player_android.h",
]
libs += [
"android",
"OpenSLES",
......
......@@ -2,6 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# 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") {
sources = [
"client_input_injector.h",
......@@ -16,8 +22,6 @@ source_set("input") {
"keycode_map.h",
"native_device_keymap.cc",
"native_device_keymap.h",
"native_device_keymap_android.cc",
"native_device_keymap_ios.cc",
"text_keyboard_input_strategy.cc",
"text_keyboard_input_strategy.h",
"touch_input_scaler.cc",
......@@ -36,6 +40,14 @@ source_set("input") {
"//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) {
sources -= [ "native_device_keymap.cc" ]
}
......@@ -44,7 +56,6 @@ source_set("input") {
source_set("normalizing_input_filter") {
# Disabled the source filters because there are _mac files that need to
# be compiled on all platforms.
set_sources_assignment_filter([])
sources = [
"normalizing_input_filter_cros.cc",
"normalizing_input_filter_cros.h",
......@@ -53,7 +64,6 @@ source_set("normalizing_input_filter") {
"normalizing_input_filter_win.cc",
"normalizing_input_filter_win.h",
]
set_sources_assignment_filter(sources_assignment_filter)
deps = [
"//remoting/base",
......@@ -92,13 +102,11 @@ source_set("unit_tests") {
source_set("normalizing_input_filter_unit_tests") {
testonly = true
set_sources_assignment_filter([])
sources = [
"normalizing_input_filter_cros_unittest.cc",
"normalizing_input_filter_mac_unittest.cc",
"normalizing_input_filter_win_unittest.cc",
]
set_sources_assignment_filter(sources_assignment_filter)
configs += [
"//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