Skip to content

Commit

Permalink
Unrolled build for rust-lang#128611
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#128611 - ChrisDenton:cygpath, r=jieyouxu

run-make: Remove cygpath

Remove cygpath from run-make-support.
  • Loading branch information
rust-timer authored Aug 5, 2024
2 parents 29e9248 + f9d7e4c commit eb026dd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 47 deletions.
4 changes: 1 addition & 3 deletions src/tools/run-make-support/src/external_deps/c_build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::path::PathBuf;

use super::cygpath::get_windows_path;
use crate::artifact_names::{dynamic_lib_name, static_lib_name};
use crate::external_deps::cc::{cc, cxx};
use crate::external_deps::llvm::llvm_ar;
Expand Down Expand Up @@ -44,8 +43,7 @@ pub fn build_native_dynamic_lib(lib_name: &str) -> PathBuf {
};
let obj_file = if is_msvc() { format!("{lib_name}.obj") } else { format!("{lib_name}.o") };
if is_msvc() {
let mut out_arg = "-out:".to_owned();
out_arg.push_str(&get_windows_path(&lib_path));
let out_arg = format!("-out:{lib_path}");
cc().input(&obj_file).args(&["-link", "-dll", &out_arg]).run();
} else if is_darwin() {
cc().out_exe(&lib_path).input(&obj_file).args(&["-dynamiclib", "-Wl,-dylib"]).run();
Expand Down
10 changes: 4 additions & 6 deletions src/tools/run-make-support/src/external_deps/cc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use std::path::Path;

// FIXME(jieyouxu): can we get rid of the `cygpath` external dependency?
use super::cygpath::get_windows_path;
use crate::command::Command;
use crate::{env_var, is_msvc, is_windows, uname};

Expand Down Expand Up @@ -97,12 +95,12 @@ impl Cc {

if is_msvc() {
path.set_extension("exe");
let fe_path = get_windows_path(&path);
let fe_path = path.clone();
path.set_extension("");
path.set_extension("obj");
let fo_path = get_windows_path(path);
self.cmd.arg(format!("-Fe:{fe_path}"));
self.cmd.arg(format!("-Fo:{fo_path}"));
let fo_path = path;
self.cmd.arg(format!("-Fe:{}", fe_path.to_str().unwrap()));
self.cmd.arg(format!("-Fo:{}", fo_path.to_str().unwrap()));
} else {
self.cmd.arg("-o");
self.cmd.arg(name);
Expand Down
35 changes: 0 additions & 35 deletions src/tools/run-make-support/src/external_deps/cygpath.rs

This file was deleted.

3 changes: 0 additions & 3 deletions src/tools/run-make-support/src/external_deps/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ pub mod llvm;
pub mod python;
pub mod rustc;
pub mod rustdoc;

// Library-internal external dependency.
mod cygpath;

0 comments on commit eb026dd

Please sign in to comment.