Hash :
bae95f81
Author :
Date :
2020-07-02T17:19:14
Convert GN libs lists to frameworks GN recently added support for Apple frameworks to link, rather than overloading the libs lists. This pulls .frameworks out of the libs lists, so that GN can stop supporting .frameworks in libs in the future. Bug: chromium:1052560 Change-Id: I3aed298db01bdb5f6e7f37a74c1bbc06f99d760c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2279931 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This file houses the build configuration for the ANGLE Metal back-end.
import("../../../../gni/angle.gni")
assert(is_mac)
assert(angle_enable_metal)
_metal_backend_sources = [
"BufferMtl.h",
"BufferMtl.mm",
"CompilerMtl.h",
"CompilerMtl.mm",
"ContextMtl.h",
"ContextMtl.mm",
"DisplayMtl.h",
"DisplayMtl.mm",
"DisplayMtl_api.h",
"FrameBufferMtl.h",
"FrameBufferMtl.mm",
"ProgramMtl.h",
"ProgramMtl.mm",
"RenderBufferMtl.h",
"RenderBufferMtl.mm",
"RenderTargetMtl.h",
"RenderTargetMtl.mm",
"ShaderMtl.h",
"ShaderMtl.mm",
"SurfaceMtl.h",
"SurfaceMtl.mm",
"TextureMtl.h",
"TextureMtl.mm",
"VertexArrayMtl.h",
"VertexArrayMtl.mm",
"mtl_buffer_pool.h",
"mtl_buffer_pool.mm",
"mtl_command_buffer.h",
"mtl_command_buffer.mm",
"mtl_common.h",
"mtl_common.mm",
"mtl_format_table_autogen.mm",
"mtl_format_utils.h",
"mtl_format_utils.mm",
"mtl_glslang_utils.h",
"mtl_glslang_utils.mm",
"mtl_render_utils.h",
"mtl_render_utils.mm",
"mtl_resources.h",
"mtl_resources.mm",
"mtl_state_cache.h",
"mtl_state_cache.mm",
"mtl_utils.h",
"mtl_utils.mm",
"shaders/compiled/mtl_default_shaders.inc",
"shaders/mtl_default_shaders_src_autogen.inc",
]
config("angle_metal_backend_config") {
defines = [ "ANGLE_ENABLE_METAL" ]
ldflags = [
"-weak_framework",
"Metal",
]
}
angle_source_set("angle_metal_backend") {
public_configs = [ ":angle_metal_backend_config" ]
sources = _metal_backend_sources
cflags = []
cflags_cc = []
cflags_objc = []
cflags_objcc = []
ldflags = []
libs = []
public_deps = [
"${angle_root}:angle_glslang_wrapper",
"${angle_root}:libANGLE_headers",
]
deps = [ "${angle_spirv_cross_dir}/gn:spirv_cross_sources" ]
objc_flags = [
"-Wno-nullability-completeness",
"-Wno-unguarded-availability",
"-fno-objc-arc",
]
cflags_objc += objc_flags
cflags_objcc += objc_flags
if (is_mac) {
frameworks = [
"Cocoa.framework",
"IOSurface.framework",
"QuartzCore.framework",
]
}
# TODO(hqle): iOS support.
}