mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Change preprocessedhost filename
This commit is contained in:
parent
7f617c87bf
commit
571844fc27
5 changed files with 18 additions and 9 deletions
|
@ -1517,6 +1517,7 @@ mod tests {
|
|||
use super::*;
|
||||
|
||||
use indoc::indoc;
|
||||
use roc_build::link::preprocessed_host_filename;
|
||||
use target_lexicon::Triple;
|
||||
|
||||
const ELF64_DYNHOST: &[u8] = include_bytes!("../dynhost_benchmarks_elf64") as &[_];
|
||||
|
@ -1669,17 +1670,20 @@ mod tests {
|
|||
panic!("zig build-exe failed");
|
||||
}
|
||||
|
||||
let preprocessed_host_filename =
|
||||
dir.join(preprocessed_host_filename(&Triple::host()).unwrap());
|
||||
|
||||
preprocess_elf(
|
||||
target_lexicon::Endianness::Little,
|
||||
&dir.join("host"),
|
||||
&dir.join("metadata"),
|
||||
&dir.join("preprocessedhost"),
|
||||
&preprocessed_host_filename,
|
||||
&dir.join("libapp.so"),
|
||||
false,
|
||||
false,
|
||||
);
|
||||
|
||||
std::fs::copy(&dir.join("preprocessedhost"), &dir.join("final")).unwrap();
|
||||
std::fs::copy(&preprocessed_host_filename, &dir.join("final")).unwrap();
|
||||
|
||||
surgery_elf(
|
||||
&roc_app,
|
||||
|
|
|
@ -77,7 +77,7 @@ pub fn build_and_preprocess_host(
|
|||
generate_dynamic_lib(target, &stub_dll_symbols, &stub_lib);
|
||||
rebuild_host(opt_level, target, host_input_path, Some(&stub_lib));
|
||||
let metadata = host_input_path.with_file_name("metadata");
|
||||
// let prehost = host_input_path.with_file_name("preprocessedhost");
|
||||
// let prehost = host_input_path.with_file_name(preprocessed_host_filename(target).unwrap());
|
||||
|
||||
preprocess(
|
||||
target,
|
||||
|
|
|
@ -1358,6 +1358,8 @@ mod test {
|
|||
use object::{pe, LittleEndian as LE, Object};
|
||||
|
||||
use indoc::indoc;
|
||||
use roc_build::link::preprocessed_host_filename;
|
||||
use target_lexicon::Triple;
|
||||
|
||||
use super::*;
|
||||
|
||||
|
@ -1708,17 +1710,20 @@ mod test {
|
|||
panic!("zig build-exe failed: {}", command_str);
|
||||
}
|
||||
|
||||
let preprocessed_host_filename =
|
||||
dir.join(preprocessed_host_filename(&Triple::host()).unwrap());
|
||||
|
||||
preprocess_windows(
|
||||
&dir.join("host.exe"),
|
||||
&dir.join("metadata"),
|
||||
&dir.join("preprocessedhost"),
|
||||
&preprocessed_host_filename,
|
||||
&names,
|
||||
false,
|
||||
false,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
std::fs::copy(&dir.join("preprocessedhost"), &dir.join("app.exe")).unwrap();
|
||||
std::fs::copy(&preprocessed_host_filename, &dir.join("app.exe")).unwrap();
|
||||
|
||||
surgery_pe(&dir.join("app.exe"), &dir.join("metadata"), &roc_app);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue