diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 00000000..6ffa81e5 --- /dev/null +++ b/.bazelrc @@ -0,0 +1 @@ +build --@rules_rust//:extra_rustc_flags=-Clink-arg=-fuse-ld=lld diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b82cd99..a0e581fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,8 @@ jobs: chmod +x install.sh ./install.sh --user echo $HOME/bin >> $GITHUB_PATH + - name: Install lld + run: sudo apt-get install lld - run: bazel run demo --verbose_failures --noshow_progress - run: bazel test ... --verbose_failures --noshow_progress diff --git a/WORKSPACE b/WORKSPACE index 64e70e2e..85ebf7ff 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,11 +4,11 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "rules_rust", - sha256 = "697a6f4f2adbd1b00f792346d6eca4cd45f691be63069c7d7ebf4fcf82a377a8", - strip_prefix = "rules_rust-8bad4c5e4e53d9f6f8d4d5228e26a44d92f37ab2", + sha256 = "4d6aa4554eaf5c7bf6da1dd1371b1455b3234676b234a299791635c50c61df91", + strip_prefix = "rules_rust-238b998f108a099e5a227dbe312526406dda1f2d", urls = [ - # Master branch as of 2021-04-11 - "https://github.com/bazelbuild/rules_rust/archive/8bad4c5e4e53d9f6f8d4d5228e26a44d92f37ab2.tar.gz", + # Main branch as of 2021-10-01 + "https://github.com/bazelbuild/rules_rust/archive/238b998f108a099e5a227dbe312526406dda1f2d.tar.gz", ], ) diff --git a/tools/bazel/vendor.bzl b/tools/bazel/vendor.bzl index e51adb7b..017f82a4 100644 --- a/tools/bazel/vendor.bzl +++ b/tools/bazel/vendor.bzl @@ -2,7 +2,8 @@ of a crate in the current workspace. """ -load("@rules_rust//rust:repositories.bzl", "DEFAULT_RUST_VERSION", "load_arbitrary_tool") +load("@rules_rust//rust:repositories.bzl", "load_arbitrary_tool") +load("@rules_rust//rust:rust.bzl", "rust_common") def _impl(repository_ctx): # Link cxx repository into @third-party. @@ -77,7 +78,7 @@ vendor = repository_rule( attrs = { "cargo_version": attr.string( doc = "The version of cargo to use", - default = DEFAULT_RUST_VERSION, + default = rust_common.default_version, ), "cargo_iso_date": attr.string( doc = "The date of the tool (or None, if the version is a specific version)",