Skip to main content
Glama
BUCK4.07 kB
# The custom platform for SI. This is taken from the prelude, but includes our customizations for # rust build flags. # # Essentially, we should be adding any custom configuration into root//config, and then plumbing it # through the execution_platform defined below. # # To actually add new configuration, you'll extend the relevant python function to output the # correct configuration info, and then you can use it in a select() statement at will. load(":defs.bzl", "execution_platform", "host_configuration") prelude = native _rust_build_mode = read_root_config("rustc", "mode", "build_debug") _rust_build_mode_constraint = "root//config:" + _rust_build_mode execution_platform( name = "default", cpu_configuration = host_configuration.cpu, os_configuration = host_configuration.os, rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = host_info().os.is_windows, ) # Cross-compilation target platforms execution_platform( name = "linux-x86_64", cpu_configuration = "prelude//cpu:x86_64", os_configuration = "prelude//os:linux", rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = False, ) execution_platform( name = "linux-aarch64", cpu_configuration = "prelude//cpu:arm64", os_configuration = "prelude//os:linux", rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = False, ) execution_platform( name = "darwin-x86_64", cpu_configuration = "prelude//cpu:x86_64", os_configuration = "prelude//os:macos", rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = False, ) execution_platform( name = "darwin-aarch64", cpu_configuration = "prelude//cpu:arm64", os_configuration = "prelude//os:macos", rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = False, ) execution_platform( name = "windows-x86_64", cpu_configuration = "prelude//cpu:x86_64", os_configuration = "prelude//os:windows", rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = True, ) execution_platform( name = "windows-aarch64", cpu_configuration = "prelude//cpu:arm64", os_configuration = "prelude//os:windows", rust_build_mode = _rust_build_mode_constraint, use_windows_path_separators = True, ) prelude.constraint_setting( name = "runs_remote", ) prelude.constraint_value( name = "may_run_remote", constraint_setting = ":runs_remote", visibility = ["PUBLIC"], ) prelude.constraint_setting( name = "runs_local", visibility = ["PUBLIC"], ) prelude.constraint_value( name = "may_run_local", constraint_setting = ":runs_local", visibility = ["PUBLIC"], ) prelude.constraint_setting( name = "runs_only", ) prelude.constraint_value( name = "runs_only_local", constraint_setting = ":runs_only", visibility = ["PUBLIC"], ) prelude.constraint_value( name = "runs_only_remote", constraint_setting = ":runs_only", visibility = ["PUBLIC"], ) prelude.constraint_setting( name = "fat_platform_marker", ) prelude.constraint_value( name = "fat_platform_enabled", constraint_setting = ":fat_platform_marker", visibility = ["PUBLIC"], ) # This is mostly here for a rule type to add a dependency on it to mark all # instances of that rule type as incompatible with a fat platform. Ideally, # toolchains could affect the target compatibility of their users directly but # toolchains are currently all exec deps and so cannot do that. We'd like # buck2 to support a form of dep that inherited its users execution platform # so that toolchains could basically get visibility and affect both target and # execution configuration, but that's not implemented yet. export_file( name = "fat_platform_incompatible", # @oss-disable: src = "TARGETS.v2", src = "BUCK", # @oss-enable target_compatible_with = select({ ":fat_platform_enabled": ["config//:none"], "DEFAULT": [], }), visibility = ["PUBLIC"], )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server