Source code
Revision control
Copy as Markdown
Other Tools
From 0bb8444e2f8189eaa97198028b2bf9dc46986a0d Mon Sep 17 00:00:00 2001
From: Jamie Nicol <jnicol@mozilla.com>
Date: Wed, 27 May 2026 15:48:47 +0100
Subject: [PATCH] Disable Metal internal shader compilation
This disables building ANGLE's internal shaders at build-time. We
cannot currently support this in Firefox for a few reasons:
1) Firefox's vendored fork of the chromium build repo does not contain
the required xcode toolchains, meaning the generated moz.build files
will attempt to execute a `metallib` binary that does not exist.
2) We could alternatively attempt to configure gn_processor use the
system xcode, but this would require developers to have the Metal
toolchain installed in order to build Firefox.
3) This results in a chain of GeneratedFile declarations, each one
generating a file that is used as an input to the next, spread across
several different moz.build files. Mozbuild does not currently handle
the dependencies between GeneratedFiles located separate moz.build
files.
So for now we disable the compilation of ANGLE's internal shaders at
build time. They will be compiled at run time instead.
---
src/libANGLE/renderer/metal/metal_backend.gni | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libANGLE/renderer/metal/metal_backend.gni b/src/libANGLE/renderer/metal/metal_backend.gni
index ef8c6ad9f4..129c880eed 100644
--- a/src/libANGLE/renderer/metal/metal_backend.gni
+++ b/src/libANGLE/renderer/metal/metal_backend.gni
@@ -90,7 +90,7 @@ metal_backend_sources = [
# We can build the ANGLE internal shaders at build-time if we have access to the Mac SDK in the "build" dir.
# Building internal shaders for iOS is not supported. The Chromium Mac SDK does not have all the required files.
# This is also an issue when cross-compiling for mac.
-metal_internal_shader_compilation_supported =
+metal_internal_shader_compilation_supported = false &&
angle_has_build && !is_ios && target_os == host_os
metal_internal_shaders_header =
--
2.55.0