llvm-config: With --build-mode, show ${CMAKE_CFG_INTDIR} on multiconfig builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2013-12-03 14:35:17 +00:00
parent 5a10a7cccf
commit 94f5a677f6
2 changed files with 9 additions and 1 deletions

View File

@ -22,6 +22,9 @@ set(LLVM_SYSTEM_LIBS ${SYSTEM_LIBS})
string(REPLACE ";" " " LLVM_TARGETS_BUILT "${LLVM_TARGETS_TO_BUILD}") string(REPLACE ";" " " LLVM_TARGETS_BUILT "${LLVM_TARGETS_TO_BUILD}")
configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY) configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY)
# Set build-time environment(s).
add_definitions(-DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}")
# Add the llvm-config tool. # Add the llvm-config tool.
add_llvm_tool(llvm-config add_llvm_tool(llvm-config
llvm-config.cpp llvm-config.cpp

View File

@ -300,7 +300,12 @@ int main(int argc, char **argv) {
} else if (Arg == "--host-target") { } else if (Arg == "--host-target") {
OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n'; OS << LLVM_DEFAULT_TARGET_TRIPLE << '\n';
} else if (Arg == "--build-mode") { } else if (Arg == "--build-mode") {
OS << LLVM_BUILDMODE << '\n'; char const *build_mode = LLVM_BUILDMODE;
#if defined(CMAKE_CFG_INTDIR)
if (!(CMAKE_CFG_INTDIR[0] == '.' && CMAKE_CFG_INTDIR[1] == '\0'))
build_mode = CMAKE_CFG_INTDIR;
#endif
OS << build_mode << '\n';
} else if (Arg == "--obj-root") { } else if (Arg == "--obj-root") {
OS << LLVM_OBJ_ROOT << '\n'; OS << LLVM_OBJ_ROOT << '\n';
} else if (Arg == "--src-root") { } else if (Arg == "--src-root") {