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

[apple] Add a `is_apple` gn variable and use it

As https://crrev.com/c/2299189 adds `OS_MAC` & `OS_APPLE`, add a gn
variable `is_apple` that is true when `OS_APPLE` is defined. This
allow an easy mapping between gn variables and cpp macros.

Convert all usages of `is_ios || is_mac` or `is_mac || is_ios` to
use the new variable instead.

Bug: 1105907
Change-Id: I4cef55496a0ccf0a6162e60409ff3b7996f633dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315695
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791803}
parent ffc377fd
...@@ -1333,7 +1333,7 @@ jumbo_component("base") { ...@@ -1333,7 +1333,7 @@ jumbo_component("base") {
if (use_allocator == "none") { if (use_allocator == "none") {
sources += [ "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc" ] sources += [ "allocator/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc" ]
} }
} else if (is_mac || is_ios) { } else if (is_apple) {
sources += [ sources += [
"allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc", "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.cc",
"allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h", "allocator/allocator_shim_default_dispatch_to_mac_zoned_malloc.h",
...@@ -1352,7 +1352,7 @@ jumbo_component("base") { ...@@ -1352,7 +1352,7 @@ jumbo_component("base") {
# Allow more direct string conversions on platforms with native utf8 # Allow more direct string conversions on platforms with native utf8
# strings # strings
if (is_mac || is_ios || is_chromeos || is_chromecast || is_fuchsia) { if (is_apple || is_chromeos || is_chromecast || is_fuchsia) {
defines += [ "SYSTEM_NATIVE_UTF8" ] defines += [ "SYSTEM_NATIVE_UTF8" ]
} }
...@@ -1882,7 +1882,7 @@ jumbo_component("base") { ...@@ -1882,7 +1882,7 @@ jumbo_component("base") {
} }
# Mac or iOS. # Mac or iOS.
if (is_mac || is_ios) { if (is_apple) {
sources -= [ sources -= [
"native_library_posix.cc", "native_library_posix.cc",
"profiler/module_cache_posix.cc", "profiler/module_cache_posix.cc",
...@@ -2576,7 +2576,7 @@ bundle_data("base_unittests_bundle_data") { ...@@ -2576,7 +2576,7 @@ bundle_data("base_unittests_bundle_data") {
"{{source_root_relative_dir}}/{{source_file_part}}" ] "{{source_root_relative_dir}}/{{source_file_part}}" ]
} }
if (is_ios || is_mac) { if (is_apple) {
source_set("base_unittests_arc") { source_set("base_unittests_arc") {
testonly = true testonly = true
sources = [ "mac/bind_objc_block_unittest_arc.mm" ] sources = [ "mac/bind_objc_block_unittest_arc.mm" ]
...@@ -2937,7 +2937,7 @@ test("base_unittests") { ...@@ -2937,7 +2937,7 @@ test("base_unittests") {
"//base/test:test_shared_library", "//base/test:test_shared_library",
] ]
if (is_ios || is_mac) { if (is_apple) {
deps += [ ":base_unittests_arc" ] deps += [ ":base_unittests_arc" ]
} }
...@@ -3053,7 +3053,7 @@ test("base_unittests") { ...@@ -3053,7 +3053,7 @@ test("base_unittests") {
# Allow more direct string conversions on platforms with native utf8 # Allow more direct string conversions on platforms with native utf8
# strings # strings
if (is_mac || is_ios || is_chromeos || is_chromecast || is_fuchsia) { if (is_apple || is_chromeos || is_chromecast || is_fuchsia) {
defines += [ "SYSTEM_NATIVE_UTF8" ] defines += [ "SYSTEM_NATIVE_UTF8" ]
} }
......
...@@ -6,8 +6,8 @@ import("//build/config/chromecast_build.gni") ...@@ -6,8 +6,8 @@ import("//build/config/chromecast_build.gni")
import("//build/config/sanitizers/sanitizers.gni") import("//build/config/sanitizers/sanitizers.gni")
# Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors. # Temporarily disable tcmalloc on arm64 linux to get rid of compilation errors.
if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan || if (is_android || is_apple || is_asan || is_lsan || is_tsan || is_msan ||
is_msan || is_win || is_fuchsia || (is_linux && target_cpu == "arm64") || is_win || is_fuchsia || (is_linux && target_cpu == "arm64") ||
(is_cast_audio_only && target_cpu == "arm")) { (is_cast_audio_only && target_cpu == "arm")) {
_default_allocator = "none" _default_allocator = "none"
} else { } else {
...@@ -17,7 +17,7 @@ if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan || ...@@ -17,7 +17,7 @@ if (is_android || is_mac || is_ios || is_asan || is_lsan || is_tsan ||
# The debug CRT on Windows has some debug features that are incompatible with # The debug CRT on Windows has some debug features that are incompatible with
# the shim. NaCl in particular does seem to link some binaries statically # the shim. NaCl in particular does seem to link some binaries statically
# against the debug CRT with "is_nacl=false". # against the debug CRT with "is_nacl=false".
if ((is_linux || is_android || is_mac || is_ios || if ((is_linux || is_android || is_apple ||
(is_win && !is_component_build && !is_debug)) && !is_asan && !is_hwasan && (is_win && !is_component_build && !is_debug)) && !is_asan && !is_hwasan &&
!is_lsan && !is_tsan && !is_msan) { !is_lsan && !is_tsan && !is_msan) {
_default_use_allocator_shim = true _default_use_allocator_shim = true
...@@ -44,7 +44,7 @@ assert(!is_mac || use_allocator == "none", "Tcmalloc doesn't work on macOS.") ...@@ -44,7 +44,7 @@ assert(!is_mac || use_allocator == "none", "Tcmalloc doesn't work on macOS.")
assert(!is_ios || use_allocator == "none", "Tcmalloc doesn't work on iOS.") assert(!is_ios || use_allocator == "none", "Tcmalloc doesn't work on iOS.")
assert( assert(
!use_allocator_shim || is_linux || is_android || is_win || is_mac || is_ios, !use_allocator_shim || is_linux || is_android || is_win || is_apple,
"use_allocator_shim works only on Android, iOS, Linux, macOS, and Windows.") "use_allocator_shim works only on Android, iOS, Linux, macOS, and Windows.")
if (is_win && use_allocator_shim) { if (is_win && use_allocator_shim) {
......
...@@ -36,7 +36,7 @@ static_library("libevent") { ...@@ -36,7 +36,7 @@ static_library("libevent") {
defines = [ "HAVE_CONFIG_H" ] defines = [ "HAVE_CONFIG_H" ]
if (is_mac || is_ios) { if (is_apple) {
sources += [ sources += [
"kqueue.c", "kqueue.c",
"mac/config.h", "mac/config.h",
......
...@@ -293,6 +293,7 @@ is_mac = current_os == "mac" ...@@ -293,6 +293,7 @@ is_mac = current_os == "mac"
is_nacl = current_os == "nacl" is_nacl = current_os == "nacl"
is_win = current_os == "win" || current_os == "winuwp" is_win = current_os == "win" || current_os == "winuwp"
is_apple = is_ios || is_mac
is_posix = !is_win && !is_fuchsia is_posix = !is_win && !is_fuchsia
# ============================================================================= # =============================================================================
......
...@@ -15,7 +15,7 @@ declare_args() { ...@@ -15,7 +15,7 @@ declare_args() {
# symbols are not exported. # symbols are not exported.
# TODO(thomasanderson): Set this to true by default once rL352899 is available # TODO(thomasanderson): Set this to true by default once rL352899 is available
# in MacOS's lldb. # in MacOS's lldb.
libcxx_abi_unstable = !((is_mac || is_ios) && is_debug && is_component_build) libcxx_abi_unstable = !(is_apple && is_debug && is_component_build)
} }
# TODO(xiaohuic): https://crbug/917533 Crashes on internal ChromeOS build. # TODO(xiaohuic): https://crbug/917533 Crashes on internal ChromeOS build.
......
...@@ -294,7 +294,7 @@ config("compiler") { ...@@ -294,7 +294,7 @@ config("compiler") {
if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") { if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") {
ldflags += [ "-Wl,--fatal-warnings" ] ldflags += [ "-Wl,--fatal-warnings" ]
} }
if (fatal_linker_warnings && (is_mac || is_ios)) { if (fatal_linker_warnings && is_apple) {
ldflags += [ "-Wl,-fatal_warnings" ] ldflags += [ "-Wl,-fatal_warnings" ]
} }
} else { } else {
...@@ -313,7 +313,7 @@ config("compiler") { ...@@ -313,7 +313,7 @@ config("compiler") {
# Non-Mac Posix and Fuchsia compiler flags setup. # Non-Mac Posix and Fuchsia compiler flags setup.
# ----------------------------------- # -----------------------------------
if ((is_posix && !(is_mac || is_ios)) || is_fuchsia) { if ((is_posix && !is_apple) || is_fuchsia) {
if (enable_profiling) { if (enable_profiling) {
if (!is_debug) { if (!is_debug) {
cflags += [ "-g" ] cflags += [ "-g" ]
...@@ -725,7 +725,7 @@ config("compiler_cpu_abi") { ...@@ -725,7 +725,7 @@ config("compiler_cpu_abi") {
ldflags = [] ldflags = []
defines = [] defines = []
if ((is_posix && !(is_mac || is_ios)) || is_fuchsia) { if ((is_posix && !is_apple) || is_fuchsia) {
# CPU architecture. We may or may not be doing a cross compile now, so for # CPU architecture. We may or may not be doing a cross compile now, so for
# simplicity we always explicitly set the architecture. # simplicity we always explicitly set the architecture.
if (current_cpu == "x64") { if (current_cpu == "x64") {
...@@ -1180,7 +1180,7 @@ config("compiler_arm_fpu") { ...@@ -1180,7 +1180,7 @@ config("compiler_arm_fpu") {
config("compiler_arm_thumb") { config("compiler_arm_thumb") {
if (current_cpu == "arm" && arm_use_thumb && is_posix && if (current_cpu == "arm" && arm_use_thumb && is_posix &&
!(is_mac || is_ios || is_nacl)) { !(is_apple || is_nacl)) {
cflags = [ "-mthumb" ] cflags = [ "-mthumb" ]
} }
} }
...@@ -1412,7 +1412,7 @@ config("default_warnings") { ...@@ -1412,7 +1412,7 @@ config("default_warnings") {
] ]
} }
} else { } else {
if ((is_mac || is_ios) && !is_nacl) { if (is_apple && !is_nacl) {
# When compiling Objective-C, warns if a method is used whose # When compiling Objective-C, warns if a method is used whose
# availability is newer than the deployment target. # availability is newer than the deployment target.
cflags += [ "-Wunguarded-availability" ] cflags += [ "-Wunguarded-availability" ]
...@@ -1925,7 +1925,7 @@ if (is_win) { ...@@ -1925,7 +1925,7 @@ if (is_win) {
} }
} }
if (is_mac || is_ios) { if (is_apple) {
if (symbol_level == 2) { if (symbol_level == 2) {
# Mac dead code stripping requires symbols. # Mac dead code stripping requires symbols.
common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
...@@ -2439,7 +2439,7 @@ config("strip_debug") { ...@@ -2439,7 +2439,7 @@ config("strip_debug") {
ldflags += [ "-Wl,--strip-debug" ] ldflags += [ "-Wl,--strip-debug" ]
} }
if (is_ios || is_mac) { if (is_apple) {
# On Mac and iOS, this enables support for ARC (automatic ref-counting). # On Mac and iOS, this enables support for ARC (automatic ref-counting).
# See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
config("enable_arc") { config("enable_arc") {
......
...@@ -126,7 +126,7 @@ if (is_chromeos) { ...@@ -126,7 +126,7 @@ if (is_chromeos) {
# 32-bit builds (https://bugs.llvm.org/show_bug.cgi?id=18505) so disable them # 32-bit builds (https://bugs.llvm.org/show_bug.cgi?id=18505) so disable them
# there to avoid the unnecessary overhead. # there to avoid the unnecessary overhead.
enable_frame_pointers = current_cpu != "arm" enable_frame_pointers = current_cpu != "arm"
} else if (is_mac || is_ios || is_linux) { } else if (is_apple || is_linux) {
enable_frame_pointers = true enable_frame_pointers = true
} else if (is_win) { } else if (is_win) {
# 64-bit Windows ABI doesn't support frame pointers. # 64-bit Windows ABI doesn't support frame pointers.
......
...@@ -89,7 +89,7 @@ if ((is_mac || is_win || (is_ios && !use_xcode_clang)) && is_asan) { ...@@ -89,7 +89,7 @@ if ((is_mac || is_win || (is_ios && !use_xcode_clang)) && is_asan) {
} }
} }
if (is_mac || is_ios) { if (is_apple) {
bundle_data("asan_runtime_bundle_data") { bundle_data("asan_runtime_bundle_data") {
sources = get_target_outputs(":copy_asan_runtime") sources = get_target_outputs(":copy_asan_runtime")
outputs = [ "{{bundle_executable_dir}}/{{source_file_part}}" ] outputs = [ "{{bundle_executable_dir}}/{{source_file_part}}" ]
...@@ -99,7 +99,7 @@ if ((is_mac || is_win || (is_ios && !use_xcode_clang)) && is_asan) { ...@@ -99,7 +99,7 @@ if ((is_mac || is_win || (is_ios && !use_xcode_clang)) && is_asan) {
} }
config("sanitizer_options_link_helper") { config("sanitizer_options_link_helper") {
if (is_mac || is_ios) { if (is_apple) {
ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ] ldflags = [ "-Wl,-U,_sanitizer_options_link_helper" ]
} else if (!is_win) { } else if (!is_win) {
ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ] ldflags = [ "-Wl,-u_sanitizer_options_link_helper" ]
......
...@@ -16,7 +16,7 @@ if (current_cpu == "x64") { ...@@ -16,7 +16,7 @@ if (current_cpu == "x64") {
x64_arch = "" x64_arch = ""
} }
if ((is_posix && !(is_mac || is_ios)) || is_fuchsia) { if ((is_posix && !is_apple) || is_fuchsia) {
if (x64_arch == "") { if (x64_arch == "") {
x64_arch = "x86-64" x64_arch = "x86-64"
} }
......
...@@ -62,7 +62,7 @@ import("//testing/test.gni") ...@@ -62,7 +62,7 @@ import("//testing/test.gni")
declare_args() { declare_args() {
# TODO(crbug.com/105388): make sure no-compile test is not flaky. # TODO(crbug.com/105388): make sure no-compile test is not flaky.
enable_nocompile_tests = enable_nocompile_tests =
(is_linux || is_mac || is_ios) && is_clang && host_cpu == target_cpu (is_linux || is_apple) && is_clang && host_cpu == target_cpu
} }
if (enable_nocompile_tests) { if (enable_nocompile_tests) {
......
...@@ -54,7 +54,7 @@ assert(!use_xcode_clang || target_os == "ios", ...@@ -54,7 +54,7 @@ assert(!use_xcode_clang || target_os == "ios",
"Using Xcode's clang is only supported in iOS builds") "Using Xcode's clang is only supported in iOS builds")
# Extension for shared library files (including leading dot). # Extension for shared library files (including leading dot).
if (is_mac || is_ios) { if (is_apple) {
shlib_extension = ".dylib" shlib_extension = ".dylib"
} else if (is_android && is_component_build) { } else if (is_android && is_component_build) {
# By appending .cr, we prevent name collisions with libraries already # By appending .cr, we prevent name collisions with libraries already
......
...@@ -16,7 +16,7 @@ group("common") { ...@@ -16,7 +16,7 @@ group("common") {
":crash_key_utils", ":crash_key_utils",
] ]
if (is_mac || is_ios) { if (is_apple) {
public_deps += [ ":zombies" ] public_deps += [ ":zombies" ]
} }
...@@ -129,7 +129,7 @@ static_library("crash_key_utils") { ...@@ -129,7 +129,7 @@ static_library("crash_key_utils") {
] ]
} }
if (is_mac || is_ios) { if (is_apple) {
component("zombies") { component("zombies") {
visibility = [ ":common" ] visibility = [ ":common" ]
...@@ -176,7 +176,7 @@ source_set("unit_tests") { ...@@ -176,7 +176,7 @@ source_set("unit_tests") {
"//testing/gtest", "//testing/gtest",
] ]
if (is_mac || is_ios) { if (is_apple) {
sources += [ "objc_zombie_unittest.mm" ] sources += [ "objc_zombie_unittest.mm" ]
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# found in the LICENSE file. # found in the LICENSE file.
source_set("handoff") { source_set("handoff") {
if (is_mac || is_ios) { if (is_apple) {
sources = [ sources = [
"handoff_manager.h", "handoff_manager.h",
"handoff_manager.mm", "handoff_manager.mm",
......
...@@ -257,7 +257,7 @@ jumbo_source_set("internal") { ...@@ -257,7 +257,7 @@ jumbo_source_set("internal") {
"cloud/user_cloud_policy_store.h", "cloud/user_cloud_policy_store.h",
] ]
} }
if (is_ios || is_mac) { if (is_apple) {
sources += [ sources += [
"mac_util.cc", "mac_util.cc",
"mac_util.h", "mac_util.h",
...@@ -451,7 +451,7 @@ source_set("unit_tests") { ...@@ -451,7 +451,7 @@ source_set("unit_tests") {
"config_dir_policy_loader_unittest.cc", "config_dir_policy_loader_unittest.cc",
] ]
} }
if (is_mac || is_ios) { if (is_apple) {
sources += [ "mac_util_unittest.cc" ] sources += [ "mac_util_unittest.cc" ]
if (is_mac) { if (is_mac) {
......
...@@ -153,7 +153,7 @@ template("google_apis_tmpl") { ...@@ -153,7 +153,7 @@ template("google_apis_tmpl") {
deps += invoker.deps deps += invoker.deps
} }
if (is_mac || is_ios) { if (is_apple) {
set_sources_assignment_filter([]) set_sources_assignment_filter([])
sources += [ sources += [
"google_api_keys_mac.h", "google_api_keys_mac.h",
...@@ -252,7 +252,7 @@ test("google_apis_unittests") { ...@@ -252,7 +252,7 @@ test("google_apis_unittests") {
deps += [ "//google_apis/drive:drive_unittests" ] deps += [ "//google_apis/drive:drive_unittests" ]
} }
if (is_mac || is_ios) { if (is_apple) {
set_sources_assignment_filter([]) set_sources_assignment_filter([])
sources += [ "google_api_keys_mac_unittest.mm" ] sources += [ "google_api_keys_mac_unittest.mm" ]
set_sources_assignment_filter(sources_assignment_filter) set_sources_assignment_filter(sources_assignment_filter)
......
...@@ -118,7 +118,7 @@ component("media") { ...@@ -118,7 +118,7 @@ component("media") {
] ]
# This must be included here since it actually depends on //media/base. # This must be included here since it actually depends on //media/base.
if (is_mac || is_ios) { if (is_apple) {
public_deps += [ "//media/base/mac" ] public_deps += [ "//media/base/mac" ]
} }
} }
......
...@@ -24,7 +24,7 @@ jumbo_source_set("base") { ...@@ -24,7 +24,7 @@ jumbo_source_set("base") {
# TODO(dalecurtis): Replace this with empty targets on non-mac so # TODO(dalecurtis): Replace this with empty targets on non-mac so
# we can just include //media/base/mac in media_subcomponent_deps. # we can just include //media/base/mac in media_subcomponent_deps.
if (is_ios || is_mac) { if (is_apple) {
visibility += [ "//media/base/mac" ] visibility += [ "//media/base/mac" ]
} }
...@@ -605,7 +605,7 @@ source_set("unit_tests") { ...@@ -605,7 +605,7 @@ source_set("unit_tests") {
"//ui/gfx", "//ui/gfx",
] ]
if (is_mac || is_ios) { if (is_apple) {
deps += [ "//media/base/mac:unit_tests" ] deps += [ "//media/base/mac:unit_tests" ]
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
assert(is_mac || is_ios) assert(is_apple)
jumbo_source_set("mac") { jumbo_source_set("mac") {
# Note: This source_set is depended on only by //media. In the component # Note: This source_set is depended on only by //media. In the component
......
...@@ -165,7 +165,7 @@ jumbo_source_set("sender") { ...@@ -165,7 +165,7 @@ jumbo_source_set("sender") {
] ]
# iOS and OS X encoders # iOS and OS X encoders
if (is_ios || is_mac) { if (is_apple) {
sources += [ sources += [
"sender/h264_vt_encoder.cc", "sender/h264_vt_encoder.cc",
"sender/h264_vt_encoder.h", "sender/h264_vt_encoder.h",
...@@ -355,7 +355,7 @@ test("cast_unittests") { ...@@ -355,7 +355,7 @@ test("cast_unittests") {
] ]
} }
if (is_ios || is_mac) { if (is_apple) {
sources += [ "sender/h264_vt_encoder_unittest.cc" ] sources += [ "sender/h264_vt_encoder_unittest.cc" ]
deps += [ "//third_party/ffmpeg" ] deps += [ "//third_party/ffmpeg" ]
......
...@@ -1282,7 +1282,7 @@ component("net") { ...@@ -1282,7 +1282,7 @@ component("net") {
] ]
} }
if (is_ios || is_mac) { if (is_apple) {
sources += [ sources += [
"base/mac/url_conversions.h", "base/mac/url_conversions.h",
"base/mac/url_conversions.mm", "base/mac/url_conversions.mm",
...@@ -4604,7 +4604,7 @@ test("net_unittests") { ...@@ -4604,7 +4604,7 @@ test("net_unittests") {
] ]
} }
if (is_mac || is_ios) { if (is_apple) {
sources += [ "base/mac/url_conversions_unittest.mm" ] sources += [ "base/mac/url_conversions_unittest.mm" ]
} }
......
...@@ -23,7 +23,7 @@ declare_args() { ...@@ -23,7 +23,7 @@ declare_args() {
disable_brotli_filter = false disable_brotli_filter = false
# Multicast DNS. # Multicast DNS.
enable_mdns = is_win || is_linux || is_fuchsia || is_mac || is_ios enable_mdns = is_win || is_linux || is_fuchsia || is_apple
# Reporting not used on iOS. # Reporting not used on iOS.
enable_reporting = !is_ios enable_reporting = !is_ios
......
...@@ -50,7 +50,7 @@ source_set("common") { ...@@ -50,7 +50,7 @@ source_set("common") {
deps += [ "//remoting/host/mac:permission_checking" ] deps += [ "//remoting/host/mac:permission_checking" ]
} }
if (is_mac || is_ios) { if (is_apple) {
deps += [ "//remoting/host/mac:constants" ] deps += [ "//remoting/host/mac:constants" ]
} }
......
...@@ -98,7 +98,7 @@ action("copy_locales") { ...@@ -98,7 +98,7 @@ action("copy_locales") {
[ "$root_gen_dir/remoting/resources/{{source_name_part}}.pak" ]) [ "$root_gen_dir/remoting/resources/{{source_name_part}}.pak" ])
# Likewise, process the outputs in the same way as the inputs. # Likewise, process the outputs in the same way as the inputs.
if (is_mac || is_ios) { if (is_apple) {
# On mac, use underscores instead of hyphens and put the files in a # On mac, use underscores instead of hyphens and put the files in a
# different place. # different place.
outputs = process_file_template( outputs = process_file_template(
......
...@@ -6,6 +6,6 @@ import("//build/config/chrome_build.gni") ...@@ -6,6 +6,6 @@ import("//build/config/chrome_build.gni")
# Whether we are using the rlz library or not. Platforms like Android send # Whether we are using the rlz library or not. Platforms like Android send
# rlz codes for searches but do not use the library. # rlz codes for searches but do not use the library.
enable_rlz_support = is_win || is_mac || is_ios || is_chromeos enable_rlz_support = is_win || is_apple || is_chromeos
enable_rlz = is_chrome_branded && enable_rlz_support enable_rlz = is_chrome_branded && enable_rlz_support
...@@ -437,7 +437,7 @@ component("skia") { ...@@ -437,7 +437,7 @@ component("skia") {
] ]
} }
if (is_mac || is_ios) { if (is_apple) {
set_sources_assignment_filter([]) set_sources_assignment_filter([])
sources += [ sources += [
"//third_party/skia/include/ports/SkFontMgr_mac_ct.h", "//third_party/skia/include/ports/SkFontMgr_mac_ct.h",
...@@ -847,7 +847,7 @@ if (is_fuchsia) { ...@@ -847,7 +847,7 @@ if (is_fuchsia) {
outputs = [ "$root_out_dir/test_fonts/{{source_file_part}}" ] outputs = [ "$root_out_dir/test_fonts/{{source_file_part}}" ]
} }
} }
if (is_mac || is_ios) { if (is_apple) {
bundle_data("test_fonts_bundle_data") { bundle_data("test_fonts_bundle_data") {
public_deps = [ "//third_party/test_fonts" ] public_deps = [ "//third_party/test_fonts" ]
...@@ -864,7 +864,7 @@ group("test_fonts_resources") { ...@@ -864,7 +864,7 @@ group("test_fonts_resources") {
deps = [] deps = []
data_deps = [] data_deps = []
if (is_mac || is_ios) { if (is_apple) {
deps += [ ":test_fonts_bundle_data" ] deps += [ ":test_fonts_bundle_data" ]
data_deps += [ ":test_fonts_bundle_data" ] data_deps += [ ":test_fonts_bundle_data" ]
} else { } else {
......
...@@ -55,7 +55,7 @@ static_library("gtest") { ...@@ -55,7 +55,7 @@ static_library("gtest") {
sources += [ "../platform_test.h" ] sources += [ "../platform_test.h" ]
} }
if ((is_mac || is_ios) && gtest_include_objc_support) { if (is_apple && gtest_include_objc_support) {
if (is_ios) { if (is_ios) {
set_sources_assignment_filter([]) set_sources_assignment_filter([])
} }
......
...@@ -36,7 +36,7 @@ absl_source_set("time_zone") { ...@@ -36,7 +36,7 @@ absl_source_set("time_zone") {
"include/cctz/time_zone.h", "include/cctz/time_zone.h",
"include/cctz/zone_info_source.h", "include/cctz/zone_info_source.h",
] ]
if (is_mac || is_ios) { if (is_apple) {
frameworks = [ "Foundation.framework" ] frameworks = [ "Foundation.framework" ]
} }
deps = [ deps = [
......
...@@ -25,7 +25,7 @@ config("grpc_internal_config") { ...@@ -25,7 +25,7 @@ config("grpc_internal_config") {
config("nanopb_config") { config("nanopb_config") {
include_dirs = [ "src/third_party/nanopb" ] include_dirs = [ "src/third_party/nanopb" ]
defines = [ "PB_FIELD_32BIT=1" ] defines = [ "PB_FIELD_32BIT=1" ]
if (is_mac || is_ios) { if (is_apple) {
defines += [ "PB_NO_PACKED_STRUCTS=1" ] defines += [ "PB_NO_PACKED_STRUCTS=1" ]
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# headers. These were generated by running the configure script offline. # headers. These were generated by running the configure script offline.
if (is_linux || is_android || is_nacl || is_fuchsia) { if (is_linux || is_android || is_nacl || is_fuchsia) {
os_include = "linux" os_include = "linux"
} else if (is_mac || is_ios) { } else if (is_apple) {
os_include = "mac" os_include = "mac"
} else if (is_win) { } else if (is_win) {
os_include = "win32" os_include = "win32"
...@@ -300,7 +300,7 @@ static_library("libxml") { ...@@ -300,7 +300,7 @@ static_library("libxml") {
public_deps = [ "//third_party/icu:icuuc" ] public_deps = [ "//third_party/icu:icuuc" ]
deps = [ "//third_party/zlib" ] deps = [ "//third_party/zlib" ]
if (is_mac || is_ios || is_android || is_fuchsia) { if (is_apple || is_android || is_fuchsia) {
# http://www.xmlsoft.org/threads.html says that this is required when using # http://www.xmlsoft.org/threads.html says that this is required when using
# libxml from several threads, which can possibly happen in chrome. On # libxml from several threads, which can possibly happen in chrome. On
# linux, this is picked up by transitivity from pkg-config output from # linux, this is picked up by transitivity from pkg-config output from
......
...@@ -22,7 +22,7 @@ component("mozilla") { ...@@ -22,7 +22,7 @@ component("mozilla") {
"//url", "//url",
] ]
if (is_component_build && (is_mac || is_ios)) { if (is_component_build && is_apple) {
# Needed to link to Obj-C static libraries. # Needed to link to Obj-C static libraries.
ldflags = [ "-Wl,-ObjC" ] ldflags = [ "-Wl,-ObjC" ]
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# 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.
assert(is_mac || is_ios) assert(is_apple)
config("ocmock_config") { config("ocmock_config") {
include_dirs = [ "//third_party/ocmock" ] include_dirs = [ "//third_party/ocmock" ]
......
...@@ -53,7 +53,7 @@ use_assembler = (is_win || is_linux) && ...@@ -53,7 +53,7 @@ use_assembler = (is_win || is_linux) &&
if (use_assembler) { if (use_assembler) {
asm_defines = [] asm_defines = []
if (!is_component_build) { if (!is_component_build) {
if (is_mac || is_ios) { if (is_apple) {
asm_defines += [ "WELS_PRIVATE_EXTERN=private_extern" ] asm_defines += [ "WELS_PRIVATE_EXTERN=private_extern" ]
} else if (is_linux || is_android || is_fuchsia) { } else if (is_linux || is_android || is_fuchsia) {
asm_defines += [ "WELS_PRIVATE_EXTERN=hidden" ] asm_defines += [ "WELS_PRIVATE_EXTERN=hidden" ]
......
...@@ -226,7 +226,7 @@ component("chromium_sqlite3") { ...@@ -226,7 +226,7 @@ component("chromium_sqlite3") {
":sqlite_warnings", ":sqlite_warnings",
] ]
if (is_mac || is_ios) { if (is_apple) {
frameworks = [ "CoreFoundation.framework" ] frameworks = [ "CoreFoundation.framework" ]
if (!is_ios) { if (!is_ios) {
frameworks += [ "CoreServices.framework" ] frameworks += [ "CoreServices.framework" ]
...@@ -305,7 +305,7 @@ component("dev_sqlite3") { ...@@ -305,7 +305,7 @@ component("dev_sqlite3") {
":sqlite_warnings", ":sqlite_warnings",
] ]
if (is_mac || is_ios) { if (is_apple) {
frameworks = [ "CoreFoundation.framework" ] frameworks = [ "CoreFoundation.framework" ]
if (!is_ios) { if (!is_ios) {
frameworks += [ "CoreServices.framework" ] frameworks += [ "CoreServices.framework" ]
......
...@@ -126,7 +126,7 @@ static_library("usrsctp") { ...@@ -126,7 +126,7 @@ static_library("usrsctp") {
"__Userspace_os_Linux", "__Userspace_os_Linux",
"_GNU_SOURCE", "_GNU_SOURCE",
] ]
} else if (is_mac || is_ios) { } else if (is_apple) {
defines += [ defines += [
"HAVE_SA_LEN", "HAVE_SA_LEN",
"HAVE_SCONN_LEN", "HAVE_SCONN_LEN",
......
...@@ -358,7 +358,7 @@ static_library("minizip") { ...@@ -358,7 +358,7 @@ static_library("minizip") {
] ]
} }
if (is_mac || is_ios || is_android || is_nacl) { if (is_apple || is_android || is_nacl) {
# Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
# use fopen, ftell, and fseek instead on these systems. # use fopen, ftell, and fseek instead on these systems.
defines = [ "USE_FILE32API" ] defines = [ "USE_FILE32API" ]
......
...@@ -112,7 +112,7 @@ if (is_mac || is_win || is_linux || is_ios) { ...@@ -112,7 +112,7 @@ if (is_mac || is_win || is_linux || is_ios) {
} }
# Mac and iOS want Title Case strings. # Mac and iOS want Title Case strings.
use_titlecase_in_grd_files = is_mac || is_ios use_titlecase_in_grd_files = is_apple
if (use_titlecase_in_grd_files) { if (use_titlecase_in_grd_files) {
grit_defines += [ grit_defines += [
"-D", "-D",
......
...@@ -32,7 +32,7 @@ jumbo_component("clipboard_types") { ...@@ -32,7 +32,7 @@ jumbo_component("clipboard_types") {
sources += [ "clipboard_format_type_mac.mm" ] sources += [ "clipboard_format_type_mac.mm" ]
} }
if (is_mac || is_ios) { if (is_apple) {
sources += [ "clipboard_constants_mac.mm" ] sources += [ "clipboard_constants_mac.mm" ]
} }
...@@ -51,7 +51,7 @@ jumbo_component("clipboard_types") { ...@@ -51,7 +51,7 @@ jumbo_component("clipboard_types") {
deps = [ "//base" ] deps = [ "//base" ]
frameworks = [] frameworks = []
if (is_mac || is_ios) { if (is_apple) {
frameworks += [ "Foundation.framework" ] frameworks += [ "Foundation.framework" ]
} }
if (is_mac) { if (is_mac) {
......
...@@ -793,7 +793,7 @@ test("gfx_unittests") { ...@@ -793,7 +793,7 @@ test("gfx_unittests") {
data_deps = [ "//ui/resources:ui_test_pak_data" ] data_deps = [ "//ui/resources:ui_test_pak_data" ]
if (is_mac || is_ios) { if (is_apple) {
deps += [ "//ui/resources:ui_test_pak_bundle_data" ] deps += [ "//ui/resources:ui_test_pak_bundle_data" ]
} }
......
...@@ -19,7 +19,7 @@ jumbo_component("range") { ...@@ -19,7 +19,7 @@ jumbo_component("range") {
"range_f.h", "range_f.h",
] ]
if (is_ios || is_mac) { if (is_apple) {
sources += [ "range_mac.mm" ] sources += [ "range_mac.mm" ]
} }
......
...@@ -66,7 +66,7 @@ if (!is_mac) { ...@@ -66,7 +66,7 @@ if (!is_mac) {
# On iOS and Mac the string resources need to go into a locale subfolder, which # On iOS and Mac the string resources need to go into a locale subfolder, which
# introduces an extra dependency. # introduces an extra dependency.
if (is_ios || is_mac) { if (is_apple) {
group("ui_test_pak") { group("ui_test_pak") {
public_deps = [ public_deps = [
":repack_ui_test_mac_locale_pack", ":repack_ui_test_mac_locale_pack",
......
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