MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

crates/venvlauncher/build.rs:6–21  ·  view source on GitHub ↗

Build script for venvlauncher Sets the Windows subsystem to GUI for venvwlauncher variants. Only MSVC toolchain is supported on Windows (same as CPython).

()

Source from the content-addressed store, hash-verified

4//! Only MSVC toolchain is supported on Windows (same as CPython).
5
6fn main() {
7 let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
8 let target_env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
9
10 // Only apply on Windows with MSVC toolchain
11 if target_os == "windows" && target_env == "msvc" {
12 let exe_name = std::env::var("CARGO_BIN_NAME").unwrap_or_default();
13
14 // venvwlauncher and venvwlaunchert should be Windows GUI applications
15 // (no console window)
16 if exe_name.contains("venvw") {
17 println!("cargo:rustc-link-arg=/SUBSYSTEM:WINDOWS");
18 println!("cargo:rustc-link-arg=/ENTRY:mainCRTStartup");
19 }
20 }
21}

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected