• Home
  • Raw
  • Download

Lines Matching +full:toolchain +full:- +full:version

34 # Re-export `load_arbitrary_tool` as it's historically been used in external repositories.
39 "aarch64-apple-darwin": "rust_darwin_aarch64",
40 "aarch64-pc-windows-msvc": "rust_windows_aarch64",
41 "aarch64-unknown-linux-gnu": "rust_linux_aarch64",
42 "x86_64-apple-darwin": "rust_darwin_x86_64",
43 "x86_64-pc-windows-msvc": "rust_windows_x86_64",
44 "x86_64-unknown-freebsd": "rust_freebsd_x86_64",
45 "x86_64-unknown-linux-gnu": "rust_linux_x86_64",
55 …mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
56 … "https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
63 … urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"],
65 strip_prefix = "rules_cc-0.0.9",
71 …azel.build/github.com/bazelbuild/rules_license/releases/download/0.0.8/rules_license-0.0.8.tar.gz",
72 … "https://github.com/bazelbuild/rules_license/releases/download/0.0.8/rules_license-0.0.8.tar.gz",
82 …https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib
83 … "https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
96 # process_wrapper needs a low-dependency way to process json.
107 # buildifier: disable=unnamed-macro
122 version = None,
132 …"rust-1.46.0-x86_64-unknown-linux-gnu": "e3b98bc3440fe92817881933f9564389eccb396f5f431f33d48b979fa…
133 …"rustfmt-1.4.12-x86_64-unknown-linux-gnu": "1894e76913303d66bf40885a601462844eec15fca9e76a6d13c390…
134 …"rust-std-1.46.0-x86_64-unknown-linux-gnu": "ac04aef80423f612c0079829b504902de27a6997214eb58ab0765…
137 …his would match for `exec_triple = "x86_64-unknown-linux-gnu"`. If not specified, rules_rust pull…
143 …ts (bool, optional): Whether to download the rustc-dev components (defaults to False). Requires ve…
149version of rustfmt. If none is supplied and only a single version in `versions` is given, then thi…
150 rust_analyzer_version (str, optional): The version of Rustc to pair with rust-analyzer.
152 …extra_target_triples (list, optional): Additional rust-style targets that rust toolchains should s…
153 …l): Dictionary of target triples to list of extra flags to pass to rustc in non-exec configuration.
155 …urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file s…
156 version (str, optional): **Deprecated**: Use `versions` instead.
157 …versions (list, optional): A list of toolchain versions to download. This paramter only accepts on…
158 per channel. E.g. `["1.65.0", "nightly/2022-11-02", "beta/2020-12-30"]`.
160 if version:
162 …oolchains.version` is deprecated. Please use `versions` instead: https://bazelbuild.github.io/rule…
166 …` instead: https://bazelbuild.github.io/rules_rust/flatten.html#rust_register_toolchains-versions")
170 …requires iso date to be included in the string. E.g. `nightly/2022-12-15`. This version will be as…
174 if version:
175 versions = [version]
192 …fail("rustc-dev components were requested but no \"nightly\" is being registered. Please update `v…
197 rust_analyzer_repo_name = "rust_analyzer_{}".format(rust_analyzer_version.replace("/", "-"))
211 version = rust_analyzer_version,
226 native.register_toolchains("@{}//:toolchain".format(
252 version = version,
256 rustfmt_repo_name = "rustfmt_{}__{}".format(rustfmt_version.replace("/", "-"), exec_triple)
261 version = rustfmt_version_or_channel,
269 native.register_toolchains("@{}//:toolchain".format(
273 …for toolchain in _get_toolchain_repositories(name, exec_triple, extra_target_triples, versions, is…
274 toolchain_names.append(toolchain.name)
275 … toolchain_labels[toolchain.name] = "@{}//:{}".format(toolchain.name + "_tools", "rust_toolchain")
276 … exec_compatible_with_by_toolchain[toolchain.name] = triple_to_constraint_set(exec_triple)
277 …target_compatible_with_by_toolchain[toolchain.name] = triple_to_constraint_set(toolchain.target_tr…
278 toolchain_types[toolchain.name] = "@rules_rust//rust:toolchain"
295 # buildifier: disable=unnamed-macro
322 …doc = "Whether to download the rustc-dev components (defaults to False). Requires version to be \"…
332 doc = "The Rust-style target that this compiler runs on",
339 doc = "Extra flags to pass to rustc in non-exec configuration",
346 doc = "The date of the tool (or None, if the version is a specific version).",
355 doc = "The version of the tool among \"nightly\", \"beta\", or an exact version.",
361 doc = "The Rust-style target that this compiler builds for.",
365 …doc = "A list of mirror urls containing the tools from the Rust-lang static file server. These mus…
368 "version": attr.string(
369 doc = "The version of the tool among \"nightly\", \"beta\", or an exact version.",
375 """The implementation of the rust toolchain tools repository rule."""
378 version = ctx.attr.version
379 version_array = version.split("/")
381 version = version_array[0]
384 check_version_valid(ctx.attr.version, iso_date)
392 version = version,
398 version = version,
404 version = version,
429 version = rustfmt_version,
435 …# Rust 1.45.0 and nightly builds after 2020-05-22 need the llvm-tools gzip to get the libLLVM dylib
436 include_llvm_tools = version >= "1.45.0" or (version == "nightly" and iso_date > "2020-05-22")
489 … "Composes a single workspace containing the toolchain components for compiling on a given " +
493 … "invocation to declare its toolchains to Bazel; the indirection allows separating toolchain " +
494 "selection from toolchain fetching."
506 name = "toolchain",
507 toolchain = repository_ctx.attr.toolchain,
516 "Generates a toolchain-bearing repository that declares the toolchains from some other " +
521 doc = "A list of constraints for the execution platform for this toolchain.",
524 doc = "A list of constraints for the target platform for this toolchain.",
527 …satisfied by the target configuration in order for this toolchain to be selected during toolchain
529 "toolchain": attr.string(
530 doc = "The name of the toolchain implementation target.",
534 doc = "The toolchain type of the toolchain to declare",
544 # N.B. A "proxy repository" is needed to allow for registering the toolchain (with constraints)
545 # without actually downloading the toolchain.
548 version,
569 """Assembles a remote repository for the given toolchain params, produces a proxy repository \
570 to contain the toolchain declaration, and registers the toolchains.
574 version (str): The version of the tool among "nightly", "beta", or an exact version.
575 exec_triple (str): The Rust-style target that this compiler runs on.
576 target_triple (str): The Rust-style target to build for.
577 channel (str, optional): The channel of the Rust toolchain.
578 …patible_with (list, optional): A list of constraints for the execution platform for this toolchain.
579 …compatible_with (list, optional): A list of constraints for the target platform for this toolchain.
580 …satisfied by the target configuration in order for this toolchain to be selected during toolchain
584 rustfmt_version (str, optional): The version of rustfmt to be associated with the
585 toolchain.
587 dev_components (bool, optional): Whether to download the rustc-dev components.
588 Requires version to be "nightly". Defaults to False.
589 extra_rustc_flags (list, optional): Extra flags to pass to rustc in non-exec configuration.
591 opt_level (dict, optional): Optimization level config for this toolchain.
594 …ust-lang static file server. These must contain the '{}' used to substitute the tool being fetched…
601 str: The name of the registerable toolchain created by this rule.
606 …requires iso date to be included in the string. E.g. `nightly/2022-12-15`. This version will be as…
624 version = version,
638 …channel_target_settings = ["@rules_rust//rust/toolchain/channel:{}".format(channel)] if channel el…
642 toolchain = "@{}//:rust_toolchain".format(tools_repo_name),
644 toolchain_type = "@rules_rust//rust:toolchain",
649 return "@{name}//:toolchain".format(
664 doc = "The date of the tool (or None, if the version is a specific version).",
673 …doc = "A list of mirror urls containing the tools from the Rust-lang static file server. These mus…
676 "version": attr.string(
677 doc = "The version of the tool among \"nightly\", \"beta\", or an exact version.",
688 version = repository_ctx.attr.version,
700 version = repository_ctx.attr.version,
707 …if includes_rust_analyzer_proc_macro_srv(repository_ctx.attr.version, repository_ctx.attr.iso_date…
730 doc = "A repository rule for defining a rust_analyzer_toolchain with a `rust-src` artifact.",
737 version,
749 … name (str): The name of the toolchain proxy repository contianing the registerable toolchain.
750 version (str): The version of the tool among "nightly", "beta', or an exact version.
751 …patible_with (list, optional): A list of constraints for the execution platform for this toolchain.
752 …compatible_with (list, optional): A list of constraints for the target platform for this toolchain.
756 …ust-lang static file server. These must contain the '{}' used to substitute the tool being fetched…
767 version = version,
778 toolchain = "@{}//:{}".format(name + "_tools", "rust_analyzer_toolchain"),
784 return "@{}//:toolchain".format(
799 doc = "The Rust-style triple Rustfmt is expected to run on.",
803 doc = "The date of the tool (or None, if the version is a specific version).",
812 …doc = "A list of mirror urls containing the tools from the Rust-lang static file server. These mus…
815 "version": attr.string(
816 doc = "The version of the tool among \"nightly\", \"beta\", or an exact version.",
837 version = repository_ctx.attr.version,
843 version = repository_ctx.attr.version,
878 version,
892 … name (str): The name of the toolchain proxy repository contianing the registerable toolchain.
893 version (str): The version of the tool among "nightly", "beta', or an exact version.
895 …patible_with (list, optional): A list of constraints for the execution platform for this toolchain.
896 …compatible_with (list, optional): A list of constraints for the target platform for this toolchain.
898 channel (str, optional): The channel value to with which to constrain the toolchain.
901 …ust-lang static file server. These must contain the '{}' used to substitute the tool being fetched…
915 version = version,
927 toolchain = "@{}//:{}".format(name + "_tools", "rustfmt_toolchain"),
929 … target_settings = ["@rules_rust//rust/toolchain/channel:{}".format(channel)] if channel else None,
934 return "@{}//:toolchain".format(
950 "Generates a toolchain-bearing repository that declares the toolchains from some other " +
968 for version in versions:
969 if version.startswith(("beta", "nightly")):
970 channel, _, date = version.partition("/")
975 ver = version
983 version = ver,
986 # Define toolchains for each requested version
1000 version = None,
1020 """Assembles a remote repository for the given toolchain params, produces a proxy repository \
1021 to contain the toolchain declaration, and registers the toolchains.
1025 exec_triple (str): The Rust-style target that this compiler runs on
1026 …arget configuration in order for this set of toolchains to be selected during toolchain resolution.
1027 version (str): The version of the tool among "nightly", "beta', or an exact version.
1028 …versions (list, optional): A list of toolchain versions to download. This paramter only accepts on…
1029 per channel. E.g. `["1.65.0", "nightly/2022-11-02", "beta/2020-12-30"]`.
1033 extra_target_triples (list or map, optional): Additional rust-style targets that this set of
1036 rustfmt_version (str, optional): The version of rustfmt to be associated with the
1037 toolchain.
1040 dev_components (bool, optional): Whether to download the rustc-dev components.
1041 Requires version to be "nightly".
1042 …l): Dictionary of target triples to list of extra flags to pass to rustc in non-exec configuration.
1047 …urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file s…
1054 …oolchain (bool): If True, the generated `rust_toolchain` target will become a registered toolchain.
1055 …patible_with (list, optional): A list of constraints for the execution platform for this toolchain.
1056 …list, optional): A list of constraints for the target platform for this toolchain when the exec pl…
1059 if version and versions:
1060 … fail("`version` and `versions` attributes are mutually exclusive. Update {} to use one".format(
1064 if not version and not versions:
1065 fail("`version` or `versions` attributes are required. Update {} to use one".format(
1069 if version:
1071 … print("`rust_repository_set.version` is deprecated. Instead use `rust_repository_set.versions`")
1073 if version and not versions:
1074 versions = [version]
1076 …# extra_target_triples may be a dict or list - make a list we can pass to _get_toolchain_repositor…
1082 …for toolchain in _get_toolchain_repositories(name, exec_triple, extra_target_triples_list, version…
1084 if toolchain.target_triple == exec_triple:
1085 …# The exec triple implicitly gets a toolchain with itself as a target - use default_target_compati…
1088 target_compatible_with = extra_target_triples.get(toolchain.target_triple)
1090 …# Infer toolchain-specific rustc flags depending on the type (list, dict, optional) of extra_rustc…
1096 toolchain_extra_rustc_flags = extra_rustc_flags.get(toolchain.target_triple)
1101 name = toolchain.name,
1107 channel = toolchain.channel.name,
1113 opt_level = opt_level.get(toolchain.target_triple) if opt_level != None else None,
1115 iso_date = toolchain.channel.iso_date,
1118 target_triple = toolchain.target_triple,
1120 version = toolchain.channel.version,