Skip to content

Commit

Permalink
Merge pull request #1014 from creusot-rs/fix-metadata-paths
Browse files Browse the repository at this point in the history
Fix metadata load path
  • Loading branch information
xldenis committed May 30, 2024
2 parents ea14b01 + 379db64 commit 114472a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions creusot/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use indexmap::IndexMap;
use rustc_hir::def_id::{CrateNum, DefId};
use rustc_macros::{TyDecodable, TyEncodable};
use rustc_middle::ty::TyCtxt;
use rustc_session::config::OutputType;
use rustc_span::Symbol;
use std::{
collections::HashMap,
Expand Down Expand Up @@ -140,12 +141,11 @@ impl<'tcx> BinaryMetadata<'tcx> {

fn export_file(ctx: &TranslationCtx, out: &Option<String>) -> PathBuf {
out.as_ref().map(|s| s.clone().into()).unwrap_or_else(|| {
let outputs = ctx.tcx.output_filenames(());

// let crate_name = ctx.tcx.crate_name(LOCAL_CRATE);

outputs.with_extension("cmeta")
// .join(&format!("lib{}.cmeta", libname))
let outputs = ctx.output_filenames(());
let out = outputs.path(OutputType::Metadata);
let path = out.as_path().to_owned();
let path = path.with_extension("cmeta");
path
})
}

Expand Down

0 comments on commit 114472a

Please sign in to comment.