Commit 2cb0922d authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[USB] Exclude usb_ids.* compilation for Chrome under Android.

Clank build excludes usb_ids.*, but the source files (inlcude the giant
file usb_ids_gen.cc) still got compiled, even though its results are not
included in the final APK. This adds unnecessary work for Clank builds,
and creates overhead to Supersize archive command. This CL removes these
vacuous usb_ids.* compilation under Android. This speeds up Supersize
archive by about 20% (and probably shaves seconds from Clank build).

Bug: 779162
Change-Id: I4e4a9eb4274bfa9d298a5ce887179629a5cb6b7f
Reviewed-on: https://chromium-review.googlesource.com/740688
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512538}
parent 04940300
......@@ -158,7 +158,6 @@ test("device_unittests") {
"usb/public/cpp/filter_utils_unittest.cc",
"usb/usb_descriptors_unittest.cc",
"usb/usb_device_handle_unittest.cc",
"usb/usb_ids_unittest.cc",
"usb/usb_service_unittest.cc",
"usb/webusb_descriptors_unittest.cc",
]
......@@ -174,6 +173,7 @@ test("device_unittests") {
]
if (!is_android) {
sources += [ "usb/usb_ids_unittest.cc" ]
deps += [ "//device/hid" ]
}
}
......
......@@ -36,8 +36,6 @@ static_library("usb") {
"usb_device_win.h",
"usb_endpoint_android.cc",
"usb_endpoint_android.h",
"usb_ids.cc",
"usb_ids.h",
"usb_interface_android.cc",
"usb_interface_android.h",
"usb_service.cc",
......@@ -48,11 +46,9 @@ static_library("usb") {
"usb_service_win.h",
"webusb_descriptors.cc",
"webusb_descriptors.h",
generated_ids,
]
deps = [
":usb_device_ids",
"//base/third_party/dynamic_annotations",
"//components/device_event_log",
"//device/base",
......@@ -75,6 +71,13 @@ static_library("usb") {
if (is_android) {
deps += [ ":jni_headers" ]
} else {
deps += [ ":usb_device_ids" ]
sources += [
"usb_ids.cc",
"usb_ids.h",
generated_ids,
]
}
if (is_win || is_mac) {
......
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