Skip to content

Commit

Permalink
Rewrite is_linux flag for miscellaneous directories.
Browse files Browse the repository at this point in the history
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: I51be3638dab55a4b2bc933a1bb48ace81be51761
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2326291
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Eric Roman <eroman@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Sean McAllister <smcallis@google.com>
Cr-Commit-Position: refs/heads/master@{#793645}
  • Loading branch information
smcallis authored and Commit Bot committed Jul 31, 2020
1 parent 2e90cf4 commit 9c0cdcf
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion mojo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ group("mojo") {
testonly = true
deps = [ ":tests" ]

if (!(is_linux && current_cpu == "x86")) {
if (!((is_linux || is_chromeos) && current_cpu == "x86")) {
deps += [ "//mojo/public" ]
}

Expand Down
4 changes: 2 additions & 2 deletions mojo/core/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ source_set("run_all_unittests") {
"//testing/gtest",
]

if (is_linux && !is_component_build) {
if ((is_linux || is_chromeos) && !is_component_build) {
public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
Expand All @@ -65,7 +65,7 @@ source_set("run_all_perftests") {

sources = [ "run_all_perftests.cc" ]

if (is_linux && !is_component_build) {
if ((is_linux || is_chromeos) && !is_component_build) {
public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
}
}
Expand Down
4 changes: 2 additions & 2 deletions native_client_sdk/src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import("//components/nacl/features.gni")
declare_args() {
# Set to true if cross compiling trusted (e.g. building sel_ldr_arm on x86)
# binaries is supported.
enable_cross_trusted = is_linux
enable_cross_trusted = is_linux || is_chromeos

# Build the nacl SDK untrusted components. This is disabled by default since
# not all NaCl untrusted compilers are in goma (e.g arm-nacl-glibc)
Expand All @@ -28,7 +28,7 @@ if (enable_nacl) {
"//native_client/src/trusted/service_runtime:sel_ldr",
"//native_client/src/trusted/validator/driver:ncval_new",
]
if (is_linux) {
if (is_linux || is_chromeos) {
deps += [ "//native_client/src/nonsfi/loader:nonsfi_loader" ]
}
}
Expand Down
24 changes: 12 additions & 12 deletions net/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ net_configs = [
"//build/config/compiler:wexit_time_destructors",
]

if (is_linux) {
if (is_linux || is_chromeos) {
net_configs += [ "//build/config/linux:libresolv" ]
}

Expand Down Expand Up @@ -1239,7 +1239,7 @@ component("net") {
]
}

if (is_linux) {
if (is_linux && !is_chromeos) {
sources += [
"base/network_change_notifier_linux.cc",
"base/network_change_notifier_linux.h",
Expand All @@ -1248,7 +1248,7 @@ component("net") {
]
}

if (is_linux || is_android) {
if (is_linux || is_chromeos || is_android) {
sources += [
"base/address_tracker_linux.cc",
"base/address_tracker_linux.h",
Expand Down Expand Up @@ -1427,7 +1427,7 @@ component("net") {
}

# Use getifaddrs() on POSIX platforms, except Linux.
if (is_posix && !is_linux) {
if (is_posix && !is_linux && !is_chromeos) {
sources += [
"base/network_interfaces_getifaddrs.cc",
"base/network_interfaces_getifaddrs.h",
Expand Down Expand Up @@ -2457,7 +2457,7 @@ if (use_external_gssapi) {
}
}

if (is_linux || is_mac) {
if (is_linux || is_chromeos || is_mac) {
executable("cachetool") {
testonly = true
sources = [ "tools/cachetool/cachetool.cc" ]
Expand All @@ -2484,7 +2484,7 @@ if (is_linux || is_mac) {
}
}

if (is_linux) {
if (is_linux || is_chromeos) {
static_library("epoll_server") {
sources = [
"tools/epoll_server/platform/impl/epoll_bug_impl.h",
Expand Down Expand Up @@ -2560,7 +2560,7 @@ if (is_android) {
}
}

if (is_android || is_linux) {
if (is_android || is_linux || is_chromeos) {
executable("disk_cache_memory_test") {
testonly = true
sources = [ "tools/disk_cache_memory_test/disk_cache_memory_test.cc" ]
Expand Down Expand Up @@ -4474,7 +4474,7 @@ test("net_unittests") {
]
}

if (is_linux) {
if (is_linux || is_chromeos) {
sources += [
"base/address_tracker_linux_unittest.cc",
"base/network_interfaces_linux_unittest.cc",
Expand Down Expand Up @@ -4585,7 +4585,7 @@ test("net_unittests") {
"//testing/buildbot/filters:net_unittests_filters",
]

if (is_linux || is_mac || is_win || is_fuchsia) {
if (is_linux || is_chromeos || is_mac || is_win || is_fuchsia) {
deps += [
"//third_party/pywebsocket3/",
"//third_party/tlslite/",
Expand All @@ -4601,7 +4601,7 @@ test("net_unittests") {
]
}

if (is_linux) {
if (is_linux || is_chromeos) {
sources += [
"quic/platform/impl/quic_epoll_clock_test.cc",
"quic/platform/impl/quic_flags_test.cc",
Expand Down Expand Up @@ -4762,7 +4762,7 @@ test("net_unittests") {
}

# Use getifaddrs() on POSIX platforms, except Linux and Android.
if (is_posix && !is_linux && !is_android) {
if (is_posix && !is_linux && !is_chromeos && !is_android) {
sources += [ "base/network_interfaces_getifaddrs_unittest.cc" ]
}

Expand Down Expand Up @@ -5566,7 +5566,7 @@ fuzzer_test("net_uri_template_fuzzer") {
dict = "data/fuzzer_dictionaries/net_uri_template_fuzzer.dict"
}

if (is_linux) {
if (is_linux || is_chromeos) {
fuzzer_test("net_base_address_tracker_linux_fuzzer") {
sources = [ "base/address_tracker_linux_fuzzer.cc" ]
deps = [
Expand Down
2 changes: 1 addition & 1 deletion net/features.gni
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ declare_args() {
disable_brotli_filter = false

# Multicast DNS.
enable_mdns = is_win || is_linux || is_fuchsia || is_apple
enable_mdns = is_win || is_linux || is_chromeos || is_fuchsia || is_apple

# Reporting not used on iOS.
enable_reporting = !is_ios
Expand Down
6 changes: 3 additions & 3 deletions net/third_party/quiche/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ proto_library("net_quic_test_tools_proto") {
extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
}

if (is_linux) {
if (is_linux || is_chromeos) {
source_set("epoll_server_core") {
sources = [
"src/epoll_server/platform/api/epoll_bug.h",
Expand Down Expand Up @@ -984,7 +984,7 @@ source_set("quic_test_tools_core") {
"//third_party/quic_trace:quic_trace_proto",
]

if (is_linux) {
if (is_linux || is_chromeos) {
sources += [
"src/epoll_server/fake_simple_epoll_server.cc",
"src/epoll_server/fake_simple_epoll_server.h",
Expand Down Expand Up @@ -1450,7 +1450,7 @@ source_set("quiche_tests") {
if (is_desktop_linux) {
public_deps += [ "//net:epoll_quic_tools" ]
}
if (is_linux) {
if (is_linux || is_chromeos) {
sources += [
"src/epoll_server/simple_epoll_server_test.cc",
"src/quic/core/chlo_extractor_test.cc",
Expand Down
2 changes: 1 addition & 1 deletion pdf/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if (enable_pdf) {
"//ui/gfx/range",
]

if (is_linux) {
if (is_linux || is_chromeos) {
sources += [
"pdfium/pdfium_font_linux.cc",
"pdfium/pdfium_font_linux.h",
Expand Down
2 changes: 1 addition & 1 deletion ppapi/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ if (enable_nacl) {
[ ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})" ]
}

if (is_linux && enable_nacl_nonsfi) {
if ((is_linux || is_chromeos) && enable_nacl_nonsfi) {
data_deps +=
[ ":ppapi_nacl_tests(//build/toolchain/nacl:newlib_pnacl_nonsfi)" ]
}
Expand Down
2 changes: 1 addition & 1 deletion ppapi/tests/extensions/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ group("extensions") {
":ppapi_tests_extensions_popup($newlib)",
":ppapi_tests_extensions_socket_permissions($newlib)",
]
if ((target_cpu == "x86" || target_cpu == "x64") && is_linux &&
if ((target_cpu == "x86" || target_cpu == "x64") && (is_linux || is_chromeos) &&
enable_nacl_nonsfi) {
nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
data_deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ]
Expand Down
4 changes: 2 additions & 2 deletions printing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ component("printing") {
if (use_cups) {
configs += [ ":cups" ]

if (is_linux) {
if (is_linux || is_chromeos) {
# CUPS 1.6 deprecated the PPD APIs, but we will stay with this API
# for now as the suitability of the replacement is unclear.
# More info: crbug.com/226176
Expand Down Expand Up @@ -312,7 +312,7 @@ static_library("test_support") {
if (is_fuchsia) {
sources += [ "image_fuchsia.cc" ]
}
if (is_linux) {
if (is_linux || is_chromeos) {
sources += [ "image_linux.cc" ]
}
if (is_mac) {
Expand Down
2 changes: 1 addition & 1 deletion printing/buildflags/buildflags.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare_args() {
# Enable exporting to tagged PDF.
enable_tagged_pdf = !is_android && !is_chromecast && !is_ios && !is_fuchsia

if (use_fuzzing_engine && is_linux) {
if (use_fuzzing_engine && (is_linux || is_chromeos)) {
# For fuzzing, just restrict to chromeos and linux.
use_cups = true
} else {
Expand Down
2 changes: 1 addition & 1 deletion remoting/client/display/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ source_set("display") {
libs = [ "GLESv2" ]
}

if (is_linux) {
if (is_linux || is_chromeos) {
libs = [ "GL" ]
}

Expand Down
2 changes: 1 addition & 1 deletion remoting/codec/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ source_set("encoder") {

# Currently, building WebrtcVideoEncoderGpu is only supported on Windows and
# Linux, and encoding with WebrtcVideoEncoderGpu is only supported on Windows.
if (is_win || is_linux) {
if (is_win || is_linux || is_chromeos) {
public_configs = [ "//skia:skia_config" ]
sources += [
"webrtc_video_encoder_gpu.cc",
Expand Down
2 changes: 1 addition & 1 deletion remoting/protocol/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static_library("protocol") {
defines = []

# Must match condition in //remoting/codec/BUILD.gn
if (is_win || is_linux) {
if (is_win || is_linux || is_chromeos) {
defines += [ "USE_H264_ENCODER" ]
deps += [
"//media",
Expand Down
2 changes: 1 addition & 1 deletion remoting/remoting_options.gni
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/ui.gni")

enable_remoting_host =
is_win || (is_linux && (is_chromeos || use_x11)) || is_mac
is_win || (is_chromeos || (is_linux && use_x11)) || is_mac
enable_me2me_host = is_win || (is_linux && !is_chromeos && use_x11) || is_mac

# Enable the multi-process host on Windows by default.
Expand Down

0 comments on commit 9c0cdcf

Please sign in to comment.