Skip to content

Commit

Permalink
Recognize unstable target.cfg(relocation_model = "...") on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 22, 2023
1 parent 269fbe7 commit d7302dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com

## [Unreleased]

- Recognize unstable `target.cfg(relocation_model = "...")` on nightly.

## [0.1.8] - 2023-07-03

- Fix build error from dependency when built with `-Z minimal-versions`.
Expand Down
4 changes: 3 additions & 1 deletion src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ impl Cfg {
vendor = Some(cfg_expr::targets::Vendor::new(value.to_owned()));
}
// Unstable cfgs recognized by Cargo
"target_has_atomic_equal_alignment" | "target_has_atomic_load_store" => {
"target_has_atomic_equal_alignment"
| "target_has_atomic_load_store"
| "relocation_model" => {
if let Some(values) = key_values.get_mut(name) {
values.insert(value.to_owned());
} else {
Expand Down

0 comments on commit d7302dd

Please sign in to comment.