Skip to content

Commit 66a1b1f

Browse files
committed
Add support for C/C++ compiler for Neutrino QNX: qcc
1 parent afb6d60 commit 66a1b1f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/lib.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,6 +2092,21 @@ impl Build {
20922092
cmd.push_cc_arg("-pthread".into());
20932093
}
20942094
}
2095+
2096+
if target.os == "nto" {
2097+
let arg = match target.arch {
2098+
"i586" => "-Vgcc_ntox86_cxx",
2099+
"aarch64" => "-Vgcc_ntoaarch64le_cxx",
2100+
"x86_64" => "-Vgcc_ntox86_64_cxx",
2101+
_ => {
2102+
return Err(Error::new(
2103+
ErrorKind::InvalidTarget,
2104+
format!("Unknown architecture for Neutrino QNX: {}", target.arch),
2105+
))
2106+
}
2107+
};
2108+
cmd.push_cc_arg(arg.into());
2109+
}
20952110
}
20962111
}
20972112

@@ -2803,6 +2818,8 @@ impl Build {
28032818
format!("arm-kmc-eabi-{}", gnu)
28042819
} else if target.arch == "aarch64" && target.vendor == "kmc" {
28052820
format!("aarch64-kmc-elf-{}", gnu)
2821+
} else if target.os == "nto" {
2822+
"qcc".into()
28062823
} else if self.get_is_cross_compile()? {
28072824
let prefix = self.prefix_for_target(&raw_target);
28082825
match prefix {

0 commit comments

Comments
 (0)