diff --git a/Cargo.toml b/Cargo.toml index 67c7a9d67edc8..c3b348f9cff50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,7 @@ members = [ "src/tools/unicode-table-generator", "src/tools/unstable-book-gen", "src/tools/wasm-component-ld", + # "src/tools/wild-linker", "src/tools/x", # tidy-alphabetical-end ] @@ -53,6 +54,7 @@ exclude = [ "build", "compiler/rustc_codegen_cranelift", "compiler/rustc_codegen_gcc", + "src/tools/wild-linker", "src/bootstrap", "tests/rustdoc-gui", # HACK(eddyb) This hardcodes the fact that our CI uses `/checkout/obj`. @@ -92,4 +94,3 @@ codegen-units = 1 # If you want to use a crate with local modifications, you can set a path or git dependency here. # For git dependencies, also add your source to ALLOWED_SOURCES in src/tools/tidy/src/extdeps.rs. #[patch.crates-io] - diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 48b01ea2df197..64d66fd0596c8 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1326,7 +1326,8 @@ pub fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) { LinkerFlavor::Gnu(Cc::Yes, _) | LinkerFlavor::Darwin(Cc::Yes, _) | LinkerFlavor::WasmLld(Cc::Yes) - | LinkerFlavor::Unix(Cc::Yes) => { + | LinkerFlavor::Unix(Cc::Yes) + | LinkerFlavor::Wild => { if cfg!(any(target_os = "solaris", target_os = "illumos")) { // On historical Solaris systems, "cc" may have // been Sun Studio, which is not flag-compatible @@ -1366,6 +1367,8 @@ pub fn linker_and_flavor(sess: &Session) -> (PathBuf, LinkerFlavor) { }); let flavor = sess.target.linker_flavor.with_linker_hints(stem); let flavor = adjust_flavor_to_features(flavor, features); + let linker = + if flavor == LinkerFlavor::Wild { PathBuf::from("cc") } else { linker }; Some((linker, flavor)) } (None, None) => None, @@ -2482,6 +2485,8 @@ fn add_order_independent_options( // Take care of the flavors and CLI options requesting the `lld` linker. add_lld_args(cmd, sess, flavor, self_contained_components); + add_wild_args(cmd, sess, flavor, self_contained_components); + add_apple_link_args(cmd, sess, flavor); let apple_sdk_root = add_apple_sdk(cmd, sess, flavor); @@ -3403,6 +3408,59 @@ fn add_lld_args( } } +fn add_wild_args( + cmd: &mut dyn Linker, + sess: &Session, + flavor: LinkerFlavor, + self_contained_components: LinkSelfContainedComponents, +) { + // Either Wild or LLD to make it work with CI + if flavor != LinkerFlavor::Wild || std::env::var_os("BUILDING_RUSTC").is_some() { + let self_contained_cli = sess.opts.cg.link_self_contained.is_linker_enabled(); + let self_contained_target = self_contained_components.is_linker_enabled(); + + let self_contained_linker = self_contained_cli || self_contained_target; + if self_contained_linker && !sess.opts.cg.link_self_contained.is_linker_disabled() { + let mut linker_path_exists = false; + for path in sess.get_tools_search_paths(false) { + let linker_path = path.join("gcc-ld"); + linker_path_exists |= linker_path.exists(); + cmd.cc_arg({ + let mut arg = OsString::from("-B"); + arg.push(linker_path); + arg + }); + } + if !linker_path_exists { + sess.dcx().emit_fatal(errors::SelfContainedLinkerMissing); + } + } + + if !sess.target.is_like_wasm { + cmd.cc_arg("-fuse-ld=lld"); + } + return (); + } + + let mut linker_path_exists = false; + for path in sess.get_tools_search_paths(false) { + let linker_path = path.join("wild-gcc-ld"); + linker_path_exists |= linker_path.exists(); + cmd.cc_arg({ + let mut arg = OsString::from("-B"); + arg.push(linker_path); + arg + }); + cmd.cc_arg("-Wl,--threads=8"); + // cmd.cc_arg("-Wl,--no-fork"); + } + if !linker_path_exists { + // As a sanity check, we emit an error if none of these paths exist: we want + // self-contained linking and have no linker. + sess.dcx().emit_fatal(errors::SelfContainedLinkerMissing); + } +} + // gold has been deprecated with binutils 2.44 // and is known to behave incorrectly around Rust programs. // There have been reports of being unable to bootstrap with gold: diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index a2efd420a327a..acd9c89a5b534 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -161,6 +161,15 @@ pub(crate) fn get_linker<'a>( LinkerFlavor::Bpf => Box::new(BpfLinker { cmd, sess }) as Box, LinkerFlavor::Llbc => Box::new(LlbcLinker { cmd, sess }) as Box, LinkerFlavor::Ptx => Box::new(PtxLinker { cmd, sess }) as Box, + LinkerFlavor::Wild => Box::new(GccLinker { + cmd, + sess, + target_cpu, + hinted_static: None, + is_ld: false, + is_gnu: true, + uses_lld: flavor.uses_lld(), + }), } } diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 69facde693689..d8a881c9fa128 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -862,7 +862,7 @@ mod desc { pub(crate) const parse_link_self_contained: &str = "one of: `y`, `yes`, `on`, `n`, `no`, `off`, or a list of enabled (`+` prefix) and disabled (`-` prefix) \ components: `crto`, `libc`, `unwind`, `linker`, `sanitizers`, `mingw`"; pub(crate) const parse_linker_features: &str = - "a list of enabled (`+` prefix) and disabled (`-` prefix) features: `lld`"; + "a list of enabled (`+` prefix) and disabled (`-` prefix) features: `lld`, `wild`"; pub(crate) const parse_polonius: &str = "either no value or `legacy` (the default), or `next`"; pub(crate) const parse_stack_protector: &str = "one of (`none` (default), `basic`, `strong`, or `all`)"; diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 4d9f06c568bd3..fee809135817d 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -127,6 +127,8 @@ pub enum LinkerFlavor { /// Emscripten Compiler Frontend, a wrapper around `WasmLld(Cc::Yes)` that has a different /// interface and produces some additional JavaScript output. EmCc, + // TODO: This needs some design on how to proceed + Wild, // Below: other linker-like tools with unique interfaces for exotic targets. /// Linker tool for BPF. Bpf, @@ -153,6 +155,7 @@ pub enum LinkerFlavorCli { Bpf, Ptx, Llbc, + Wild, // Legacy stable values Gcc, @@ -178,7 +181,8 @@ impl LinkerFlavorCli { | LinkerFlavorCli::Ld | LinkerFlavorCli::Lld(..) | LinkerFlavorCli::Msvc(Lld::No) - | LinkerFlavorCli::Em => false, + | LinkerFlavorCli::Em + | LinkerFlavorCli::Wild => false, } } } @@ -245,6 +249,7 @@ impl LinkerFlavor { LinkerFlavorCli::Bpf => LinkerFlavor::Bpf, LinkerFlavorCli::Llbc => LinkerFlavor::Llbc, LinkerFlavorCli::Ptx => LinkerFlavor::Ptx, + LinkerFlavorCli::Wild => LinkerFlavor::Wild, // Below: legacy stable values LinkerFlavorCli::Gcc => match lld_flavor { @@ -285,6 +290,7 @@ impl LinkerFlavor { LinkerFlavor::Bpf => LinkerFlavorCli::Bpf, LinkerFlavor::Llbc => LinkerFlavorCli::Llbc, LinkerFlavor::Ptx => LinkerFlavorCli::Ptx, + LinkerFlavor::Wild => LinkerFlavorCli::Wild, } } @@ -300,6 +306,7 @@ impl LinkerFlavor { LinkerFlavor::Bpf => LinkerFlavorCli::Bpf, LinkerFlavor::Llbc => LinkerFlavorCli::Llbc, LinkerFlavor::Ptx => LinkerFlavorCli::Ptx, + LinkerFlavor::Wild => LinkerFlavorCli::Wild, } } @@ -314,6 +321,7 @@ impl LinkerFlavor { LinkerFlavorCli::EmCc => (Some(Cc::Yes), Some(Lld::Yes)), LinkerFlavorCli::Bpf | LinkerFlavorCli::Ptx => (None, None), LinkerFlavorCli::Llbc => (None, None), + LinkerFlavorCli::Wild => (None, None), // Below: legacy stable values LinkerFlavorCli::Gcc => (Some(Cc::Yes), None), @@ -332,6 +340,8 @@ impl LinkerFlavor { if stem == "llvm-bitcode-linker" { Ok(Self::Llbc) + } else if stem == "wild" { + Ok(Self::Wild) } else if stem == "emcc" // GCC/Clang can have an optional target prefix. || stem == "gcc" || stem.ends_with("-gcc") @@ -369,7 +379,11 @@ impl LinkerFlavor { LinkerFlavor::WasmLld(cc) => LinkerFlavor::WasmLld(cc_hint.unwrap_or(cc)), LinkerFlavor::Unix(cc) => LinkerFlavor::Unix(cc_hint.unwrap_or(cc)), LinkerFlavor::Msvc(lld) => LinkerFlavor::Msvc(lld_hint.unwrap_or(lld)), - LinkerFlavor::EmCc | LinkerFlavor::Bpf | LinkerFlavor::Llbc | LinkerFlavor::Ptx => self, + LinkerFlavor::EmCc + | LinkerFlavor::Bpf + | LinkerFlavor::Llbc + | LinkerFlavor::Ptx + | LinkerFlavor::Wild => self, } } @@ -397,7 +411,8 @@ impl LinkerFlavor { | (LinkerFlavor::EmCc, LinkerFlavorCli::EmCc) | (LinkerFlavor::Bpf, LinkerFlavorCli::Bpf) | (LinkerFlavor::Llbc, LinkerFlavorCli::Llbc) - | (LinkerFlavor::Ptx, LinkerFlavorCli::Ptx) => return true, + | (LinkerFlavor::Ptx, LinkerFlavorCli::Ptx) + | (LinkerFlavor::Wild, LinkerFlavorCli::Wild) => return true, // 2. The linker flavor is independent of target and compatible (LinkerFlavor::Ptx, LinkerFlavorCli::Llbc) => return true, _ => {} @@ -427,6 +442,7 @@ impl LinkerFlavor { LinkerFlavor::Darwin(..) => LldFlavor::Ld64, LinkerFlavor::WasmLld(..) => LldFlavor::Wasm, LinkerFlavor::Msvc(..) => LldFlavor::Link, + LinkerFlavor::Wild => todo!(), } } @@ -449,7 +465,8 @@ impl LinkerFlavor { | LinkerFlavor::Unix(_) | LinkerFlavor::Bpf | LinkerFlavor::Llbc - | LinkerFlavor::Ptx => false, + | LinkerFlavor::Ptx + | LinkerFlavor::Wild => false, } } @@ -461,7 +478,8 @@ impl LinkerFlavor { | LinkerFlavor::Darwin(Cc::Yes, _) | LinkerFlavor::WasmLld(Cc::Yes) | LinkerFlavor::Unix(Cc::Yes) - | LinkerFlavor::EmCc => true, + | LinkerFlavor::EmCc + | LinkerFlavor::Wild => true, LinkerFlavor::Gnu(..) | LinkerFlavor::Darwin(..) | LinkerFlavor::WasmLld(_) @@ -546,6 +564,7 @@ linker_flavor_cli_impls! { (LinkerFlavorCli::Bpf) "bpf" (LinkerFlavorCli::Llbc) "llbc" (LinkerFlavorCli::Ptx) "ptx" + (LinkerFlavorCli::Wild) "wild" // Legacy stable flavors (LinkerFlavorCli::Gcc) "gcc" @@ -2847,6 +2866,7 @@ fn add_link_args_iter( assert_eq!(lld, Lld::No); insert(LinkerFlavor::Msvc(Lld::Yes)); } + LinkerFlavor::Wild => insert(LinkerFlavor::Wild), LinkerFlavor::WasmLld(..) | LinkerFlavor::Unix(..) | LinkerFlavor::EmCc @@ -3237,6 +3257,7 @@ impl Target { | LinkerFlavor::Llbc => { check_eq!(flavor, self.linker_flavor, "mixing different linker flavors") } + LinkerFlavor::Wild => todo!(), } // Check that link args for cc and non-cc versions of flavors are consistent. diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs index 0c8353fad182f..fdd19320dbd35 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs @@ -27,6 +27,8 @@ pub(crate) fn target() -> Target { base.link_self_contained = crate::spec::LinkSelfContainedDefault::with_linker(); } + base.linker_flavor = LinkerFlavor::Wild; + Target { llvm_target: "x86_64-unknown-linux-gnu".into(), metadata: TargetMetadata { diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 1458b0beefa85..16e8217ed572e 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -20,7 +20,9 @@ use serde_derive::Deserialize; use tracing::span; use crate::core::build_steps::gcc::{Gcc, GccOutput, add_cg_gcc_cargo_flags}; -use crate::core::build_steps::tool::{RustcPrivateCompilers, SourceType, copy_lld_artifacts}; +use crate::core::build_steps::tool::{ + RustcPrivateCompilers, SourceType, copy_lld_artifacts, copy_wild_artifacts, +}; use crate::core::build_steps::{dist, llvm}; use crate::core::builder; use crate::core::builder::{ @@ -2315,6 +2317,15 @@ impl Step for Assemble { copy_lld_artifacts(builder, lld_wrapper, target_compiler); } + if builder.host_target.triple == "x86_64-unknown-linux-gnu" { + let wild_wrapper = + builder.ensure(crate::core::build_steps::tool::WildLinker::for_use_by_compiler( + builder, + target_compiler, + )); + copy_wild_artifacts(builder, wild_wrapper, target_compiler); + } + if builder.config.llvm_enabled(target_compiler.host) && builder.config.llvm_tools_enabled { debug!( "llvm and llvm tools enabled; copying `llvm-objcopy` as `rust-objcopy` to \ diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index a5f0718bc01a4..3fbfc9e6cdfad 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -552,6 +552,33 @@ impl Step for Rustc { } } + if builder.host_target.triple == "x86_64-unknown-linux-gnu" { + let src_dir = builder.sysroot_target_bindir(target_compiler, target); + let rust_wild = exe("rust-wild", target_compiler.host); + builder.copy_link( + &src_dir.join(&rust_wild), + &dst_dir.join(&rust_wild), + FileType::Executable, + ); + let self_contained_wild_src_dir = src_dir.join("wild-gcc-ld"); + let self_contained_wild_dst_dir = dst_dir.join("wild-gcc-ld"); + t!(fs::create_dir(&self_contained_wild_dst_dir)); + let wild_name = "wild"; + let exe_name = exe(wild_name, target_compiler.host); + builder.copy_link( + &self_contained_wild_src_dir.join(&exe_name), + &self_contained_wild_dst_dir.join(&exe_name), + FileType::Executable, + ); + // Pretend Wild is LD so the compiler can pick it up + let exe_name = exe("ld", target_compiler.host); + builder.copy_link( + &self_contained_wild_src_dir.join(&exe_name), + &self_contained_wild_dst_dir.join(&exe_name), + FileType::Executable, + ); + } + if builder.config.llvm_enabled(target_compiler.host) && builder.config.llvm_tools_enabled { diff --git a/src/bootstrap/src/core/build_steps/tool.rs b/src/bootstrap/src/core/build_steps/tool.rs index dcc4898cae16a..791d8c2ab2bcd 100644 --- a/src/bootstrap/src/core/build_steps/tool.rs +++ b/src/bootstrap/src/core/build_steps/tool.rs @@ -958,6 +958,107 @@ pub(crate) fn copy_lld_artifacts( } } +/// Represents a built WildLinker, the `wild-linker` tool itself, and a directory +/// containing a build of Wild. +#[derive(Clone)] +pub struct BuiltWildLinker { + tool: ToolBuildResult, +} + +#[derive(Debug, Clone, Hash, PartialEq, Eq)] +pub struct WildLinker { + pub build_compiler: Compiler, + pub target: TargetSelection, +} + +impl WildLinker { + /// Returns `WildLinker` that should be **used** by the passed compiler. + pub fn for_use_by_compiler(builder: &Builder<'_>, target_compiler: Compiler) -> Self { + Self { + build_compiler: get_tool_target_compiler( + builder, + ToolTargetBuildMode::Dist(target_compiler), + ), + target: target_compiler.host, + } + } +} + +impl Step for WildLinker { + type Output = BuiltWildLinker; + + const IS_HOST: bool = true; + + fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { + run.path("src/tools/wild-linker") + } + + fn make_run(run: RunConfig<'_>) { + run.builder.ensure(WildLinker { + build_compiler: get_tool_target_compiler( + run.builder, + ToolTargetBuildMode::Build(run.target), + ), + target: run.target, + }); + } + + fn run(self, builder: &Builder<'_>) -> Self::Output { + let tool = builder.ensure(ToolBuild { + build_compiler: self.build_compiler, + target: self.target, + tool: "wild-linker", + mode: Mode::ToolTarget, + path: "src/tools/wild-linker", + source_type: SourceType::InTree, + extra_features: Vec::new(), + allow_features: "", + cargo_args: Vec::new(), + artifact_kind: ToolArtifactKind::Binary, + }); + BuiltWildLinker { tool } + } + + fn metadata(&self) -> Option { + Some(StepMetadata::build("WildLinker", self.target).built_by(self.build_compiler)) + } +} + +pub(crate) fn copy_wild_artifacts( + builder: &Builder<'_>, + wild_wrapper: BuiltWildLinker, + target_compiler: Compiler, +) { + let target = target_compiler.host; + + let libdir_bin = builder.sysroot_target_bindir(target_compiler, target); + t!(fs::create_dir_all(&libdir_bin)); + + let dst_exe = exe("rust-wild", target); + + // This seems wrong + builder.copy_link( + &wild_wrapper.tool.tool_path, + &libdir_bin.join(dst_exe), + FileType::Executable, + ); + + let self_contained_wild_dir = libdir_bin.join("wild-gcc-ld"); + t!(fs::create_dir_all(&self_contained_wild_dir)); + + builder.copy_link( + &wild_wrapper.tool.tool_path, + &self_contained_wild_dir.join(exe("wild", target)), + FileType::Executable, + ); + // Pretend it's `ld` binary so GCC picks it + builder.copy_link( + &wild_wrapper.tool.tool_path, + &self_contained_wild_dir.join(exe("ld", target)), + FileType::Executable, + ); +} + /// Builds the `wasm-component-ld` linker wrapper, which is shipped with rustc to be executed on the /// host platform where rustc runs. #[derive(Debug, Clone, Hash, PartialEq, Eq)] diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile index 01f19eac1d2fa..f2126690749f5 100644 --- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile @@ -112,6 +112,8 @@ ENV LIBCURL_NO_PKG_CONFIG 1 ENV DIST_REQUIRE_ALL_TOOLS 1 +ENV BUILDING_RUSTC 1 + # FIXME: Without this, LLVMgold.so incorrectly resolves to the system # libstdc++, instead of the one we build. ENV LD_PRELOAD=/rustroot/lib64/libstdc++.so.6 diff --git a/src/tools/wild-linker/Cargo.lock b/src/tools/wild-linker/Cargo.lock new file mode 100644 index 0000000000000..737f63e849117 --- /dev/null +++ b/src/tools/wild-linker/Cargo.lock @@ -0,0 +1,1148 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "anyhow" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "atomic-take" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8ab6b55fe97976e46f91ddbed8d147d966475dc29b2032757ba47e02376fbc3" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "rayon-core", +] + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bumpalo-herd" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c51ab7ee02d3459317cc16fec045966c9120733a10229541acaf3cc81b137c95" +dependencies = [ + "bumpalo", +] + +[[package]] +name = "bytemuck" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f154e572231cb6ba2bd1176980827e3d5dc04cc183a75dea38109fbdd672d29" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytesize" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba" + +[[package]] +name = "cc" +version = "1.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror", +] + +[[package]] +name = "colored" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fde0e0ec90c9dfb3b4b1a0891a7dcd0e2bffde2f7efed5fe7c9bb00e5bfb915e" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "colosseum" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "370c83b49aedf022ee27942e8ae1d9de1cf40dc9653ee6550e4455d08f6406f9" + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cpp_demangle" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96e58d342ad113c2b878f16d5d034c03be492ae460cdbc02b7f0f2284d310c7d" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "libz-rs-sys", + "miniz_oxide", +] + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin", + "stable_deref_trait", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "indexmap" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" +dependencies = [ + "equivalent", + "hashbrown 0.15.5", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + +[[package]] +name = "libc" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libwild" +version = "0.5.0" +source = "git+https://github.com/davidlattimore/wild?rev=90d0b4f#90d0b4fc03c23af2cd446df44f73d056418827bd" +dependencies = [ + "anyhow", + "atomic-take", + "bitflags", + "blake3", + "bumpalo-herd", + "bytemuck", + "bytesize", + "colored", + "colosseum", + "crossbeam-channel", + "crossbeam-queue", + "crossbeam-utils", + "flate2", + "foldhash", + "gimli", + "glob", + "hashbrown 0.16.0", + "hex", + "indexmap", + "itertools", + "jobserver", + "leb128", + "libc", + "linker-layout", + "linker-trace", + "linker-utils", + "memchr", + "memmap2", + "object", + "perf-event", + "rayon", + "sharded-offset-map", + "sharded-vec-writer 0.4.0", + "smallvec", + "symbolic-common", + "symbolic-demangle", + "tracing", + "tracing-subscriber", + "uuid", + "winnow", + "zstd", +] + +[[package]] +name = "libz-rs-sys" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" +dependencies = [ + "zlib-rs", +] + +[[package]] +name = "linker-layout" +version = "0.5.0" +source = "git+https://github.com/davidlattimore/wild?rev=90d0b4f#90d0b4fc03c23af2cd446df44f73d056418827bd" +dependencies = [ + "anyhow", + "postcard", + "serde", +] + +[[package]] +name = "linker-trace" +version = "0.5.0" +source = "git+https://github.com/davidlattimore/wild?rev=90d0b4f#90d0b4fc03c23af2cd446df44f73d056418827bd" +dependencies = [ + "anyhow", + "postcard", + "serde", +] + +[[package]] +name = "linker-utils" +version = "0.5.0" +source = "git+https://github.com/davidlattimore/wild?rev=90d0b4f#90d0b4fc03c23af2cd446df44f73d056418827bd" +dependencies = [ + "anyhow", + "leb128", + "object", +] + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "memchr" +version = "2.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" + +[[package]] +name = "memmap2" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" +dependencies = [ + "libc", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "msvc-demangler" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4c25a3bb7d880e8eceab4822f3141ad0700d20f025991c1f03bd3d00219a5fc" +dependencies = [ + "bitflags", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "perf-event" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4d6393d9238342159080d79b78cb59c67399a8e7ecfa5d410bd614169e4e823" +dependencies = [ + "libc", + "perf-event-open-sys", +] + +[[package]] +name = "perf-event-open-sys" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c44fb1c7651a45a3652c4afc6e754e40b3d6e6556f1487e2b230bfc4f33c2a8" +dependencies = [ + "libc", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "heapless", + "serde", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "regex-automata" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sharded-offset-map" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a420d414434523aec9421abd8cc7e674795d6cd3eec9a4080c35ea16a82754c6" +dependencies = [ + "sharded-vec-writer 0.3.0", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "sharded-vec-writer" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0e1e51ad52f9ead5d806e61860fd595da6c76f061a6324bd13aa4f437a29681" + +[[package]] +name = "sharded-vec-writer" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b990b2e423f971a9afaea1fdf46ab3e42197d2577e8ef89f2266c1c26a0731a6" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "symbolic-common" +version = "12.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da12f8fecbbeaa1ee62c1d50dc656407e007c3ee7b2a41afce4b5089eaef15e" +dependencies = [ + "debugid", + "memmap2", + "stable_deref_trait", + "uuid", +] + +[[package]] +name = "symbolic-demangle" +version = "12.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fd35afe0ef9d35d3dcd41c67ddf882fc832a387221338153b7cd685a105495c" +dependencies = [ + "cc", + "cpp_demangle", + "msvc-demangler", + "rustc-demangle", + "symbolic-common", +] + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +dependencies = [ + "matchers", + "once_cell", + "regex-automata", + "sharded-slab", + "thread_local", + "tracing", + "tracing-core", +] + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "uuid" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +dependencies = [ + "getrandom", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasi" +version = "0.14.5+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.0+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wild-linker" +version = "0.1.0" +dependencies = [ + "libwild", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" + +[[package]] +name = "zlib-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/src/tools/wild-linker/Cargo.toml b/src/tools/wild-linker/Cargo.toml new file mode 100644 index 0000000000000..f46bd14d9b528 --- /dev/null +++ b/src/tools/wild-linker/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "wild-linker" +version = "0.1.0" +edition = "2024" + +[dependencies] +libwild = { git = "https://github.com/davidlattimore/wild", rev = "90d0b4f" } + +[profile.release] +lto = "thin" diff --git a/src/tools/wild-linker/src/main.rs b/src/tools/wild-linker/src/main.rs new file mode 100644 index 0000000000000..6c6629058da7a --- /dev/null +++ b/src/tools/wild-linker/src/main.rs @@ -0,0 +1,17 @@ +fn main() { + if let Err(error) = run() { + libwild::error::report_error_and_exit(&error) + } +} + +fn run() -> libwild::error::Result { + let args = libwild::Args::parse(|| std::env::args().skip(1))?; + + if args.should_fork() { + // Safety: We haven't spawned any threads yet. + unsafe { libwild::run_in_subprocess(args) }; + } else { + // Run the linker in this process without forking. + libwild::run(args) + } +}