Add cfg to always treat target as host#123
Merged
dtolnay merged 2 commits intodtolnay:masterfrom Aug 15, 2021
Merged
Conversation
This was referenced Aug 10, 2021
dtolnay
approved these changes
Aug 15, 2021
bors bot
added a commit
to taiki-e/cargo-llvm-cov
that referenced
this pull request
Aug 15, 2021
54: Support trybuild (take 2) r=taiki-e a=taiki-e Fixes #32 The following patch is needed until dtolnay/trybuild#123 is merged: ```toml [patch.crates-io] trybuild = { git = "https://github.com/taiki-e/trybuild.git", branch = "target" } ``` --- Tested in the same way as #44 (comment) Co-authored-by: Taiki Endo <te316e89@gmail.com>
bors bot
added a commit
to taiki-e/cargo-llvm-cov
that referenced
this pull request
Aug 15, 2021
54: Support trybuild (take 2) r=taiki-e a=taiki-e Fixes #32 The following patch is needed until dtolnay/trybuild#123 is merged: ```toml [patch.crates-io] trybuild = { git = "https://github.com/taiki-e/trybuild.git", branch = "target" } ``` --- Tested in the same way as #44 (comment) 59: Update clap to 3.0.0-beta.4 r=taiki-e a=taiki-e Co-authored-by: Taiki Endo <te316e89@gmail.com>
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.
Unfortunately, currently, it seems there is no heuristic that can handle this well...
So at the moment, only approaches that "require the user to explicitly specify" such as environment variables and cfg seem to work.
This PR uses an approach that exposes a cfg to always treat the target as host.
In the future, once rust-lang/cargo#9532 merged, we can support auto-detection of this.
Closes #122