Make compiletest aware of targets without dynamic linking#112454
Merged
bors merged 3 commits intorust-lang:masterfrom Jun 28, 2023
Merged
Make compiletest aware of targets without dynamic linking#112454bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Collaborator
|
(rustbot has picked a reviewer for you, use r? to override) |
bjorn3
reviewed
Jun 9, 2023
7b818da to
53f96bb
Compare
Contributor
|
This should be fine for us! |
4b74ffa to
de7eecf
Compare
Collaborator
|
☔ The latest upstream changes (presumably #112418) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
|
r? compiler |
de7eecf to
767c4b9
Compare
Member
Author
|
Rebased to fix conflict. |
davidtwco
approved these changes
Jun 27, 2023
Member
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 27, 2023
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#112207 (Add trustzone and virtualization target features for aarch32.) - rust-lang#112454 (Make compiletest aware of targets without dynamic linking) - rust-lang#112628 (Allow comparing `Box`es with different allocators) - rust-lang#112692 (Provide more context for `rustc +nightly -Zunstable-options` on stable) - rust-lang#112972 (Make `UnwindAction::Continue` explicit in MIR dump) - rust-lang#113020 (Add tests impl via obj unless denied) - rust-lang#113084 (Simplify some conditions) - rust-lang#113103 (Normalize types when applying uninhabited predicate.) r? `@ghost` `@rustbot` modify labels: rollup
Contributor
|
Did this break running mir-opt tests locally? I am getting
after I rebased today |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 30, 2023
…i-obk Fix loading target specs in compiletest not working with custom targets In rust-lang#112454 (comment) it was pointed out that the PR broke blessing mir-opt tests. Since rust-lang#112418, blessing mir-opt tests generates "synthetic targets", which are custom target specs. Those specs are not included in `--print=all-target-specs-json`, and rust-lang#112454 required that the current target was returned by that flag. This PR fixes the breakage by loading the target spec for the current target explicitly, if a custom target is detected. r? `@oli-obk`
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Some parts of the compiletest internals and some tests require dynamic linking to work, which is not supported by all targets. Before this PR, this was handled by if branches matching on the target name.
This PR loads whether a target supports dynamic linking or not from the target spec, and adds a
// needs-dynamic-linkingattribute for tests that require it. Note that I was not able to replace all the old conditions based on the target name, as some targets havedynamic_linking: truein their spec but pretend they don't have it in compiletest.Also, to get this to work I had to partially revert #111472 (cc @djkoloski @tmandry @bjorn3). On one hand, only the target spec contains whether a target supports dynamic linking, but on the other hand a subset of the fields can be overridden through
-Cflags (as far as I'm aware only-C panic=$strategy). The solution I came up with is to take the target spec as the base, and then override the panic strategy based on--print=cfg. Hopefully that should not break y'all again.