mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
pipe target information through
This commit is contained in:
parent
d8d4522b16
commit
98c672bbde
4 changed files with 112 additions and 18 deletions
|
@ -248,6 +248,16 @@ pub fn rebuild_host(target: &Triple, host_input_path: &Path) {
|
|||
zig_str_path.to_str().unwrap(),
|
||||
)
|
||||
}
|
||||
Architecture::X86_32(_) => {
|
||||
let emit_bin = format!("-femit-bin={}", host_dest_native.to_str().unwrap());
|
||||
build_zig_host_native(
|
||||
&env_path,
|
||||
&env_home,
|
||||
&emit_bin,
|
||||
zig_host_src.to_str().unwrap(),
|
||||
zig_str_path.to_str().unwrap(),
|
||||
)
|
||||
}
|
||||
_ => panic!("Unsupported architecture {:?}", target.architecture),
|
||||
};
|
||||
|
||||
|
@ -396,6 +406,8 @@ fn link_linux(
|
|||
let ld_linux = match target.architecture {
|
||||
Architecture::X86_64 => library_path(["/lib64", "ld-linux-x86-64.so.2"])
|
||||
.or_else(|| library_path([&nixos_path(), "ld-linux-x86-64.so.2"])),
|
||||
Architecture::X86_32(_) => library_path(["/lib32", "ld-linux.so.2"])
|
||||
.or_else(|| library_path([&nixos_path(), "ld-linux.so.2"])),
|
||||
Architecture::Aarch64(_) => library_path(["/lib", "ld-linux-aarch64.so.1"]),
|
||||
_ => panic!(
|
||||
"TODO gracefully handle unsupported linux architecture: {:?}",
|
||||
|
|
|
@ -221,7 +221,7 @@ pub fn gen_from_mono_module(
|
|||
|
||||
use target_lexicon::Architecture;
|
||||
match target.architecture {
|
||||
Architecture::X86_64 | Architecture::Aarch64(_) => {
|
||||
Architecture::X86_64 | Architecture::X86_32(_) | Architecture::Aarch64(_) => {
|
||||
// assemble the .ll into a .bc
|
||||
let _ = Command::new("llvm-as")
|
||||
.args(&[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue