-
Notifications
You must be signed in to change notification settings - Fork 533
Extend QNX support by adding all currently supported variants #3723
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
Open
darkwisebear
wants to merge
4
commits into
bazelbuild:main
Choose a base branch
from
darkwisebear:extend-qnx-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+154
−5
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b00638d
Add QNX version support and add all QNX variants
darkwisebear 0ebb13a
Claim support for dynamic libraries for nto
darkwisebear c4588ed
Set default QNX version to 7
darkwisebear 98cf92b
Bump Rust version for all_deps_vendor example
darkwisebear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| """Tests for WASI platform constraint mappings""" | ||
|
|
||
| load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") | ||
| load("//rust/platform:triple_mappings.bzl", "triple_to_constraint_set") | ||
|
|
||
| def _qnx_version_constraints_test_impl(ctx): | ||
| env = unittest.begin(ctx) | ||
|
|
||
| # Test aarch64 QNX7 constraints | ||
| qnx_version_constraints = triple_to_constraint_set("aarch64-unknown-nto-qnx710") | ||
| asserts.equals( | ||
| env, | ||
| [ | ||
| "@platforms//cpu:aarch64", | ||
| "@platforms//os:qnx", | ||
| "@rules_rust//rust/platform:qnx7", | ||
| ], | ||
| qnx_version_constraints, | ||
| "aarch64-unknown-nto-qnx710 doesn't map to the appropriate constraints", | ||
| ) | ||
|
|
||
| # Test aarch64 QNX7 with iopkt constraints | ||
| qnx_version_constraints = triple_to_constraint_set("aarch64-unknown-nto-qnx710_iosock") | ||
| asserts.equals( | ||
| env, | ||
| [ | ||
| "@platforms//cpu:aarch64", | ||
| "@platforms//os:qnx", | ||
| "@rules_rust//rust/platform:qnx7_iosock", | ||
| ], | ||
| qnx_version_constraints, | ||
| "aarch64-unknown-nto-qnx710_iosock doesn't map to the appropriate constraints", | ||
| ) | ||
|
|
||
| # Test aarch64 QNX8 constraints | ||
| qnx_version_constraints = triple_to_constraint_set("aarch64-unknown-nto-qnx800") | ||
| asserts.equals( | ||
| env, | ||
| [ | ||
| "@platforms//cpu:aarch64", | ||
| "@platforms//os:qnx", | ||
| "@rules_rust//rust/platform:qnx8", | ||
| ], | ||
| qnx_version_constraints, | ||
| "aarch64-unknown-nto-qnx800 doesn't map to the appropriate constraints", | ||
| ) | ||
|
|
||
| # Test x86_64 QNX7 constraints | ||
| qnx_version_constraints = triple_to_constraint_set("x86_64-pc-nto-qnx710") | ||
| asserts.equals( | ||
| env, | ||
| [ | ||
| "@platforms//cpu:x86_64", | ||
| "@platforms//os:qnx", | ||
| "@rules_rust//rust/platform:qnx7", | ||
| ], | ||
| qnx_version_constraints, | ||
| "x86_64-pc-nto-qnx710 doesn't map to the appropriate constraints", | ||
| ) | ||
|
|
||
| # Test x86_64 QNX7 with iosock constraints | ||
| qnx_version_constraints = triple_to_constraint_set("x86_64-pc-nto-qnx710_iosock") | ||
| asserts.equals( | ||
| env, | ||
| [ | ||
| "@platforms//cpu:x86_64", | ||
| "@platforms//os:qnx", | ||
| "@rules_rust//rust/platform:qnx7_iosock", | ||
| ], | ||
| qnx_version_constraints, | ||
| "x86_64-pc-nto-qnx710_iosock doesn't map to the appropriate constraints", | ||
| ) | ||
|
|
||
| # Test x86_64 QNX8 constraints | ||
| qnx_version_constraints = triple_to_constraint_set("x86_64-pc-nto-qnx800") | ||
| asserts.equals( | ||
| env, | ||
| [ | ||
| "@platforms//cpu:x86_64", | ||
| "@platforms//os:qnx", | ||
| "@rules_rust//rust/platform:qnx8", | ||
| ], | ||
| qnx_version_constraints, | ||
| "x86_64-pc-nto-qnx800 doesn't map to the appropriate constraints", | ||
| ) | ||
|
|
||
| return unittest.end(env) | ||
|
|
||
| _qnx_version_constraints_test = unittest.make(_qnx_version_constraints_test_impl) | ||
|
|
||
| def qnx_version_constraints_test(name, **kwargs): | ||
| """Define a test suite for the QNX version to constraints mappings | ||
|
|
||
| Args: | ||
| name (str): The name of the test suite. | ||
| **kwargs (dict): Additional keyword arguments for the test_suite. | ||
| """ | ||
| _qnx_version_constraints_test( | ||
| name = "qnx_version_constraints_test", | ||
| ) | ||
|
|
||
| native.test_suite( | ||
| name = name, | ||
| tests = [ | ||
| ":qnx_version_constraints_test", | ||
| ], | ||
| **kwargs | ||
| ) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would actually like to avoid adding constraint values like this into
rules_rust. I've been seeing more activity on bazelbuild/platforms#38 and want to use whatever pattern comes from this issue for constraints like this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@UebelAndre Fine for me, I would then simply apply this as a patch for our org as long as there's no decision on the mentioned issue. However, I don't feel like I can contribute much there due to my lack of the overall picture and how things should be. May I ask you to put a comment in the issue about how to move forward and come to a conclusion over there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@UebelAndre since the activity in the mentioned ticket was stalled for 3 years, is there a chance that we say ie, if nothing moves during next month we can try continue in here ? Because
rules_rustare important part of bazel and QNX8 is more and more used target - it would make sense to have support for it im my opinion. Otherwise it can happen bazelbuild/platforms#38 will block this next 3 years.