diff --git a/cargo/cargo_build_script_runner/bin.rs b/cargo/cargo_build_script_runner/bin.rs index 04d89a34d9..baee4ff724 100644 --- a/cargo/cargo_build_script_runner/bin.rs +++ b/cargo/cargo_build_script_runner/bin.rs @@ -89,7 +89,7 @@ fn run_buildrs() -> Result<(), String> { } if let Some(cc_path) = env::var_os("CC") { - let mut cc_path = exec_root.join(cc_path); + let mut cc_path = exec_root.join(cc_path).into_os_string(); if let Some(sysroot_path) = env::var_os("SYSROOT") { cc_path.push(" --sysroot="); cc_path.push(&exec_root.join(sysroot_path));