mirror of
https://github.com/openai/codex.git
synced 2026-09-11 20:36:49 +00:00
## What changed - Configure x86_64 Windows MSVC `rules_rs` toolchains to use the bundled `rust-lld` linker. - Make `rules_rust` select the configured direct linker for that target unless the toolchain explicitly prefers the C compiler driver. GitOrigin-RevId: 941a1ca42b931cbb9e1c2d68300b8a82a5250be8
15 lines
868 B
Diff
15 lines
868 B
Diff
# What: use Rust's bundled direct linker for Windows x86_64 MSVC toolchains.
|
|
# Scope: standard and bootstrap rules_rs Rust toolchains targeting x86_64 MSVC.
|
|
|
|
diff --git a/rs/toolchains/declare_rustc_toolchains.bzl b/rs/toolchains/declare_rustc_toolchains.bzl
|
|
--- a/rs/toolchains/declare_rustc_toolchains.bzl
|
|
+++ b/rs/toolchains/declare_rustc_toolchains.bzl
|
|
@@ -88,6 +88,7 @@ def declare_rustc_toolchains(
|
|
llvm_cov = "@llvm//tools:llvm-cov",
|
|
llvm_profdata = "@llvm//tools:llvm-profdata",
|
|
linker = select({
|
|
+ "@rules_rs//rs/platforms/config:x86_64-pc-windows-msvc": "{}rust-lld".format(rustc_repo_label),
|
|
"@platforms//cpu:wasm32": "{}rust-lld".format(rustc_repo_label),
|
|
"@platforms//cpu:wasm64": "{}rust-lld".format(rustc_repo_label),
|
|
"//conditions:default": None,
|