Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/cc-rs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cc-v1.2.3
Choose a base ref
...
head repository: rust-lang/cc-rs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cc-v1.2.4
Choose a head ref
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on Dec 12, 2024

  1. use -maix64 instead of -m64 (#1307)

    mustartt authored Dec 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9185b6a View commit details

Commits on Dec 13, 2024

  1. Add support for C/C++ compiler for Neutrino QNX: qcc (#1319)

    flba-eb authored Dec 13, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    82c8c7b View commit details
  2. chore: release v1.2.4 (#1320)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Dec 13, 2024
    Copy the full SHA
    5673a3f View commit details
Showing with 41 additions and 1 deletion.
  1. +7 −0 CHANGELOG.md
  2. +1 −1 Cargo.toml
  3. +33 −0 src/lib.rs
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.2.4](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.3...cc-v1.2.4) - 2024-12-13

### Other

- Add support for C/C++ compiler for Neutrino QNX: `qcc` ([#1319](https://github.com/rust-lang/cc-rs/pull/1319))
- use -maix64 instead of -m64 ([#1307](https://github.com/rust-lang/cc-rs/pull/1307))

## [1.2.3](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.2...cc-v1.2.3) - 2024-12-06

### Other
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cc"
version = "1.2.3"
version = "1.2.4"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cc-rs"
33 changes: 33 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -2094,6 +2094,26 @@ impl Build {
cmd.push_cc_arg("-pthread".into());
}
}

if target.os == "nto" {
// Select the target with `-V`, see qcc documentation:
// QNX 7.1: https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.utilities/topic/q/qcc.html
// QNX 8.0: https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.utilities/topic/q/qcc.html
// This assumes qcc/q++ as compiler, which is currently the only supported compiler for QNX.
// See for details: https://github.com/rust-lang/cc-rs/pull/1319
let arg = match target.arch {
"i586" => "-Vgcc_ntox86_cxx",
"aarch64" => "-Vgcc_ntoaarch64le_cxx",
"x86_64" => "-Vgcc_ntox86_64_cxx",
_ => {
return Err(Error::new(
ErrorKind::InvalidTarget,
format!("Unknown architecture for Neutrino QNX: {}", target.arch),
))
}
};
cmd.push_cc_arg(arg.into());
}
}
}

@@ -2116,6 +2136,12 @@ impl Build {
cmd.args.push("-m32".into());
} else if target.abi == "x32" {
cmd.args.push("-mx32".into());
} else if target.os == "aix" {
if cmd.family == ToolFamily::Gnu {
cmd.args.push("-maix64".into());
} else {
cmd.args.push("-m64".into());
}
} else if target.arch == "x86_64" || target.arch == "powerpc64" {
cmd.args.push("-m64".into());
}
@@ -2805,6 +2831,13 @@ 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" {
// See for details: https://github.com/rust-lang/cc-rs/pull/1319
if self.cpp {
"q++".to_string()
} else {
"qcc".to_string()
}
} else if self.get_is_cross_compile()? {
let prefix = self.prefix_for_target(&raw_target);
match prefix {