mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
llvm-config: Let directories aware of CMAKE_CFG_INTDIR.
With llvm-config.exe --bindir --libdir --build-mode, on Visual Studio 2010, In build tree: (OBJ_ROOT)/bin/MinSizeRel (OBJ_ROOT)/lib/MinSizeRel MinSizeRel In installed tree: (INSTALL_PREFIX)/bin (INSTALL_PREFIX)/lib MinSizeRel This is enhancements since r196283. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197467 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -184,6 +184,13 @@ int main(int argc, char **argv) {
|
|||||||
std::string CurrentExecPrefix;
|
std::string CurrentExecPrefix;
|
||||||
std::string ActiveObjRoot;
|
std::string ActiveObjRoot;
|
||||||
|
|
||||||
|
// If CMAKE_CFG_INTDIR is given, honor it as build mode.
|
||||||
|
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
|
||||||
|
|
||||||
// Create an absolute path, and pop up one directory (we expect to be inside a
|
// Create an absolute path, and pop up one directory (we expect to be inside a
|
||||||
// bin dir).
|
// bin dir).
|
||||||
sys::fs::make_absolute(CurrentPath);
|
sys::fs::make_absolute(CurrentPath);
|
||||||
@ -239,8 +246,8 @@ int main(int argc, char **argv) {
|
|||||||
ActiveLibDir = ActiveObjRoot + "/lib";
|
ActiveLibDir = ActiveObjRoot + "/lib";
|
||||||
break;
|
break;
|
||||||
case CMakeBuildModeStyle:
|
case CMakeBuildModeStyle:
|
||||||
ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE;
|
ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode;
|
||||||
ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE;
|
ActiveLibDir = ActiveObjRoot + "/lib/" + build_mode;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,11 +307,6 @@ 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") {
|
||||||
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';
|
OS << build_mode << '\n';
|
||||||
} else if (Arg == "--assertion-mode") {
|
} else if (Arg == "--assertion-mode") {
|
||||||
#if defined(NDEBUG)
|
#if defined(NDEBUG)
|
||||||
|
Reference in New Issue
Block a user