llvm.org GIT mirror llvm / 275dd94
llvm-config: Fix --targets-built, I changed this to use the registry but wasn't properly initializing the target infos. I decided it wasn't worth linking them in for this, so just switched back to using the Makefile variable for now. We can reconsider later if we ever get pluggable targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146711 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 8 years ago
4 changed file(s) with 5 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
2222 #define LLVM_LDFLAGS "@LLVM_LDFLAGS@"
2323 #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
2424 #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
25 #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
2526 #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
2626 COMMAND echo s!@LLVM_LDFLAGS@!${CMAKE_SHARED_LINKER_FLAGS}! >> ${SEDSCRIPT_OBJPATH}
2727 COMMAND echo s!@LLVM_BUILDMODE@!${CMAKE_BUILD_TYPE}! >> ${SEDSCRIPT_OBJPATH}
2828 COMMAND echo s!@LLVM_SYSTEM_LIBS@!${SYSTEM_LIBS}! >> ${SEDSCRIPT_OBJPATH}
29 COMMAND echo s!@LLVM_TARGETS_BUILT@!${LLVM_TARGETS_TO_BUILD}! >> ${SEDSCRIPT_OBJPATH}
2930 COMMAND sed -f ${SEDSCRIPT_OBJPATH} < ${BUILDVARIABLES_SRCPATH} > ${BUILDVARIABLES_OBJPATH}
3031 VERBATIM
3132 COMMENT "Building BuildVariables.inc include."
5252 >> temp.sed
5353 $(Verb) $(ECHO) 's/@LLVM_SYSTEM_LIBS@/$(subst /,\/,$(LIBS))/' \
5454 >> temp.sed
55 $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \
56 >> temp.sed
5557 $(Verb) $(SED) -f temp.sed < $< > $@
5658 $(Verb) $(RM) temp.sed
2424 #include "llvm/Config/llvm-config.h"
2525 #include "llvm/Support/FileSystem.h"
2626 #include "llvm/Support/Path.h"
27 #include "llvm/Support/TargetRegistry.h"
2827 #include "llvm/Support/raw_ostream.h"
2928 #include
3029 #include
270269 }
271270 OS << '\n';
272271 } else if (Arg == "--targets-built") {
273 bool First = true;
274 for (TargetRegistry::iterator I = TargetRegistry::begin(),
275 E = TargetRegistry::end(); I != E; First = false, ++I) {
276 if (!First)
277 OS << ' ';
278 OS << I->getName();
279 }
280 OS << '\n';
272 OS << LLVM_TARGETS_BUILT << '\n';
281273 } else if (Arg == "--host-target") {
282274 OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n';
283275 } else if (Arg == "--build-mode") {