0

[apple] Use !is_apple gn variable when appropriate

https://crrev.com/c/2315695 added `is_apple` variable defined as
`is_ios || is_mac` and converted usages of this pattern, but the
conversion missed the negative form.

Convert `!is_ios && !is_mac` to `!is_apple` as a followup.

Bug: 1105907
Change-Id: Iae063a2cbb89a7d545958b5bbeebac48bac9ec0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410021
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806636}
This commit is contained in:
Sylvain Defresne
2020-09-14 14:35:30 +00:00
committed by Commit Bot
parent f960c4ac35
commit 21272efa27
13 changed files with 25 additions and 27 deletions
base
build/config
buildtools/third_party
libc++
libc++abi
components
os_crypt
password_manager
core
browser
crypto
skia
third_party/hunspell
ui/gfx

@ -884,7 +884,7 @@ component("base") {
"timer/hi_res_timer_manager_posix.cc",
]
if (!is_nacl && !is_mac && !is_ios) {
if (!is_nacl && !is_apple) {
sources += [
"cpu_affinity_posix.cc",
"cpu_affinity_posix.h",
@ -2055,7 +2055,7 @@ component("base") {
sources += [ "memory/platform_shared_memory_region_posix.cc" ]
}
if (is_posix && !is_mac && !is_ios) {
if (is_posix && !is_apple) {
sources += [
"time/time_conversion_posix.cc",
"time/time_exploded_icu.cc", # See note below.
@ -2072,15 +2072,14 @@ component("base") {
deps += [ "//third_party/icu:icui18n" ]
}
if (is_posix && !is_mac && !is_ios && !is_nacl) {
if (is_posix && !is_apple && !is_nacl) {
sources += [
"posix/can_lower_nice_to.cc",
"posix/can_lower_nice_to.h",
]
}
if ((is_posix && !is_mac && !is_ios && !is_android && !is_chromeos) ||
is_fuchsia) {
if ((is_posix && !is_apple && !is_android && !is_chromeos) || is_fuchsia) {
sources += [ "power_monitor/power_monitor_device_source_stub.cc" ]
}
@ -3084,7 +3083,7 @@ test("base_unittests") {
"posix/unix_domain_socket_unittest.cc",
"task/thread_pool/task_tracker_posix_unittest.cc",
]
if (!is_nacl && !is_mac && !is_ios) {
if (!is_nacl && !is_apple) {
sources += [
"cpu_affinity_posix_unittest.cc",
"profiler/stack_copier_signal_unittest.cc",

@ -353,7 +353,7 @@ if (!is_ios) {
"*\bios/*",
]
}
if (!is_mac && !is_ios) {
if (!is_apple) {
sources_assignment_filter += [ "*.mm" ]
}
if (!is_linux && !is_chromeos) {

@ -175,9 +175,8 @@ declare_args() {
}
if (use_debug_fission == "default") {
use_debug_fission =
is_debug && !is_android && !is_fuchsia && !is_ios && !is_mac && !is_win &&
(use_gold || use_lld) && cc_wrapper == ""
use_debug_fission = is_debug && !is_android && !is_fuchsia && !is_apple &&
!is_win && (use_gold || use_lld) && cc_wrapper == ""
}
if (is_win || is_android || (is_chromeos && is_chromeos_device)) {
@ -295,7 +294,7 @@ config("compiler") {
}
# Linker warnings.
if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") {
if (fatal_linker_warnings && !is_apple && current_os != "aix") {
ldflags += [ "-Wl,--fatal-warnings" ]
}
if (fatal_linker_warnings && is_apple &&
@ -1772,7 +1771,7 @@ config("thin_archive") {
# Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't
# have a "thin archive" mode (it does accept -T, but it means truncating
# archive names to 16 characters, which is not what we want).
if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ]
} else if (is_win && use_lld) {
arflags = [ "/llvmlibthin" ]
@ -1987,7 +1986,7 @@ config("default_stack_frames") {
# Omit frame pointers for leaf functions on x86, otherwise building libyuv
# gives clang's register allocator issues, see llvm.org/PR15798 /
# crbug.com/233709
if (is_clang && current_cpu == "x86" && !is_mac && !is_ios) {
if (is_clang && current_cpu == "x86" && !is_apple) {
cflags += [ "-momit-leaf-frame-pointer" ]
}
} else {
@ -2242,8 +2241,8 @@ config("afdo") {
# include as sub-config.
config("win_pdbaltpath") {
visibility = [
":symbols",
":minimal_symbols",
":symbols",
]
# /DEBUG causes the linker to generate a pdb file, and to write the absolute
@ -2309,7 +2308,7 @@ config("symbols") {
}
# TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
if (is_clang && !is_nacl && !use_xcode_clang && !is_mac && !is_ios) {
if (is_clang && !is_nacl && !use_xcode_clang && !is_apple) {
cflags += [
"-Xclang",
"-debug-info-kind=constructor",
@ -2349,7 +2348,7 @@ config("symbols") {
# obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
# DWARF info may be corrupt; offsets in a range list entry are in different
# sections" there. Maybe just a bug in nacl_switch_32.S.
if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" &&
if (!is_apple && !is_nacl && current_cpu != "x86" &&
(use_gold || use_lld)) {
if (is_clang) {
# This flag enables the GNU-format pubnames and pubtypes sections,

@ -185,7 +185,7 @@ enable_arm_cfi_table = is_android && !is_component_build && current_cpu == "arm"
declare_args() {
# Set to true to use lld, the LLVM linker.
use_lld = is_clang && (!is_ios && !is_mac)
use_lld = is_clang && !is_apple
}
declare_args() {

@ -25,7 +25,7 @@ config("runtime_library") {
defines = []
ldflags = []
if (!is_mac && !is_ios && sysroot != "") {
if (!is_apple && sysroot != "") {
# Pass the sysroot to all C compiler variants, the assembler, and linker.
sysroot_flags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
if (is_linux || is_chromeos) {

@ -165,7 +165,7 @@ target(_libcxx_target_type, "libc++") {
]
}
}
if (!is_mac && !is_ios && (is_asan || is_tsan || is_msan)) {
if (!is_apple && (is_asan || is_tsan || is_msan)) {
# In {a,t,m}san configurations, operator new and operator delete will be
# provided by the sanitizer runtime library. Since libc++ defines these
# symbols with weak linkage, and the *san runtime uses strong linkage, it

@ -52,7 +52,7 @@ source_set("libc++abi") {
sources += [ "trunk/src/cxa_demangle.cpp" ]
}
if (is_fuchsia || (is_posix && !is_mac && !is_ios)) {
if (is_fuchsia || (is_posix && !is_apple)) {
sources += [ "trunk/src/cxa_thread_atexit.cpp" ]
}

@ -53,7 +53,7 @@ component("os_crypt") {
defines = [ "IS_OS_CRYPT_IMPL" ]
if ((is_posix || is_fuchsia) && !is_mac && !is_ios &&
if ((is_posix || is_fuchsia) && !is_apple &&
(!is_desktop_linux || is_chromecast)) {
sources += [ "os_crypt_posix.cc" ]
}

@ -333,7 +333,7 @@ static_library("browser") {
]
}
if ((is_posix && !is_mac && !is_ios) || is_fuchsia) {
if ((is_posix && !is_apple) || is_fuchsia) {
sources += [ "login_database_posix.cc" ]
}

@ -77,7 +77,7 @@ component("crypto") {
public_deps = [ "//third_party/boringssl" ]
if (!is_mac && !is_ios) {
if (!is_apple) {
sources -= [
"apple_keychain.h",
"mock_apple_keychain.cc",

@ -268,7 +268,7 @@ component("skia") {
"ext/skia_utils_base.cc",
"ext/skia_utils_base.h",
]
if (!is_mac && !is_ios) {
if (!is_apple) {
sources += [
"ext/fontmgr_default.cc",
"ext/fontmgr_default.h",

@ -89,7 +89,7 @@ static_library("hunspell") {
]
}
if (is_posix && !is_mac && !is_ios && !is_clang) {
if (is_posix && !is_apple && !is_clang) {
cflags += [
# affentry.hxx has NULL as default parameter for a FLAG in two
# places.

@ -304,7 +304,7 @@ component("gfx") {
"//third_party/zlib",
]
if (!is_mac && !is_ios) {
if (!is_apple) {
sources += [
"platform_font_skia.cc",
"platform_font_skia.h",
@ -796,7 +796,7 @@ test("gfx_unittests") {
deps += [ "//ui/resources:ui_test_pak_bundle_data" ]
}
if (!is_mac && !is_ios) {
if (!is_apple) {
sources += [
"interpolated_transform_unittest.cc",
"transform_unittest.cc",