Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for QNX #2195

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Add support for QNX #2195

merged 4 commits into from
Dec 13, 2023

Conversation

jondo2010
Copy link
Contributor

This adds the minimum for using rules_rust with a self-compiled (tier3) Rust toolchain.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! But I think you'll first need to add the platform to https://github.com/bazelbuild/platforms

@jondo2010
Copy link
Contributor Author

Thanks! But I think you'll first need to add the platform to https://github.com/bazelbuild/platforms

So qnx is already here: https://github.com/bazelbuild/platforms/blob/main/os/BUILD#L97C14-L97C14

@jondo2010 jondo2010 force-pushed the qnx_support branch 3 times, most recently from b33b5d5 to e834391 Compare December 13, 2023 10:23
@jondo2010
Copy link
Contributor Author

@UebelAndre this should be ready for final review.

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@UebelAndre
Copy link
Collaborator

Just needs a rebase

@UebelAndre UebelAndre merged commit c3581a5 into bazelbuild:main Dec 13, 2023
3 checks passed
@mjpauly
Copy link

mjpauly commented Feb 16, 2024

This breaks crates_repository for Rust versions <1.67, which is when the *-nto-qnx* triples were introduced. Searchable error:

ERROR: An error occurred during the fetch of repository 'crate_index':
   Traceback (most recent call last):
        File "/x/external/rules_rust/crate_universe/private/crates_repository.bzl", line 59, column 50, in _crates_repository_impl
                metadata_path = splice_workspace_manifest(
        File "/x/external/rules_rust/crate_universe/private/splicing_utils.bzl", line 178, column 12, in splice_workspace_manifest
                execute(
        File "/x/external/rules_rust/crate_universe/private/common_utils.bzl", line 54, column 13, in execute
                fail(_EXECUTE_ERROR_MESSAGE.format(
Error in fail: Command [/x/external/crate_index/cargo-bazel, "splice", "--output-dir", /x/external/crate_index/splicing-output, "--splicing-manifest", /x/external/crate_index/splicing_manifest.json, "--config", /x/external/crate_index/cargo-bazel.json, "--cargo", /x/external/rust_darwin_aarch64__aarch64-apple-darwin__stable_tools/bin/cargo, "--rustc", /x/external/rust_darwin_aarch64__aarch64-apple-darwin__stable_tools/bin/rustc, "--cargo-lockfile", /y/Cargo.lock] failed with exit code 1.
STDOUT ------------------------------------------------------------------------

STDERR ------------------------------------------------------------------------

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/x/external/rust_darwin_aarch64__aarch64-apple-darwin__stable_tools/bin/rustc - --crate-name ___ --print=file-names --target aarch64-unknown-nto-qnx710 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit status: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "aarch64-unknown-nto-qnx710". Run `rustc --print target-list` for a list of built-in targets


Error: Failed to run cargo tree: exit status: 101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants