Commit 224ef734 authored by Sean McAllister's avatar Sean McAllister Committed by Commit Bot

Rewrite is_linux flag for device, gpu, and media directories.

This migrates is_linux (which is also set for chromeos) to explicitly
include chromeos as is_linux || is_chromeos in preparation for
separating those flags.

Bug: 1110266
Change-Id: I019e775b7ecd01c6a1c401c13d9a29abd35ad170
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2326290Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@google.com>
Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Reviewed-by: default avatarMatt Reynolds <mattreynolds@chromium.org>
Reviewed-by: default avatarHidehiko Abe <hidehiko@chromium.org>
Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Commit-Queue: Sean McAllister <smcallis@google.com>
Cr-Commit-Position: refs/heads/master@{#794605}
parent 3f186bd4
...@@ -15,7 +15,7 @@ if (is_mac) { ...@@ -15,7 +15,7 @@ if (is_mac) {
import("//build/config/mac/mac_sdk.gni") import("//build/config/mac/mac_sdk.gni")
} }
is_linux_without_udev = is_linux && !use_udev is_linux_without_udev = (is_linux || is_chromeos) && !use_udev
test("device_unittests") { test("device_unittests") {
sources = [ sources = [
...@@ -227,7 +227,7 @@ test("device_unittests") { ...@@ -227,7 +227,7 @@ test("device_unittests") {
} }
} }
if (is_linux) { if (is_linux || is_chromeos) {
if (is_chromecast) { if (is_chromecast) {
# Cast does not support GATT server mode. # Cast does not support GATT server mode.
sources -= [ sources -= [
......
...@@ -23,7 +23,7 @@ config("bluetooth_config") { ...@@ -23,7 +23,7 @@ config("bluetooth_config") {
"/DELAYLOAD:setupapi.dll", "/DELAYLOAD:setupapi.dll",
] ]
} }
if (is_linux && is_chromecast) { if ((is_linux || is_chromeos) && is_chromecast) {
defines = [ "USE_CAST_BLUETOOTH_ADAPTER" ] defines = [ "USE_CAST_BLUETOOTH_ADAPTER" ]
} }
} }
...@@ -378,7 +378,7 @@ component("bluetooth") { ...@@ -378,7 +378,7 @@ component("bluetooth") {
"dbus/bluez_dbus_manager.cc", "dbus/bluez_dbus_manager.cc",
"dbus/bluez_dbus_manager.h", "dbus/bluez_dbus_manager.h",
] ]
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ sources += [
"dbus/bluez_dbus_thread_manager.cc", "dbus/bluez_dbus_thread_manager.cc",
"dbus/bluez_dbus_thread_manager.h", "dbus/bluez_dbus_thread_manager.h",
...@@ -438,7 +438,7 @@ component("bluetooth") { ...@@ -438,7 +438,7 @@ component("bluetooth") {
} }
deps += [ "//dbus" ] deps += [ "//dbus" ]
} else { # !use_dbus } else { # !use_dbus
if (is_chromecast && is_linux) { if (is_chromecast && (is_linux || is_chromeos)) {
sources += [ sources += [
"cast/bluetooth_adapter_cast.cc", "cast/bluetooth_adapter_cast.cc",
"cast/bluetooth_adapter_cast.h", "cast/bluetooth_adapter_cast.h",
...@@ -464,7 +464,7 @@ component("bluetooth") { ...@@ -464,7 +464,7 @@ component("bluetooth") {
sources += [ "bluetooth_adapter_stub.cc" ] sources += [ "bluetooth_adapter_stub.cc" ]
} }
if (is_linux) { if (is_linux || is_chromeos) {
defines += [ "LINUX_WITHOUT_DBUS" ] defines += [ "LINUX_WITHOUT_DBUS" ]
sources += [ sources += [
"dbus/dbus_bluez_manager_wrapper_linux.h", "dbus/dbus_bluez_manager_wrapper_linux.h",
......
...@@ -333,7 +333,7 @@ fuzzer_test("fido_cable_handshake_handler_v2_fuzzer") { ...@@ -333,7 +333,7 @@ fuzzer_test("fido_cable_handshake_handler_v2_fuzzer") {
libfuzzer_options = [ "max_len=2048" ] libfuzzer_options = [ "max_len=2048" ]
} }
is_linux_without_udev = is_linux && !use_udev is_linux_without_udev = (is_linux || is_chromeos) && !use_udev
source_set("test_support") { source_set("test_support") {
testonly = true testonly = true
......
...@@ -113,7 +113,7 @@ component("gamepad") { ...@@ -113,7 +113,7 @@ component("gamepad") {
[ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit). [ "/wd4267" ] # conversion from 'size_t' (64 bit) to 'type'(32 bit).
} }
if (is_linux) { if (is_linux || is_chromeos) {
if (use_udev) { if (use_udev) {
deps += [ "//device/udev_linux" ] deps += [ "//device/udev_linux" ]
} else { } else {
......
...@@ -12,7 +12,7 @@ import("//testing/test.gni") ...@@ -12,7 +12,7 @@ import("//testing/test.gni")
import("//tools/grit/grit_rule.gni") import("//tools/grit/grit_rule.gni")
import("//tools/v8_context_snapshot/v8_context_snapshot.gni") import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
if (is_linux) { if (is_linux || is_chromeos) {
import("//build/linux/extract_symbols.gni") import("//build/linux/extract_symbols.gni")
} }
...@@ -246,7 +246,7 @@ source_set("app_shell_lib") { ...@@ -246,7 +246,7 @@ source_set("app_shell_lib") {
"//ppapi/shared_impl:shared_impl", "//ppapi/shared_impl:shared_impl",
] ]
if (is_linux) { if (is_linux || is_chromeos) {
deps += [ "//components/nacl/loader:nacl_helper" ] deps += [ "//components/nacl/loader:nacl_helper" ]
if (enable_nacl_nonsfi) { if (enable_nacl_nonsfi) {
......
...@@ -157,7 +157,7 @@ if (!use_static_angle) { ...@@ -157,7 +157,7 @@ if (!use_static_angle) {
libs += [ "android" ] libs += [ "android" ]
deps += [ "//ui/android:ui_java" ] deps += [ "//ui/android:ui_java" ]
} }
if (is_linux && !is_component_build) { if ((is_linux || is_chromeos) && !is_component_build) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
} }
...@@ -585,7 +585,7 @@ test("gpu_unittests") { ...@@ -585,7 +585,7 @@ test("gpu_unittests") {
] ]
} }
if (is_linux || use_ozone) { if (is_linux || is_chromeos || use_ozone) {
sources += [ sources += [
"ipc/common/gpu_memory_buffer_impl_native_pixmap_unittest.cc", "ipc/common/gpu_memory_buffer_impl_native_pixmap_unittest.cc",
"ipc/service/gpu_memory_buffer_factory_native_pixmap_unittest.cc", "ipc/service/gpu_memory_buffer_factory_native_pixmap_unittest.cc",
...@@ -605,13 +605,13 @@ test("gpu_unittests") { ...@@ -605,13 +605,13 @@ test("gpu_unittests") {
] ]
} }
if (is_linux || is_android || is_chromeos) { if (is_linux || is_chromeos || is_android || is_chromeos) {
sources += [ "command_buffer/service/gpu_fence_manager_unittest.cc" ] sources += [ "command_buffer/service/gpu_fence_manager_unittest.cc" ]
} }
# TODO(geofflang): Run passthrough command decoder unittests on more platforms # TODO(geofflang): Run passthrough command decoder unittests on more platforms
# once initialization of ANGLE's NULL context is supported # once initialization of ANGLE's NULL context is supported
if ((is_win || (is_linux && !use_ozone)) && !is_asan) { if ((is_win || ((is_linux || is_chromeos) && !use_ozone)) && !is_asan) {
sources += [ sources += [
"command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc", "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc",
"command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc", "command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc",
...@@ -769,7 +769,7 @@ fuzzer_test("gpu_fuzzer") { ...@@ -769,7 +769,7 @@ fuzzer_test("gpu_fuzzer") {
libfuzzer_options = [ "max_len=16384" ] libfuzzer_options = [ "max_len=16384" ]
} }
if (is_linux) { if (is_linux || is_chromeos) {
fuzzer_test("gpu_angle_fuzzer") { fuzzer_test("gpu_angle_fuzzer") {
sources = [ "command_buffer/tests/fuzzer_main.cc" ] sources = [ "command_buffer/tests/fuzzer_main.cc" ]
......
...@@ -340,7 +340,7 @@ target(link_target_type, "gles2_sources") { ...@@ -340,7 +340,7 @@ target(link_target_type, "gles2_sources") {
"//gpu/vulkan", "//gpu/vulkan",
] ]
if (is_linux || is_fuchsia || is_android || is_win) { if (is_linux || is_chromeos || is_fuchsia || is_android || is_win) {
sources += [ sources += [
"external_semaphore.cc", "external_semaphore.cc",
"external_semaphore.h", "external_semaphore.h",
...@@ -368,7 +368,7 @@ target(link_target_type, "gles2_sources") { ...@@ -368,7 +368,7 @@ target(link_target_type, "gles2_sources") {
] ]
} }
if (is_linux && use_dawn) { if ((is_linux || is_chromeos) && use_dawn) {
sources += [ sources += [
"external_vk_image_dawn_representation.cc", "external_vk_image_dawn_representation.cc",
"external_vk_image_dawn_representation.h", "external_vk_image_dawn_representation.h",
......
...@@ -216,7 +216,7 @@ jumbo_source_set("config_sources") { ...@@ -216,7 +216,7 @@ jumbo_source_set("config_sources") {
if (is_mac) { if (is_mac) {
frameworks = [ "OpenGL.framework" ] frameworks = [ "OpenGL.framework" ]
} }
if (is_linux || is_mac) { if (is_linux || is_chromeos || is_mac) {
deps += [ "//third_party/angle:angle_gpu_info_util" ] deps += [ "//third_party/angle:angle_gpu_info_util" ]
} }
if (use_x11) { if (use_x11) {
......
...@@ -59,7 +59,7 @@ executable("gles2_conform_support") { ...@@ -59,7 +59,7 @@ executable("gles2_conform_support") {
"//gpu/gles2_conform_support/egl", "//gpu/gles2_conform_support/egl",
"//ui/gl", "//ui/gl",
] ]
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ sources += [
"native/egl_native_aura.cc", "native/egl_native_aura.cc",
"native/egl_native_x11.cc", "native/egl_native_x11.cc",
......
...@@ -20,7 +20,7 @@ source_set("native") { ...@@ -20,7 +20,7 @@ source_set("native") {
"//gpu/gles2_conform_support/egl", "//gpu/gles2_conform_support/egl",
"//ui/gl", "//ui/gl",
] ]
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ sources += [
"egl_native_aura.cc", "egl_native_aura.cc",
"egl_native_x11.cc", "egl_native_x11.cc",
......
...@@ -98,7 +98,7 @@ source_set("ipc_common_sources") { ...@@ -98,7 +98,7 @@ source_set("ipc_common_sources") {
"gpu_memory_buffer_impl_dxgi.h", "gpu_memory_buffer_impl_dxgi.h",
] ]
} }
if (is_linux || use_ozone) { if (is_linux || is_chromeos || use_ozone) {
sources += [ sources += [
"gpu_memory_buffer_impl_native_pixmap.cc", "gpu_memory_buffer_impl_native_pixmap.cc",
"gpu_memory_buffer_impl_native_pixmap.h", "gpu_memory_buffer_impl_native_pixmap.h",
......
...@@ -124,10 +124,10 @@ jumbo_component("service") { ...@@ -124,10 +124,10 @@ jumbo_component("service") {
] ]
libs += [ "android" ] libs += [ "android" ]
} }
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ "image_transport_surface_linux.cc" ] sources += [ "image_transport_surface_linux.cc" ]
} }
if (is_linux || use_ozone) { if (is_linux || is_chromeos || use_ozone) {
sources += [ sources += [
"gpu_memory_buffer_factory_native_pixmap.cc", "gpu_memory_buffer_factory_native_pixmap.cc",
"gpu_memory_buffer_factory_native_pixmap.h", "gpu_memory_buffer_factory_native_pixmap.h",
......
...@@ -44,7 +44,7 @@ if (internal_khronos_glcts_tests) { ...@@ -44,7 +44,7 @@ if (internal_khronos_glcts_tests) {
"GTF_API=GTF_GLES20", "GTF_API=GTF_GLES20",
] ]
if (is_linux) { if (is_linux || is_chromeos) {
defines += [ "_XOPEN_SOURCE=500" ] defines += [ "_XOPEN_SOURCE=500" ]
} }
} }
...@@ -79,7 +79,7 @@ if (internal_khronos_glcts_tests) { ...@@ -79,7 +79,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":debase_config" ] public_configs = [ ":debase_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_c = [ "-Wno-implicit-function-declaration" ] cflags_c = [ "-Wno-implicit-function-declaration" ]
} }
} }
...@@ -147,7 +147,7 @@ if (internal_khronos_glcts_tests) { ...@@ -147,7 +147,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":dethread_config" ] public_configs = [ ":dethread_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ sources += [
"//third_party/khronos_glcts/framework/delibs/dethread/unix/deMutexUnix.c", "//third_party/khronos_glcts/framework/delibs/dethread/unix/deMutexUnix.c",
"//third_party/khronos_glcts/framework/delibs/dethread/unix/deSemaphoreUnix.c", "//third_party/khronos_glcts/framework/delibs/dethread/unix/deSemaphoreUnix.c",
...@@ -194,7 +194,7 @@ if (internal_khronos_glcts_tests) { ...@@ -194,7 +194,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":deutil_config" ] public_configs = [ ":deutil_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_c = [ "-Wno-string-conversion" ] cflags_c = [ "-Wno-string-conversion" ]
} }
} }
...@@ -306,7 +306,7 @@ if (internal_khronos_glcts_tests) { ...@@ -306,7 +306,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":qphelper_config" ] public_configs = [ ":qphelper_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_c = [ "-Wno-string-conversion" ] cflags_c = [ "-Wno-string-conversion" ]
} }
} }
...@@ -394,7 +394,7 @@ if (internal_khronos_glcts_tests) { ...@@ -394,7 +394,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":tcutil_config" ] public_configs = [ ":tcutil_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_cc = [ "-Wno-int-to-pointer-cast" ] cflags_cc = [ "-Wno-int-to-pointer-cast" ]
} }
} }
...@@ -532,7 +532,7 @@ if (internal_khronos_glcts_tests) { ...@@ -532,7 +532,7 @@ if (internal_khronos_glcts_tests) {
"//third_party/khronos:khronos_headers", "//third_party/khronos:khronos_headers",
] ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_cc = [ "-Wno-int-to-void-pointer-cast" ] cflags_cc = [ "-Wno-int-to-void-pointer-cast" ]
} }
} }
...@@ -611,7 +611,7 @@ if (internal_khronos_glcts_tests) { ...@@ -611,7 +611,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":glcts_common_config" ] public_configs = [ ":glcts_common_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_cc = [ "-Wno-string-conversion" ] cflags_cc = [ "-Wno-string-conversion" ]
} }
} }
...@@ -819,7 +819,7 @@ if (internal_khronos_glcts_tests) { ...@@ -819,7 +819,7 @@ if (internal_khronos_glcts_tests) {
public_configs = [ ":gtf_es_config" ] public_configs = [ ":gtf_es_config" ]
if (is_linux) { if (is_linux || is_chromeos) {
cflags_c = [ cflags_c = [
"-Wno-pointer-sign", "-Wno-pointer-sign",
"-Wno-incompatible-pointer-types", "-Wno-incompatible-pointer-types",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import("//build/config/ui.gni") import("//build/config/ui.gni")
if (is_linux && use_x11 && current_cpu != "arm") { if ((is_linux || is_chromeos) && use_x11 && current_cpu != "arm") {
executable("compositor_model_bench") { executable("compositor_model_bench") {
sources = [ sources = [
"compositor_model_bench.cc", "compositor_model_bench.cc",
......
...@@ -8,7 +8,7 @@ import("//build/config/ui.gni") ...@@ -8,7 +8,7 @@ import("//build/config/ui.gni")
# For details see declare_args() in build/config/BUILDCONFIG.gn. # For details see declare_args() in build/config/BUILDCONFIG.gn.
declare_args() { declare_args() {
# Enable experimental vulkan backend. # Enable experimental vulkan backend.
enable_vulkan = is_linux || is_android || is_fuchsia || is_win enable_vulkan = is_linux || is_chromeos || is_android || is_fuchsia || is_win
# Enable swiftshader vulkan. Disabling it can save build time, however # Enable swiftshader vulkan. Disabling it can save build time, however
# --use-vulkan=swiftshader and some tests which use swiftshader vulkan will # --use-vulkan=swiftshader and some tests which use swiftshader vulkan will
......
...@@ -232,7 +232,7 @@ source_set("audio") { ...@@ -232,7 +232,7 @@ source_set("audio") {
] ]
} }
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ "linux/audio_manager_linux.cc" ] sources += [ "linux/audio_manager_linux.cc" ]
} }
......
...@@ -400,7 +400,7 @@ jumbo_source_set("base") { ...@@ -400,7 +400,7 @@ jumbo_source_set("base") {
defines += [ "DISABLE_USER_INPUT_MONITOR" ] defines += [ "DISABLE_USER_INPUT_MONITOR" ]
} }
if (is_linux || is_win) { if (is_linux || is_chromeos || is_win) {
sources += [ sources += [
"keyboard_event_counter.cc", "keyboard_event_counter.cc",
"keyboard_event_counter.h", "keyboard_event_counter.h",
...@@ -408,7 +408,7 @@ jumbo_source_set("base") { ...@@ -408,7 +408,7 @@ jumbo_source_set("base") {
} }
# Note: should also work on is_posix || is_fuchsia # Note: should also work on is_posix || is_fuchsia
if (is_linux) { if (is_linux || is_chromeos) {
sources += [ sources += [
"scopedfd_helper.cc", "scopedfd_helper.cc",
"scopedfd_helper.h", "scopedfd_helper.h",
...@@ -613,7 +613,7 @@ source_set("unit_tests") { ...@@ -613,7 +613,7 @@ source_set("unit_tests") {
deps += [ "//media/base/mac:unit_tests" ] deps += [ "//media/base/mac:unit_tests" ]
} }
if (is_linux || is_win) { if (is_linux || is_chromeos || is_win) {
sources += [ "keyboard_event_counter_unittest.cc" ] sources += [ "keyboard_event_counter_unittest.cc" ]
} }
if (is_win) { if (is_win) {
......
...@@ -227,7 +227,9 @@ jumbo_component("capture_lib") { ...@@ -227,7 +227,9 @@ jumbo_component("capture_lib") {
} }
# This includes the case of ChromeOS # This includes the case of ChromeOS
if (is_linux) { # TODO: As we move to separately version Chrome from ChromeOS, we may need to split
# these sources into linux, chromeos, and common.
if (is_linux || is_chromeos) {
sources += [ sources += [
"video/linux/camera_config_chromeos.cc", "video/linux/camera_config_chromeos.cc",
"video/linux/camera_config_chromeos.h", "video/linux/camera_config_chromeos.h",
......
...@@ -7,8 +7,8 @@ import("//testing/test.gni") ...@@ -7,8 +7,8 @@ import("//testing/test.gni")
assert(use_v4l2_codec || use_vaapi) assert(use_v4l2_codec || use_vaapi)
# V4L2 or Vaapi imply the OS is Linux. # V4L2 or Vaapi imply the OS is Linux or ChromeOS
assert(is_linux) assert(is_linux || is_chromeos)
# This target can depend on targets in //media/gpu/{v4l2,vaapi}. # This target can depend on targets in //media/gpu/{v4l2,vaapi}.
source_set("chromeos") { source_set("chromeos") {
......
...@@ -10,7 +10,7 @@ import("//tools/generate_stubs/rules.gni") ...@@ -10,7 +10,7 @@ import("//tools/generate_stubs/rules.gni")
import("//ui/gl/features.gni") import("//ui/gl/features.gni")
import("//ui/ozone/ozone.gni") import("//ui/ozone/ozone.gni")
assert(is_linux) # is_chromeos is a subset of is_linux assert(is_linux || is_chromeos)
assert(use_vaapi) assert(use_vaapi)
generate_stubs("libva_stubs") { generate_stubs("libva_stubs") {
......
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