diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:32 +0000 |
commit | 4547b622d8d29df964fa2914213088b148c498fc (patch) | |
tree | 9fc6b25f3c3add6b745be9a2400a6e96140046e9 /src/tools/tier-check | |
parent | Releasing progress-linux version 1.66.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-4547b622d8d29df964fa2914213088b148c498fc.tar.xz rustc-4547b622d8d29df964fa2914213088b148c498fc.zip |
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/tier-check')
-rw-r--r-- | src/tools/tier-check/src/main.rs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/tools/tier-check/src/main.rs b/src/tools/tier-check/src/main.rs index a41e2d6e3..c74d37c61 100644 --- a/src/tools/tier-check/src/main.rs +++ b/src/tools/tier-check/src/main.rs @@ -44,7 +44,23 @@ fn main() { target, filename, src ); } - if !missing.is_empty() || !extra.is_empty() { + // Check target names for unwanted characters like `.` that can cause problems e.g. in Cargo. + // See also Tier 3 target policy. + // If desired, target names can ignore this check. + let ignore_target_names = + vec!["thumbv8m.base-none-eabi", "thumbv8m.main-none-eabi", "thumbv8m.main-none-eabihf"]; + let mut invalid_target_name_found = false; + for target in &target_list { + if !ignore_target_names.contains(target) + && !target.chars().all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_') + { + invalid_target_name_found = true; + eprintln!( + "error: Target name `{target}` contains other characters than ASCII alphanumeric (a-z, A-Z, 0-9), dash (-) or underscore (_)." + ); + } + } + if !missing.is_empty() || !extra.is_empty() || invalid_target_name_found { std::process::exit(1); } } |