mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-16 17:18:57 +00:00
Revert more .o / .obj renaming
This commit is contained in:
@@ -226,6 +226,9 @@ impl CreateExe {
|
|||||||
println!("Target: {}", target.triple());
|
println!("Target: {}", target.triple());
|
||||||
println!("Format: {:?}", object_format);
|
println!("Format: {:?}", object_format);
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
let wasm_object_path = PathBuf::from("wasm.o");
|
||||||
|
#[cfg(windows)]
|
||||||
let wasm_object_path = PathBuf::from("wasm.obj");
|
let wasm_object_path = PathBuf::from("wasm.obj");
|
||||||
|
|
||||||
if let Some(header_path) = self.header.as_ref() {
|
if let Some(header_path) = self.header.as_ref() {
|
||||||
@@ -404,10 +407,10 @@ impl CreateExe {
|
|||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
let os = target_triple.unwrap_or(Triple::host()).operating_system;
|
let os = target_triple.unwrap_or(Triple::host()).operating_system;
|
||||||
let libwasmer_path = match os {
|
let libwasmer_path = if os == OperatingSystem::Windows {
|
||||||
OperatingSystem::Windows => "lib/wasmer.lib",
|
"lib/wasmer.lib"
|
||||||
// OperatingSystem::Darwin => "lib/libwasmer.dylib",
|
} else {
|
||||||
_ => "lib/libwasmer.a",
|
"lib/libwasmer.a"
|
||||||
};
|
};
|
||||||
let tarball_dir;
|
let tarball_dir;
|
||||||
let filename = if let Some(local_tarball) = cross_subc.tarball.as_ref() {
|
let filename = if let Some(local_tarball) = cross_subc.tarball.as_ref() {
|
||||||
@@ -476,6 +479,9 @@ impl CreateExe {
|
|||||||
|
|
||||||
// write C src to disk
|
// write C src to disk
|
||||||
let c_src_path = tempdir_path.join("wasmer_main.c");
|
let c_src_path = tempdir_path.join("wasmer_main.c");
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
let c_src_obj = tempdir_path.join("wasmer_main.o");
|
||||||
|
#[cfg(windows)]
|
||||||
let c_src_obj = tempdir_path.join("wasmer_main.obj");
|
let c_src_obj = tempdir_path.join("wasmer_main.obj");
|
||||||
|
|
||||||
std::fs::write(
|
std::fs::write(
|
||||||
@@ -604,6 +610,9 @@ impl CreateExe {
|
|||||||
target: &Target,
|
target: &Target,
|
||||||
output_path: &Path,
|
output_path: &Path,
|
||||||
) -> anyhow::Result<PathBuf> {
|
) -> anyhow::Result<PathBuf> {
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
let volume_object_path = output_path.join("volumes.o");
|
||||||
|
#[cfg(windows)]
|
||||||
let volume_object_path = output_path.join("volumes.obj");
|
let volume_object_path = output_path.join("volumes.obj");
|
||||||
|
|
||||||
let mut volumes_object = get_object_for_target(target.triple())?;
|
let mut volumes_object = get_object_for_target(target.triple())?;
|
||||||
@@ -654,6 +663,9 @@ impl CreateExe {
|
|||||||
for (atom_name, atom_bytes) in file.get_all_atoms() {
|
for (atom_name, atom_bytes) in file.get_all_atoms() {
|
||||||
std::fs::create_dir_all(output_path.join("atoms"))?;
|
std::fs::create_dir_all(output_path.join("atoms"))?;
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
let object_path = output_path.join("atoms").join(&format!("{atom_name}.o"));
|
||||||
|
#[cfg(windows)]
|
||||||
let object_path = output_path.join("atoms").join(&format!("{atom_name}.obj"));
|
let object_path = output_path.join("atoms").join(&format!("{atom_name}.obj"));
|
||||||
|
|
||||||
std::fs::create_dir_all(output_path.join("atoms").join(&atom_name))?;
|
std::fs::create_dir_all(output_path.join("atoms").join(&atom_name))?;
|
||||||
@@ -761,6 +773,9 @@ impl CreateExe {
|
|||||||
|
|
||||||
link_objects.push(volume_object_path);
|
link_objects.push(volume_object_path);
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
let c_src_obj = tempdir_path.join("wasmer_main.o");
|
||||||
|
#[cfg(windows)]
|
||||||
let c_src_obj = working_dir.join("wasmer_main.obj");
|
let c_src_obj = working_dir.join("wasmer_main.obj");
|
||||||
|
|
||||||
for obj in std::fs::read_dir(working_dir.join("atoms"))? {
|
for obj in std::fs::read_dir(working_dir.join("atoms"))? {
|
||||||
|
|||||||
Reference in New Issue
Block a user