Skip to content

Commit

Permalink
Add support for C/C++ compiler for Neutrino QNX: qcc
Browse files Browse the repository at this point in the history
  • Loading branch information
flba-eb committed Dec 12, 2024
1 parent afb6d60 commit 78fd0a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2092,6 +2092,16 @@ impl Build {
cmd.push_cc_arg("-pthread".into());
}
}

if target.os == "nto" {
let arg = match target.arch {
"i586" => "-Vgcc_ntox86_cxx",
"aarch64" => "-Vgcc_ntoaarch64le_cxx",
"x86_64" => "-Vgcc_ntox86_64_cxx",
_ => panic!("Unknown architecture for Neutrino QNX: {}", target.arch),
};
cmd.push_cc_arg(arg.into());
}
}
}

Expand Down Expand Up @@ -2803,6 +2813,8 @@ impl Build {
format!("arm-kmc-eabi-{}", gnu)
} else if target.arch == "aarch64" && target.vendor == "kmc" {
format!("aarch64-kmc-elf-{}", gnu)
} else if target.os == "nto" {
"qcc".into()
} else if self.get_is_cross_compile()? {
let prefix = self.prefix_for_target(&raw_target);
match prefix {
Expand Down

0 comments on commit 78fd0a0

Please sign in to comment.