Metal.framework must be optional instead of hard requirement.
It's required to execute binary on Mac 10.10. Problem has been revealed after integrating 1002023. It's not visible by default, because clang under the hood changes hard requirement to optional. See: - https://chromium-review.googlesource.com/c/chromium/src/+/1792702 - https://bugs.chromium.org/p/chromium/issues/detail?id=1003381 discussion. Bug: chromium:1003381 Change-Id: I46e8da1092748256985ca4c2b90244f2ac5d422c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12540 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
8d00f5db8f
commit
3c79cf2ab9
11
BUILD.gn
11
BUILD.gn
|
@ -56,6 +56,15 @@ config("libdawn_native_internal") {
|
|||
}
|
||||
}
|
||||
|
||||
config("libdawn_native_weak_framework") {
|
||||
if (is_mac && dawn_enable_metal) {
|
||||
ldflags = [
|
||||
"-weak_framework",
|
||||
"Metal",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
dawn_json_generator("libdawn_native_utils_gen") {
|
||||
target = "dawn_native_utils"
|
||||
outputs = [
|
||||
|
@ -119,6 +128,7 @@ source_set("libdawn_native_sources") {
|
|||
]
|
||||
|
||||
configs += [ ":libdawn_native_internal" ]
|
||||
all_dependent_configs = [ ":libdawn_native_weak_framework" ]
|
||||
libs = []
|
||||
|
||||
# Dependencies that are needed to compile libdawn_native entry points in
|
||||
|
@ -307,7 +317,6 @@ source_set("libdawn_native_sources") {
|
|||
|
||||
if (dawn_enable_metal) {
|
||||
libs += [
|
||||
"Metal.framework",
|
||||
"Cocoa.framework",
|
||||
"IOKit.framework",
|
||||
"IOSurface.framework",
|
||||
|
|
Loading…
Reference in New Issue