Summary:
This can be used for distinguishing between cmake and autoconf builds.
Users may need this in order to handle inconsistencies between the
outputs of the two build systems.
Reviewers: echristo, chandlerc, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11838
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247159
91177308-0d34-0410-b5e6-
96231b3b80d8
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+#define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
+set(LLVM_BUILD_SYSTEM cmake)
+
# Use the C++ link flags, since they should be a superset of C link flags.
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
>> temp.sed
$(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \
>> temp.sed
+ $(Verb) $(ECHO) 's/@LLVM_BUILD_SYSTEM@/autoconf/' \
+ >> temp.sed
$(Verb) $(SED) -f temp.sed < $< > $@
$(Verb) $(RM) temp.sed
--host-target Target triple used to configure LLVM.\n\
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).\n\
--assertion-mode Print assertion mode of LLVM tree (ON or OFF).\n\
+ --build-system Print the build system used to build LLVM (autoconf or cmake).\n\
Typical components:\n\
all All LLVM libraries (default).\n\
engine Either a native JIT or a bitcode interpreter.\n";
#else
OS << "ON\n";
#endif
+ } else if (Arg == "--build-system") {
+ OS << LLVM_BUILD_SYSTEM << '\n';
} else if (Arg == "--obj-root") {
OS << ActivePrefix << '\n';
} else if (Arg == "--src-root") {