File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -576,6 +576,14 @@ tasks:
576576 - " //..."
577577 test_targets :
578578 - " //..."
579+ cu_integ_cargo_workspace_windows :
580+ name : Crate Universe - cargo_workspace
581+ platform : windows
582+ working_directory : crate_universe/tests/integration/cargo_workspace
583+ build_targets :
584+ - " //..."
585+ test_targets :
586+ - " //..."
579587
580588 # --- cargo_conditional_deps ---
581589 cu_integ_cargo_conditional_deps_ubuntu2204 :
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ filegroup(
5757 visibility = ["//crate_universe:__subpackages__" ],
5858)
5959
60+ MSVC_RUSTC_FLAGS = [
61+ "-Ctarget-feature=+crt-static" ,
62+ ]
63+
6064rust_library (
6165 name = "cargo_bazel" ,
6266 srcs = glob (
@@ -67,6 +71,12 @@ rust_library(
6771 compile_data = [":rust_data" ],
6872 edition = "2021" ,
6973 proc_macro_deps = all_crate_deps (proc_macro = True ),
74+ rustc_flags = select ({
75+ "//rust/platform:aarch64-pc-windows-msvc" : MSVC_RUSTC_FLAGS ,
76+ "//rust/platform:i686-pc-windows-msvc" : MSVC_RUSTC_FLAGS ,
77+ "//rust/platform:x86_64-pc-windows-msvc" : MSVC_RUSTC_FLAGS ,
78+ "//conditions:default" : [],
79+ }),
7080 # This target embeds additional, stamping related information (see
7181 # https://docs.bazel.build/versions/main/user-manual.html#workspace_status
7282 # for more information). Set stamp = -1 to indicate that it should respect
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ repository = "https://github.com/bazelbuild/rules_rust"
6060cargo = []
6161default = [" cargo" ]
6262
63+ [target .'cfg(all(target_os = "windows", target_env = "msvc"))' ]
64+ rustflags =[" -Ctarget-feature=+crt-static" ]
65+
6366# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
6467
6568[dependencies ]
You can’t perform that action at this time.
0 commit comments