Skip to content

Commit 1e65b59

Browse files
committed
Catch requests to time compiler variants that don't have an entry in the compilers list
1 parent 008f005 commit 1e65b59

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

timeall

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ sub enable_only_compilers {
164164
for my $compiler (@COMPILERS) {
165165
$compiler->{enabled} = 0 unless $enabled{$compiler->{name}};
166166
}
167+
168+
# Catch mistakes
169+
my %known = map {($_->{name} => 1)} @COMPILERS;
170+
for my $enabled (@_) {
171+
die "Compiler variant '$enabled' is unknown! To list compiler variants, use:\n $0 --list-variants\n"
172+
unless $known{$enabled};
173+
}
167174
}
168175

169176
sub detect_versions {

0 commit comments

Comments
 (0)