mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
Add an experimental build-only continuous cross compile build for MacOS x86
PiperOrigin-RevId: 617611779
This commit is contained in:
parent
9862236ae8
commit
3f1330805c
25
.bazelrc
25
.bazelrc
@ -320,6 +320,31 @@ build:rbe_cross_compile_base --strategy_regexp='Executing genrule @llvm-project.
|
||||
build:rbe_cross_compile_linux_arm64 --config=cross_compile_linux_arm64
|
||||
build:rbe_cross_compile_linux_arm64 --config=rbe_cross_compile_base
|
||||
# END LINUX AARCH64 CROSS-COMPILE CONFIGS
|
||||
|
||||
# START MACOS CROSS-COMPILE CONFIGS
|
||||
build:cross_compile_macos_x86 --config=cross_compile_base
|
||||
build:cross_compile_macos_x86 --config=nonccl
|
||||
# Target Catalina (10.15) as the minimum supported OS
|
||||
build:cross_compile_macos_x86 --action_env MACOSX_DEPLOYMENT_TARGET=10.15
|
||||
|
||||
# Set the target CPU to Darwin x86
|
||||
build:cross_compile_macos_x86 --platforms=@xla//tools/toolchains/cross_compile/config:darwin_x86_64
|
||||
build:cross_compile_macos_x86 --cpu=darwin
|
||||
build:cross_compile_macos_x86 --crosstool_top=@xla//tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
|
||||
# When RBE cross-compiling for macOS, we need to explicitly register the
|
||||
# toolchain. Otherwise, oddly, RBE complains that a "docker container must be
|
||||
# specified".
|
||||
build:cross_compile_macos_x86 --extra_toolchains=@xla//tools/toolchains/cross_compile/config:macos-x86-cross-compile-cc-toolchain
|
||||
# Map --platforms=darwin_x86_64 to --cpu=darwin and vice-versa to make selects()
|
||||
# and transistions that use these flags work. The flag --platform_mappings needs
|
||||
# to be set to a file that exists relative to the package path roots.
|
||||
build:cross_compile_macos_x86 --platform_mappings=platform_mappings
|
||||
|
||||
# RBE cross-compile configs for Darwin x86
|
||||
build:rbe_cross_compile_macos_x86 --config=cross_compile_macos_x86
|
||||
build:rbe_cross_compile_macos_x86 --config=rbe_cross_compile_base
|
||||
# END MACOS CROSS-COMPILE CONFIGS
|
||||
|
||||
# END CROSS-COMPILE CONFIGS
|
||||
|
||||
#############################################################################
|
||||
|
11
jax/oss/platform_mappings
Normal file
11
jax/oss/platform_mappings
Normal file
@ -0,0 +1,11 @@
|
||||
platforms:
|
||||
# Maps "--platforms=//tools/toolchains/cross_compile/config:darwin_x86_64"
|
||||
# to "--cpu=darwin".
|
||||
//tools/toolchains/cross_compile/config:darwin_x86_64
|
||||
--cpu=darwin
|
||||
|
||||
flags:
|
||||
# Maps "--cpu=darwin" to
|
||||
# "--platforms=//tools/toolchains/cross_compile/config:darwin_x86_64".
|
||||
--cpu=darwin
|
||||
//tools/toolchains/cross_compile/config:darwin_x86_64
|
Loading…
x
Reference in New Issue
Block a user