summaryrefslogtreecommitdiff
path: root/tools/llvm-config
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-10-18 19:27:08 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-10-18 19:27:08 +0000
commita6b1929657458626f5e549288b4a8865f5904c9c (patch)
tree3f9c3a89f725cb685220c203faa78b437901305c /tools/llvm-config
parent817cb964e2c505281f1d46de1a1eb39b554376db (diff)
llvm-config: Add an all-targets pseudo-component.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/llvm-config.in.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/llvm-config/llvm-config.in.in b/tools/llvm-config/llvm-config.in.in
index 840a10e23a1..03efb031bbb 100644
--- a/tools/llvm-config/llvm-config.in.in
+++ b/tools/llvm-config/llvm-config.in.in
@@ -314,6 +314,7 @@ 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'}) {
@@ -321,8 +322,8 @@ sub build_name_map {
$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]]
@@ -335,6 +336,8 @@ sub build_name_map {
if (defined $NAME_MAP{$target.'disassembler'}) {
push @{$NAME_MAP{$target}},$target.'disassembler'
}
+
+ push @all_targets, $target;
}
# Add virtual entries.
@@ -342,6 +345,7 @@ sub build_name_map {
$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.
}