Skip to content

Commit

Permalink
Setup cargo environment for cargo rustc --print
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Jan 7, 2025
1 parent 05f54fd commit 6d18296
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cargo/ops/cargo_compile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use std::sync::Arc;

use crate::core::compiler::unit_dependencies::build_unit_dependencies;
use crate::core::compiler::unit_graph::{self, UnitDep, UnitGraph};
use crate::core::compiler::{standard_lib, CrateType, TargetInfo};
use crate::core::compiler::{apply_env_config, standard_lib, CrateType, TargetInfo};
use crate::core::compiler::{BuildConfig, BuildContext, BuildRunner, Compilation};
use crate::core::compiler::{CompileKind, CompileMode, CompileTarget, RustcTargetData, Unit};
use crate::core::compiler::{DefaultExecutor, Executor, UnitInterner};
Expand Down Expand Up @@ -188,6 +188,7 @@ pub fn print<'a>(
}
let target_info = TargetInfo::new(gctx, &build_config.requested_kinds, &rustc, *kind)?;
let mut process = rustc.process();
apply_env_config(gctx, &mut process)?;
process.args(&target_info.rustflags);
if let Some(args) = target_rustc_args {
process.args(args);
Expand Down

0 comments on commit 6d18296

Please sign in to comment.