@@ -320,6 +320,31 @@ build:rbe_cross_compile_base --strategy_regexp='Executing genrule @llvm-project.
320
320
build:rbe_cross_compile_linux_arm64 --config=cross_compile_linux_arm64
321
321
build:rbe_cross_compile_linux_arm64 --config=rbe_cross_compile_base
322
322
# END LINUX AARCH64 CROSS-COMPILE CONFIGS
323
+
324
+ # START MACOS CROSS-COMPILE CONFIGS
325
+ build:cross_compile_macos_x86 --config=cross_compile_base
326
+ build:cross_compile_macos_x86 --config=nonccl
327
+ # Target Catalina (10.15) as the minimum supported OS
328
+ build:cross_compile_macos_x86 --action_env MACOSX_DEPLOYMENT_TARGET=10.15
329
+
330
+ # Set the target CPU to Darwin x86
331
+ build:cross_compile_macos_x86 --platforms=@xla//tools/toolchains/cross_compile/config:darwin_x86_64
332
+ build:cross_compile_macos_x86 --cpu=darwin
333
+ build:cross_compile_macos_x86 --crosstool_top=@xla//tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
334
+ # When RBE cross-compiling for macOS, we need to explicitly register the
335
+ # toolchain. Otherwise, oddly, RBE complains that a "docker container must be
336
+ # specified".
337
+ build:cross_compile_macos_x86 --extra_toolchains=@xla//tools/toolchains/cross_compile/config:macos-x86-cross-compile-cc-toolchain
338
+ # Map --platforms=darwin_x86_64 to --cpu=darwin and vice-versa to make selects()
339
+ # and transistions that use these flags work. The flag --platform_mappings needs
340
+ # to be set to a file that exists relative to the package path roots.
341
+ build:cross_compile_macos_x86 --platform_mappings=platform_mappings
342
+
343
+ # RBE cross-compile configs for Darwin x86
344
+ build:rbe_cross_compile_macos_x86 --config=cross_compile_macos_x86
345
+ build:rbe_cross_compile_macos_x86 --config=rbe_cross_compile_base
346
+ # END MACOS CROSS-COMPILE CONFIGS
347
+
323
348
# END CROSS-COMPILE CONFIGS
324
349
325
350
#############################################################################
0 commit comments