Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DLL_EXTENSION rather than hardcoding .so #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions bootstrap/src/manifest.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anstream::eprintln as println;
use color_print::cprintln;
use std::env;
use std::path::{Path, PathBuf};
use std::process::Command;

Expand Down Expand Up @@ -45,12 +46,13 @@ impl Manifest {
}

/// The path to the rustc codegen c library
pub fn codegen_backend(&self) -> &'static Path {
if self.release {
Path::new("crates/target/release/librustc_codegen_c.so")
pub fn codegen_backend(&self) -> PathBuf {
let path = if self.release {
Path::new("crates/target/release/librustc_codegen_c")
} else {
Path::new("crates/target/debug/librustc_codegen_c.so")
}
Path::new("crates/target/debug/librustc_codegen_c")
};
path.with_extension(env::consts::DLL_EXTENSION)
}

/// The command to run rustc with the codegen backend
Expand Down
Loading