commit 4c932da4cb9d1210a2cd492d15069d66900db927
parent 4526cde9d6cefd0c57dd24893da3e5e43e563f9f
Author: Beatriz Rizental <bea@torproject.org>
Date: Mon, 12 Jan 2026 17:15:07 -0300
fixup! BB 43564: Modify ./mach bootstrap for Base Browser
Use our MacOS SDK mirror when bootstrapping for Mac.
Diffstat:
1 file changed, 18 insertions(+), 0 deletions(-)
diff --git a/build/moz.configure/bootstrap.configure b/build/moz.configure/bootstrap.configure
@@ -165,6 +165,7 @@ def bootstrap_path(path, **kwargs):
when=when,
)
@imports("os")
+ @imports("re")
@imports("subprocess")
@imports("sys")
@imports("mozbuild.tbbutils")
@@ -354,6 +355,23 @@ def bootstrap_path(path, **kwargs):
+ command["arguments"]
+ [path_parts[0]]
)
+
+ # BIG HACK: Replace the Apple CDN link with our mirror,
+ # otherwise bootstrapping will fail whenever a new MacOS SDK
+ # is released, since Apple seems to retire the previous link everytime.
+ # Our mirror serves an _unmodified_ version of the file.
+ macosx_sdk_match = re.match(r"^MacOSX(.*)\.sdk$", path_parts[0])
+ if macosx_sdk_match:
+ version = macosx_sdk_match.group(1)
+ command = [
+ re.sub(
+ r"https://swcdn\.apple\.com/.*/CLTools_macOSNMOS_SDK\.pkg",
+ f"https://build-sources.tbb.torproject.org/CLTools_macOSNMOS_SDK-{version}.pkg",
+ c,
+ )
+ for c in command
+ ]
+
# Clean up anything that was bootstrapped previously before going
# forward. In other cases, that's taken care of by mach artifact toolchain.
rmtree(