Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion misc/completions/bash/_mzcompose
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ _shtab_mzcompose_completion_option_strings=('-h' '--help')

_shtab_mzcompose_pos_0_choices=('build' 'config' 'cp' 'create' 'describe' 'ls' 'list' 'description' 'down' 'events' 'exec' 'gen-shortcuts' 'help' 'images' 'kill' 'list-compositions' 'list-workflows' 'logs' 'pause' 'port' 'ps' 'pull' 'push' 'restart' 'rm' 'run' 'scale' 'start' 'stop' 'sql' 'top' 'unpause' 'up' 'web' 'completion')
_shtab_mzcompose___sanitizer_choices=('address' 'hwaddress' 'cfi' 'thread' 'leak' 'undefined' 'none')
_shtab_mzcompose___arch_choices=('X86_64' 'AARCH64')
_shtab_mzcompose_completion_pos_0_choices=('bash' 'zsh' 'tcsh')

_shtab_mzcompose_pos_0_nargs=A...
Expand Down
2 changes: 1 addition & 1 deletion misc/completions/zsh/_mzcompose
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ _shtab_mzcompose_options=(
"--optimized[build Rust binaries with the optimized profile (optimizations, no LTO, no debug symbols)]"
"--coverage[whether to enable code coverage compilation flags]"
"--sanitizer[whether to enable a sanitizer]:sanitizer:(address hwaddress cfi thread leak undefined none)"
"--arch[the CPU architecture to build for]:arch:(X86_64 AARCH64)"
"--arch[the CPU architecture to build for]:arch:"
"--image-registry[the Docker image registry to pull images from and push images to]:image_registry:"
"--image-prefix[a prefix to apply to all Docker image names]:image_prefix:"
)
Expand Down
14 changes: 12 additions & 2 deletions misc/python/materialize/mzbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,12 +1500,22 @@ def install_arguments(parser: argparse.ArgumentParser) -> None:
type=Sanitizer,
choices=Sanitizer,
)

def _parse_arch(s: str) -> Arch:
try:
return Arch(s)
except ValueError:
valid = ", ".join(m.value for m in Arch)
raise argparse.ArgumentTypeError(
f"invalid arch: {s!r} (choose from {valid})"
)

parser.add_argument(
"--arch",
default=Arch.host(),
help="the CPU architecture to build for",
type=Arch,
choices=Arch,
type=_parse_arch,
metavar="{" + ",".join(m.value for m in Arch) + "}",
)
parser.add_argument(
"--image-registry",
Expand Down
2 changes: 1 addition & 1 deletion misc/python/materialize/xcompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def _bootstrap_darwin(arch: Arch) -> None:
# Building in Docker for Mac is painfully slow, so we install a
# cross-compiling toolchain on the host and use that instead.

BOOTSTRAP_VERSION = "6"
BOOTSTRAP_VERSION = "7"
BOOTSTRAP_FILE = MZ_ROOT / "target-xcompile" / target(arch) / ".xcompile-bootstrap"
try:
contents = BOOTSTRAP_FILE.read_text()
Expand Down
Loading