mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Fix wasm host_input_path generation
This commit is contained in:
parent
04e3ac37f4
commit
e1959d0a84
@ -107,19 +107,27 @@ pub fn build_file<'a>(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let (app_extension, extension) = {
|
let (app_extension, extension, host_filename) = {
|
||||||
use roc_target::OperatingSystem::*;
|
use roc_target::OperatingSystem::*;
|
||||||
|
|
||||||
match roc_target::OperatingSystem::from(target.operating_system) {
|
match roc_target::OperatingSystem::from(target.operating_system) {
|
||||||
Wasi => {
|
Wasi => {
|
||||||
if matches!(code_gen_options.opt_level, OptLevel::Development) {
|
if matches!(code_gen_options.opt_level, OptLevel::Development) {
|
||||||
("wasm", Some("wasm"))
|
("wasm", Some("wasm"), "host.zig".to_string())
|
||||||
} else {
|
} else {
|
||||||
("bc", Some("wasm"))
|
("bc", Some("wasm"), "host.zig".to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Unix => ("o", None),
|
Unix => (
|
||||||
Windows => ("obj", Some("exe")),
|
"o",
|
||||||
|
None,
|
||||||
|
legacy_host_filename(target, code_gen_options.opt_level).unwrap(),
|
||||||
|
),
|
||||||
|
Windows => (
|
||||||
|
"obj",
|
||||||
|
Some("exe"),
|
||||||
|
legacy_host_filename(target, code_gen_options.opt_level).unwrap(),
|
||||||
|
),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -132,8 +140,7 @@ pub fn build_file<'a>(
|
|||||||
|
|
||||||
let host_input_path = if let EntryPoint::Executable { platform_path, .. } = &loaded.entry_point
|
let host_input_path = if let EntryPoint::Executable { platform_path, .. } = &loaded.entry_point
|
||||||
{
|
{
|
||||||
cwd.join(platform_path)
|
cwd.join(platform_path).with_file_name(host_filename)
|
||||||
.with_file_name(legacy_host_filename(target, code_gen_options.opt_level).unwrap())
|
|
||||||
} else {
|
} else {
|
||||||
unreachable!();
|
unreachable!();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user