Commit 51603c63 by Shahbaz Youssefi Committed by Commit Bot

Revert "Use is_apple instead of is_mac and is_ios everywhere"

This reverts commit 2762641a. Reason for revert: is_apple is not universally defined. Breaks ANGLE roll into Skia. Original change's description: > Use is_apple instead of is_mac and is_ios everywhere > > Bug: chromium:1161513 > Change-Id: Id7d582f127f4b79ea6fc5b8ad39fff768c45f477 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611312 > Reviewed-by: James Darpinian <jdarpinian@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> TBR=jdarpinian@chromium.org,syoussefi@chromium.org Bug: chromium:1161513 Change-Id: I831e60149f410044a79d9f66aa9ddd9902410fd7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2618039Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 6e909d94
...@@ -443,7 +443,7 @@ angle_static_library("angle_gpu_info_util") { ...@@ -443,7 +443,7 @@ angle_static_library("angle_gpu_info_util") {
libs += [ "pci" ] libs += [ "pci" ]
} }
if (is_apple) { if (is_mac || is_ios) {
frameworks = [ frameworks = [
"IOKit.framework", "IOKit.framework",
"CoreFoundation.framework", "CoreFoundation.framework",
...@@ -485,7 +485,7 @@ angle_static_library("translator") { ...@@ -485,7 +485,7 @@ angle_static_library("translator") {
_needs_glsl_base = true _needs_glsl_base = true
needs_glsl_and_vulkan_base = true needs_glsl_and_vulkan_base = true
sources += angle_translator_glsl_sources sources += angle_translator_glsl_sources
if (is_apple) { if (is_mac || is_ios) {
sources += angle_translator_glsl_mac_sources sources += angle_translator_glsl_mac_sources
} }
defines += [ "ANGLE_ENABLE_GLSL" ] defines += [ "ANGLE_ENABLE_GLSL" ]
...@@ -772,7 +772,7 @@ angle_source_set("libANGLE_base") { ...@@ -772,7 +772,7 @@ angle_source_set("libANGLE_base") {
suppressed_configs -= [ "//build/config/clang:find_bad_constructs" ] suppressed_configs -= [ "//build/config/clang:find_bad_constructs" ]
} }
if (is_apple) { if (is_mac || is_ios) {
sources += libangle_mac_sources sources += libangle_mac_sources
} }
...@@ -1161,7 +1161,7 @@ if (angle_standalone || build_with_chromium) { ...@@ -1161,7 +1161,7 @@ if (angle_standalone || build_with_chromium) {
"${angle_jsoncpp_dir}:jsoncpp_config", "${angle_jsoncpp_dir}:jsoncpp_config",
] ]
if (is_apple && !is_component_build) { if ((is_ios || is_mac) && !is_component_build) {
ldflags = [ ldflags = [
"-install_name", "-install_name",
"@rpath/${target_name}.dylib", "@rpath/${target_name}.dylib",
......
...@@ -170,7 +170,7 @@ declare_args() { ...@@ -170,7 +170,7 @@ declare_args() {
declare_args() { declare_args() {
# TODO(jdarpinian): Support enabling CGL and EAGL at the same time using the soft linking code. Also support disabling both for Metal-only builds. # TODO(jdarpinian): Support enabling CGL and EAGL at the same time using the soft linking code. Also support disabling both for Metal-only builds.
angle_enable_cgl = angle_enable_gl && !angle_enable_eagl && is_apple angle_enable_cgl = angle_enable_gl && !angle_enable_eagl && (is_mac || is_ios)
angle_has_histograms = angle_has_build angle_has_histograms = angle_has_build
} }
......
...@@ -233,7 +233,7 @@ config("angle_gl_backend_config") { ...@@ -233,7 +233,7 @@ config("angle_gl_backend_config") {
if (angle_enable_gl_null) { if (angle_enable_gl_null) {
defines += [ "ANGLE_ENABLE_OPENGL_NULL" ] defines += [ "ANGLE_ENABLE_OPENGL_NULL" ]
} }
if (is_apple) { if (is_mac || is_ios) {
defines += [ "GL_SILENCE_DEPRECATION" ] defines += [ "GL_SILENCE_DEPRECATION" ]
} }
include_dirs = [ "../../../third_party/khronos" ] include_dirs = [ "../../../third_party/khronos" ]
...@@ -262,7 +262,7 @@ angle_source_set("angle_gl_backend") { ...@@ -262,7 +262,7 @@ angle_source_set("angle_gl_backend") {
"Xext", "Xext",
] ]
} }
if (is_apple) { if (is_mac || is_ios) {
frameworks = [ frameworks = [
"IOSurface.framework", "IOSurface.framework",
"QuartzCore.framework", "QuartzCore.framework",
......
...@@ -77,7 +77,7 @@ if (is_linux || is_chromeos || is_android || is_fuchsia) { ...@@ -77,7 +77,7 @@ if (is_linux || is_chromeos || is_android || is_fuchsia) {
] ]
} }
if (is_apple) { if (is_mac || is_ios) {
libangle_common_sources += [ libangle_common_sources += [
"src/common/apple/SoftLinking.h", "src/common/apple/SoftLinking.h",
"src/common/gl/cgl/FunctionsCGL.cpp", "src/common/gl/cgl/FunctionsCGL.cpp",
......
...@@ -12,8 +12,8 @@ declare_args() { ...@@ -12,8 +12,8 @@ declare_args() {
build_angle_deqp_tests = false build_angle_deqp_tests = false
build_angle_gles1_conform_tests = false build_angle_gles1_conform_tests = false
build_angle_trace_perf_tests = false build_angle_trace_perf_tests = false
build_angle_perftests = build_angle_perftests = is_win || is_linux || is_chromeos || is_android ||
is_win || is_linux || is_chromeos || is_android || is_apple || is_fuchsia is_mac || is_fuchsia || is_ios
} }
angle_test("test_utils_unittest_helper") { angle_test("test_utils_unittest_helper") {
...@@ -86,7 +86,7 @@ template("angle_common_test_utils") { ...@@ -86,7 +86,7 @@ template("angle_common_test_utils") {
"test_utils/angle_test_platform.h", "test_utils/angle_test_platform.h",
"test_utils/gl_raii.h", "test_utils/gl_raii.h",
] ]
if (is_apple) { if (is_mac || is_ios) {
sources += [ sources += [
"test_utils/angle_test_instantiate_apple.h", "test_utils/angle_test_instantiate_apple.h",
"test_utils/angle_test_instantiate_apple.mm", "test_utils/angle_test_instantiate_apple.mm",
...@@ -124,7 +124,7 @@ angle_test("angle_unittests") { ...@@ -124,7 +124,7 @@ angle_test("angle_unittests") {
if (angle_enable_essl && angle_enable_glsl) { if (angle_enable_essl && angle_enable_glsl) {
sources += angle_unittests_compiler_tests_sources sources += angle_unittests_compiler_tests_sources
if (is_apple) { if (is_mac || is_ios) {
sources += angle_unittests_glsl_mac_sources sources += angle_unittests_glsl_mac_sources
} }
} }
...@@ -151,7 +151,8 @@ angle_test("angle_unittests") { ...@@ -151,7 +151,8 @@ angle_test("angle_unittests") {
} }
} }
if (is_win || is_linux || is_chromeos || is_android || is_fuchsia || is_apple) { if (is_win || is_linux || is_chromeos || is_mac || is_android || is_fuchsia ||
is_ios) {
import("angle_end2end_tests.gni") import("angle_end2end_tests.gni")
angle_test("angle_end2end_tests") { angle_test("angle_end2end_tests") {
...@@ -220,7 +221,7 @@ if (is_win || is_linux || is_chromeos || is_android || is_fuchsia || is_apple) { ...@@ -220,7 +221,7 @@ if (is_win || is_linux || is_chromeos || is_android || is_fuchsia || is_apple) {
} }
} }
if (is_win || is_linux || is_chromeos || is_android || is_apple) { if (is_win || is_linux || is_chromeos || is_mac || is_android || is_ios) {
import("angle_white_box_tests.gni") import("angle_white_box_tests.gni")
angle_test("angle_white_box_tests") { angle_test("angle_white_box_tests") {
...@@ -294,7 +295,7 @@ angle_perftests_common("angle_perftests_static") { ...@@ -294,7 +295,7 @@ angle_perftests_common("angle_perftests_static") {
test_utils = ":angle_common_test_utils_static" test_utils = ":angle_common_test_utils_static"
} }
if (is_win || is_linux || is_chromeos || is_android || is_apple) { if (is_win || is_linux || is_chromeos || is_android || is_mac || is_ios) {
import("angle_perftests.gni") import("angle_perftests.gni")
# This test suite is for perf tests that use ANGLE's internals in some direct way. # This test suite is for perf tests that use ANGLE's internals in some direct way.
...@@ -312,7 +313,8 @@ if (is_win || is_linux || is_chromeos || is_android || is_apple) { ...@@ -312,7 +313,8 @@ if (is_win || is_linux || is_chromeos || is_android || is_apple) {
# These tests depend on vulkan_command_buffer_utils, which is # These tests depend on vulkan_command_buffer_utils, which is
# not yet compatible with mac and vulkan display/headless backend. # not yet compatible with mac and vulkan display/headless backend.
if (angle_enable_vulkan && !angle_use_vulkan_display && !is_apple) { if (angle_enable_vulkan && !angle_use_vulkan_display && !is_mac &&
!is_ios) {
sources += angle_white_box_perf_tests_vulkan_sources sources += angle_white_box_perf_tests_vulkan_sources
deps += [ deps += [
"$angle_glslang_dir:glslang_lib_sources", "$angle_glslang_dir:glslang_lib_sources",
...@@ -404,7 +406,7 @@ if (build_angle_gles1_conform_tests) { ...@@ -404,7 +406,7 @@ if (build_angle_gles1_conform_tests) {
] ]
# This is used by the tests to typedef uint32_t. For some reason only needed on mac. # This is used by the tests to typedef uint32_t. For some reason only needed on mac.
if (is_apple) { if (is_mac || is_ios) {
defines += [ "__linux" ] defines += [ "__linux" ]
} }
...@@ -605,7 +607,7 @@ if (build_angle_gles1_conform_tests) { ...@@ -605,7 +607,7 @@ if (build_angle_gles1_conform_tests) {
] ]
} }
if (!is_win && !is_apple) { if (!is_win && !is_mac && !is_ios) {
source_set("angle_gles1_covgl_no_gtest") { source_set("angle_gles1_covgl_no_gtest") {
configs += [ configs += [
":angle_gles1_conform_support", ":angle_gles1_conform_support",
...@@ -907,7 +909,7 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -907,7 +909,7 @@ if (build_angle_deqp_tests && !is_fuchsia) {
# This has to be GNU_SOURCE as on Linux dEQP uses syscall() # This has to be GNU_SOURCE as on Linux dEQP uses syscall()
defines += [ "_GNU_SOURCE" ] defines += [ "_GNU_SOURCE" ]
} }
if (is_android || is_apple) { if (is_android || is_mac || is_ios) {
# _XOPEN_SOURCE=600 is what is used in deqp/src/Android.mk # _XOPEN_SOURCE=600 is what is used in deqp/src/Android.mk
defines += [ "_XOPEN_SOURCE=600" ] defines += [ "_XOPEN_SOURCE=600" ]
} }
...@@ -1038,7 +1040,7 @@ if (build_angle_deqp_tests && !is_fuchsia) { ...@@ -1038,7 +1040,7 @@ if (build_angle_deqp_tests && !is_fuchsia) {
if (is_win) { if (is_win) {
sources += deqp_framework_delibs_sources_win sources += deqp_framework_delibs_sources_win
} }
if (is_linux || is_chromeos || is_android || is_apple) { if (is_linux || is_chromeos || is_android || is_mac || is_ios) {
sources += deqp_framework_delibs_sources_unix sources += deqp_framework_delibs_sources_unix
} }
...@@ -1476,7 +1478,7 @@ group("angle_tests") { ...@@ -1476,7 +1478,7 @@ group("angle_tests") {
":angle_gles1_covegl_no_gtest", ":angle_gles1_covegl_no_gtest",
":angle_gles1_primtest_tests", ":angle_gles1_primtest_tests",
] ]
if (!is_win && !is_apple) { if (!is_win && !is_mac && !is_ios) {
deps += [ ":angle_gles1_covgl_tests" ] deps += [ ":angle_gles1_covgl_tests" ]
} }
} }
......
...@@ -193,7 +193,7 @@ foreach(is_shared_library, ...@@ -193,7 +193,7 @@ foreach(is_shared_library,
] ]
} }
if (is_apple) { if (is_mac || is_ios) {
frameworks = [ "QuartzCore.framework" ] frameworks = [ "QuartzCore.framework" ]
if (is_mac) { if (is_mac) {
frameworks += [ "AppKit.framework" ] frameworks += [ "AppKit.framework" ]
......
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