Skip to content

Commit 99b9cbb

Browse files
authored
Bump flake (TraceMachina#1493)
- Regenerate toolchains - Bump Bazel and rules_cc - Bump stable Rust version - Work around excessive rustc/spidermonkey rebuilds - Use native rust toolchains for tooling-only workflows - Adjust patches - Adjust golangci config - Adjust package.json for new deno version
1 parent a8c3217 commit 99b9cbb

21 files changed

+3513
-2942
lines changed

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.3.1
1+
7.4.1

.golangci.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ linters:
33
enable-all: true
44
disable:
55
# Deprecated.
6-
- execinquery
7-
- gomnd
86
- exportloopref
97

108
# Allow all packages for now.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resolver = "2"
55
name = "nativelink"
66
version = "0.5.3"
77
edition = "2021"
8-
rust-version = "1.81.0"
8+
rust-version = "1.82.0"
99

1010
[profile.release]
1111
lto = true

MODULE.bazel

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module(
44
compatibility_level = 0,
55
)
66

7-
bazel_dep(name = "rules_cc", version = "0.0.9")
7+
bazel_dep(name = "rules_cc", version = "0.0.17")
88
bazel_dep(name = "platforms", version = "0.0.10")
99
bazel_dep(name = "rules_python", version = "0.36.0")
1010

@@ -18,7 +18,7 @@ python.toolchain(
1818
)
1919
use_repo(python, python = "python_versions")
2020

21-
bazel_dep(name = "rules_rust", version = "0.51.0")
21+
bazel_dep(name = "rules_rust", version = "0.54.1")
2222

2323
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
2424
rust.toolchain(
@@ -46,7 +46,7 @@ rust.toolchain(
4646
"2024-07-24/rust-std-nightly-aarch64-apple-darwin.tar.xz": "ea8afa34a2010b7ed371ad260af837cf89d02fb24783ed9cee75685781247fde",
4747
},
4848
versions = [
49-
"1.81.0",
49+
"1.82.0",
5050
"nightly/2024-07-24",
5151
],
5252
)
@@ -57,7 +57,7 @@ rust_host_tools = use_extension(
5757
)
5858
rust_host_tools.host_tools(
5959
edition = "2021",
60-
version = "1.81.0",
60+
version = "1.82.0",
6161
)
6262

6363
use_repo(rust, "rust_toolchains")

flake.lock

+25-25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+18-18
Original file line numberDiff line numberDiff line change
@@ -52,33 +52,23 @@
5252
system,
5353
...
5454
}: let
55-
stable-rust-version = "1.81.0";
55+
stable-rust-version = "1.82.0";
5656
nightly-rust-version = "2024-07-24";
5757

58-
# TODO(aaronmondal): Make musl builds work on Darwin.
59-
# See: https://github.com/TraceMachina/nativelink/issues/751
60-
stable-rust =
61-
if pkgs.stdenv.isDarwin
62-
then pkgs.rust-bin.stable.${stable-rust-version}
63-
else pkgs.pkgsMusl.rust-bin.stable.${stable-rust-version};
64-
nightly-rust =
65-
if pkgs.stdenv.isDarwin
66-
then pkgs.rust-bin.nightly.${nightly-rust-version}
67-
else pkgs.pkgsMusl.rust-bin.nightly.${nightly-rust-version};
68-
6958
# TODO(aaronmondal): Tools like rustdoc don't work with the `pkgsMusl`
7059
# package set because of missing libgcc_s. Fix this upstream and use the
7160
# `stable-rust` toolchain in the devShell as well.
7261
# See: https://github.com/oxalica/rust-overlay/issues/161
7362
stable-rust-native = pkgs.rust-bin.stable.${stable-rust-version};
63+
nightly-rust-native = pkgs.rust-bin.nightly.${nightly-rust-version};
7464

7565
maybeDarwinDeps = pkgs.lib.optionals pkgs.stdenv.isDarwin [
7666
pkgs.darwin.apple_sdk.frameworks.CoreFoundation
7767
pkgs.darwin.apple_sdk.frameworks.Security
7868
pkgs.libiconv
7969
];
8070

81-
llvmPackages = pkgs.llvmPackages_18;
71+
llvmPackages = pkgs.llvmPackages_19;
8272

8373
customStdenv = pkgs.callPackage ./tools/llvmStdenv.nix {inherit llvmPackages;};
8474

@@ -150,7 +140,7 @@
150140
linkerPath =
151141
if isLinuxBuild && isLinuxTarget
152142
then "${pkgs.mold}/bin/ld.mold"
153-
else "${pkgs.llvmPackages_latest.lld}/bin/ld.lld";
143+
else "${llvmPackages.lld}/bin/ld.lld";
154144
in
155145
{
156146
inherit src;
@@ -169,7 +159,7 @@
169159
(
170160
if isLinuxBuild
171161
then [pkgs.mold]
172-
else [pkgs.llvmPackages_latest.lld]
162+
else [llvmPackages.lld]
173163
)
174164
++ pkgs.lib.optionals p.stdenv.targetPlatform.isDarwin [
175165
p.darwin.apple_sdk.frameworks.Security
@@ -242,7 +232,7 @@
242232
"build-chromium-tests"
243233
./deploy/chromium-example/build_chromium_tests.sh;
244234

245-
docs = pkgs.callPackage ./tools/docs.nix {rust = stable-rust.default;};
235+
docs = pkgs.callPackage ./tools/docs.nix {rust = stable-rust-native.default;};
246236

247237
inherit (nix2container.packages.${system}.nix2container) pullImage;
248238
inherit (nix2container.packages.${system}.nix2container) buildImage;
@@ -389,10 +379,19 @@
389379
./tools/nixpkgs_disable_ratehammering_pulumi_tests.diff
390380
];
391381
};
382+
rust-overlay-patched = (import self.inputs.nixpkgs {inherit system;}).applyPatches {
383+
name = "rust-overlay-patched";
384+
src = self.inputs.rust-overlay;
385+
patches = [
386+
# This dependency has a giant dependency chain and we don't need
387+
# it for our usecases.
388+
./tools/rust-overlay_cut_libsecret.diff
389+
];
390+
};
392391
in
393392
import nixpkgs-patched {
394393
inherit system;
395-
overlays = [(import rust-overlay)];
394+
overlays = [(import rust-overlay-patched)];
396395
};
397396
apps = {
398397
default = {
@@ -459,7 +458,8 @@
459458
};
460459
pre-commit.settings = {
461460
hooks = import ./tools/pre-commit-hooks.nix {
462-
inherit pkgs nightly-rust;
461+
inherit pkgs;
462+
nightly-rust = nightly-rust-native;
463463
};
464464
};
465465
local-remote-execution.settings = {

local-remote-execution/MODULE.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module(
1010
bazel_dep(name = "platforms", version = "0.0.10")
1111

1212
# Use the starlark implementation of C++ rules instead of the builtin ones.
13-
bazel_dep(name = "rules_cc", version = "0.0.9")
13+
bazel_dep(name = "rules_cc", version = "0.0.17")
1414

1515
# Use the starlark implementation of Java rules instead of the builtin ones.
16-
bazel_dep(name = "rules_java", version = "7.6.5")
16+
bazel_dep(name = "rules_java", version = "8.5.1")

local-remote-execution/generated-cc/cc/BUILD

+31-14
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,21 @@ filegroup(
5454
srcs = ["cc_wrapper.sh"],
5555
)
5656

57+
filegroup(
58+
name = "validate_static_library",
59+
srcs = ["validate_static_library.sh"],
60+
)
61+
5762
filegroup(
5863
name = "compiler_deps",
5964
srcs = glob(
6065
["extra_tools/**"],
6166
allow_empty = True,
62-
) + [":builtin_include_directory_paths"],
67+
) + [
68+
":builtin_include_directory_paths",
69+
":cc_wrapper",
70+
":validate_static_library",
71+
],
6372
)
6473

6574
# This is the entry point for --crosstool_top. Toolchains are found
@@ -86,6 +95,7 @@ cc_toolchain(
8695
module_map = ":module.modulemap",
8796
objcopy_files = ":empty",
8897
strip_files = ":empty",
98+
supports_header_parsing = 1,
8999
supports_param_files = 1,
90100
toolchain_config = ":local",
91101
toolchain_identifier = "local",
@@ -111,18 +121,22 @@ cc_toolchain_config(
111121
coverage_link_flags = ["--coverage"],
112122
cpu = "k8",
113123
cxx_builtin_include_directories = [
114-
"/nix/store/k60snilqpm9cys8h55hib7yzwa0xcxgn-clang-wrapper-18.1.8/resource-root/include",
115-
"/nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include",
116-
"/nix/store/k60snilqpm9cys8h55hib7yzwa0xcxgn-clang-wrapper-18.1.8/resource-root/share",
117-
"/nix/store/lgy959d2i3psg6a85pv2vx4bwmva4m0r-libcxx-18.1.8-dev/include/c++/v1",
124+
"/nix/store/xbn5wq1pyhwb63qlnw1z0b88q53yw9yr-clang-wrapper-19.1.3/resource-root/include",
125+
"/nix/store/aax0hx68i2ikhpf27hdm6a2a209d4s6p-glibc-2.40-36-dev/include",
126+
"/nix/store/xbn5wq1pyhwb63qlnw1z0b88q53yw9yr-clang-wrapper-19.1.3/resource-root/share",
127+
"/nix/store/669q4my6n9sdg1i6baw5j2akbmi6r8s1-libcxx-19.1.3-dev/include/c++/v1",
118128
"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk",
119129
],
120130
cxx_flags = ["-std=c++14"],
121131
dbg_compile_flags = ["-g"],
132+
extra_flags_per_feature = {"use_module_maps": [
133+
"-Xclang",
134+
"-fno-cxx-modules",
135+
]},
122136
host_system_name = "x86_64-unknown-linux-gnu",
123137
link_flags = [
124-
"-fuse-ld=/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/ld.mold",
125-
"-B/nix/store/pk06lmp6wwn35xmvn9d7fr78qg6k9qxw-customClang/bin",
138+
"-fuse-ld=/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/ld.mold",
139+
"-B/nix/store/lw8g7lpw6rwjmz6wxp2grzaixlvn02a7-customClang/bin",
126140
"-Wl,-no-as-needed",
127141
"-Wl,-z,relro,-z,now",
128142
],
@@ -147,18 +161,21 @@ cc_toolchain_config(
147161
target_libc = "glibc_2.35",
148162
target_system_name = "local",
149163
tool_paths = {
150-
"ar": "/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/ar",
151-
"ld": "/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/ld",
164+
"ar": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/ar",
165+
"ld": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/ld",
152166
"llvm-cov": "None",
153167
"llvm-profdata": "None",
154168
"cpp": "/usr/bin/cpp",
155-
"gcc": "/nix/store/pk06lmp6wwn35xmvn9d7fr78qg6k9qxw-customClang/bin/customClang",
156-
"dwp": "/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/dwp",
169+
"gcc": "/nix/store/lw8g7lpw6rwjmz6wxp2grzaixlvn02a7-customClang/bin/customClang",
170+
"dwp": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/dwp",
157171
"gcov": "None",
158-
"nm": "/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/nm",
159-
"objcopy": "/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/objcopy",
160-
"objdump": "/nix/store/p05cf5z3nycmxkq14jfp5vl23v46aidy-llvm-binutils-wrapper-18.1.8/bin/objdump",
172+
"nm": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/nm",
173+
"objcopy": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/objcopy",
174+
"objdump": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/objdump",
161175
"strip": "/usr/bin/strip",
176+
"c++filt": "/nix/store/9ms692fd1qf6435c1kzxvsjrg3fg58ys-llvm-binutils-wrapper-19.1.3/bin/c++filt",
177+
"parse_headers": "cc_wrapper.sh",
178+
"validate_static_library": "validate_static_library.sh",
162179
},
163180
toolchain_identifier = "local",
164181
unfiltered_compile_flags = [
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
This file is generated by cc_configure and contains builtin include directories
2-
that /nix/store/pk06lmp6wwn35xmvn9d7fr78qg6k9qxw-customClang/bin/customClang reported. This file is a dependency of every compilation action and
2+
that /nix/store/lw8g7lpw6rwjmz6wxp2grzaixlvn02a7-customClang/bin/customClang reported. This file is a dependency of every compilation action and
33
changes to it will be reflected in the action cache key. When some of these
44
paths change, Bazel will make sure to rerun the action, even though none of
55
declared action inputs or the action commandline changes.
66

7-
/nix/store/k60snilqpm9cys8h55hib7yzwa0xcxgn-clang-wrapper-18.1.8/resource-root/include
8-
/nix/store/wlavaybjbzgllhq11lib6qgr7rm8imgp-glibc-2.39-52-dev/include
9-
/nix/store/k60snilqpm9cys8h55hib7yzwa0xcxgn-clang-wrapper-18.1.8/resource-root/share
10-
/nix/store/lgy959d2i3psg6a85pv2vx4bwmva4m0r-libcxx-18.1.8-dev/include/c++/v1
7+
/nix/store/xbn5wq1pyhwb63qlnw1z0b88q53yw9yr-clang-wrapper-19.1.3/resource-root/include
8+
/nix/store/aax0hx68i2ikhpf27hdm6a2a209d4s6p-glibc-2.40-36-dev/include
9+
/nix/store/xbn5wq1pyhwb63qlnw1z0b88q53yw9yr-clang-wrapper-19.1.3/resource-root/share
10+
/nix/store/669q4my6n9sdg1i6baw5j2akbmi6r8s1-libcxx-19.1.3-dev/include/c++/v1
1111
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

0 commit comments

Comments
 (0)