Skip to content

Commit

Permalink
llvm-config: Add an all-targets pseudo-component.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142399 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Oct 18, 2011
1 parent 817cb96 commit a6b1929
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/llvm-config/llvm-config.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,16 @@ sub build_name_map {
}

# Add target-specific entries
my @all_targets;
foreach my $target (@TARGETS_BUILT) {
# FIXME: Temporary, until we don't switch all targets
if (defined $NAME_MAP{$target.'asmprinter'}) {
$NAME_MAP{$target} = [$target.'info',
$target.'asmprinter',
$target.'codegen']
} elsif (defined $NAME_MAP{$target.'codegen'}) {
$NAME_MAP{$target} = [$target.'info',
$target.'codegen']
$NAME_MAP{$target} = [$target.'info',
$target.'codegen']
} else {
$NAME_MAP{$target} = [$target.'info',
$NAME_MAP{$target}[0]]
Expand All @@ -335,13 +336,16 @@ sub build_name_map {
if (defined $NAME_MAP{$target.'disassembler'}) {
push @{$NAME_MAP{$target}},$target.'disassembler'
}

push @all_targets, $target;
}

# Add virtual entries.
$NAME_MAP{'native'} = have_native_backend() ? [$ARCH] : [];
$NAME_MAP{'nativecodegen'} = have_native_backend() ? [$ARCH.'codegen'] : [];
$NAME_MAP{'backend'} = have_native_backend() ? ['native'] : ['cbackend'];
$NAME_MAP{'engine'} = find_best_engine;
$NAME_MAP{'all-targets'} = \@all_targets;
$NAME_MAP{'all'} = [name_map_entries]; # Must be last.
}

Expand Down

0 comments on commit a6b1929

Please sign in to comment.