This repository was archived by the owner on Sep 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
third-party/rust/crates/deno-x86_64-pc-windows-msvc/0.23.0 Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ cargo.rust_binary(
77 crate_root = "src/main.rs" ,
88 deps = [
99 # ---
10+ "//third-party/rust/crates/deno-x86_64-pc-windows-msvc/0.23.0:deno-x86_64-pc-windows-msvc" ,
1011 "//third-party/rust/crates/windows_x86_64_msvc/0.53.0:windows_x86_64_msvc" ,
1112 "//third-party/rust/crates/windows_x86_64_gnullvm/0.53.0:windows_x86_64_gnullvm" ,
1213 "//third-party/rust/crates/windows_x86_64_gnu/0.53.0:windows_x86_64_gnu" ,
Original file line number Diff line number Diff line change 1+ load ("@prelude//toolchains:rust.bzl" , "system_rust_toolchain" )
2+ load ("//third-party/rust/crates/deno-x86_64-pc-windows-msvc/0.23.0:build.bzl" , "get_rustc_flags" )
3+
4+ # This rust_library is for deno-x86_64-pc-windows-msvc binaries
5+ # It implements the functionality from the original Cargo.toml and build.rs
6+ rust_library (
7+ name = "deno-x86_64-pc-windows-msvc" ,
8+ # Using fixed edition as per requirements
9+ # Note: original Cargo.toml doesn't specify edition, defaulting to 2015
10+ edition = "2021" ,
11+ srcs = glob (["src/**/*.rs" ]),
12+ crate_root = "src/lib.rs" ,
13+ features = [],
14+ # Conditionally add rustc flags based on target triple
15+ rustc_flags = get_rustc_flags (),
16+ env = {},
17+ deps = [],
18+ visibility = ["PUBLIC" ],
19+ )
Original file line number Diff line number Diff line change 1+ def get_rustc_flags ():
2+ """
3+ Determine rustc flags based on target platform.
4+
5+ This mimics the build.rs logic which only sets the library search path
6+ when the target is x86_64-pc-windows-msvc.
7+ """
8+ # Get target platform from config
9+ target = read_config ("rust" , "target" , "" )
10+
11+ # Only add link search path for x86_64-pc-windows-msvc target
12+ if target == "x86_64-pc-windows-msvc" :
13+ return [
14+ "-L" ,
15+ "native=lib" ,
16+ ]
17+ return []
You can’t perform that action at this time.
0 commit comments