mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-29 16:29:00 -04:00
[llvm-config] Get rid of code related to the Makefile builds
Summary: I left --build-system for backwards compat, in case there are scripts using it. Feel free to ask for its removal too. Reviewers: chapuni, tstellarAMD Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17886 llvm-svn: 262924
This commit is contained in:
parent
65fa0b5169
commit
a7e63b1e67
@ -209,7 +209,7 @@ Options:\n\
|
|||||||
--host-target Target triple used to configure LLVM.\n\
|
--host-target Target triple used to configure LLVM.\n\
|
||||||
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).\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\
|
--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\
|
--build-system Print the build system used to build LLVM (always cmake).\n\
|
||||||
--has-rtti Print whether or not LLVM was built with rtti (YES or NO).\n\
|
--has-rtti Print whether or not LLVM was built with rtti (YES or NO).\n\
|
||||||
--has-global-isel Print whether or not LLVM was built with global-isel support (YES or NO).\n\
|
--has-global-isel Print whether or not LLVM was built with global-isel support (YES or NO).\n\
|
||||||
--shared-mode Print how the provided components can be collectively linked (`shared` or `static`).\n\
|
--shared-mode Print how the provided components can be collectively linked (`shared` or `static`).\n\
|
||||||
@ -265,7 +265,7 @@ int main(int argc, char **argv) {
|
|||||||
// that we can report the correct information when run from a development
|
// that we can report the correct information when run from a development
|
||||||
// tree.
|
// tree.
|
||||||
bool IsInDevelopmentTree;
|
bool IsInDevelopmentTree;
|
||||||
enum { MakefileStyle, CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
|
enum { CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
|
||||||
llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
||||||
std::string CurrentExecPrefix;
|
std::string CurrentExecPrefix;
|
||||||
std::string ActiveObjRoot;
|
std::string ActiveObjRoot;
|
||||||
@ -285,20 +285,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
// Check to see if we are inside a development tree by comparing to possible
|
// Check to see if we are inside a development tree by comparing to possible
|
||||||
// locations (prefix style or CMake style).
|
// locations (prefix style or CMake style).
|
||||||
if (sys::fs::equivalent(CurrentExecPrefix,
|
if (sys::fs::equivalent(CurrentExecPrefix, LLVM_OBJ_ROOT)) {
|
||||||
Twine(LLVM_OBJ_ROOT) + "/" + build_mode)) {
|
|
||||||
IsInDevelopmentTree = true;
|
|
||||||
DevelopmentTreeLayout = MakefileStyle;
|
|
||||||
|
|
||||||
// If we are in a development tree, then check if we are in a BuildTools
|
|
||||||
// directory. This indicates we are built for the build triple, but we
|
|
||||||
// always want to provide information for the host triple.
|
|
||||||
if (sys::path::filename(LLVM_OBJ_ROOT) == "BuildTools") {
|
|
||||||
ActiveObjRoot = sys::path::parent_path(LLVM_OBJ_ROOT);
|
|
||||||
} else {
|
|
||||||
ActiveObjRoot = LLVM_OBJ_ROOT;
|
|
||||||
}
|
|
||||||
} else if (sys::fs::equivalent(CurrentExecPrefix, LLVM_OBJ_ROOT)) {
|
|
||||||
IsInDevelopmentTree = true;
|
IsInDevelopmentTree = true;
|
||||||
DevelopmentTreeLayout = CMakeStyle;
|
DevelopmentTreeLayout = CMakeStyle;
|
||||||
ActiveObjRoot = LLVM_OBJ_ROOT;
|
ActiveObjRoot = LLVM_OBJ_ROOT;
|
||||||
@ -309,7 +296,7 @@ int main(int argc, char **argv) {
|
|||||||
ActiveObjRoot = LLVM_OBJ_ROOT;
|
ActiveObjRoot = LLVM_OBJ_ROOT;
|
||||||
} else {
|
} else {
|
||||||
IsInDevelopmentTree = false;
|
IsInDevelopmentTree = false;
|
||||||
DevelopmentTreeLayout = MakefileStyle; // Initialized to avoid warnings.
|
DevelopmentTreeLayout = CMakeStyle; // Initialized to avoid warnings.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute various directory locations based on the derived location
|
// Compute various directory locations based on the derived location
|
||||||
@ -323,12 +310,6 @@ int main(int argc, char **argv) {
|
|||||||
// CMake organizes the products differently than a normal prefix style
|
// CMake organizes the products differently than a normal prefix style
|
||||||
// layout.
|
// layout.
|
||||||
switch (DevelopmentTreeLayout) {
|
switch (DevelopmentTreeLayout) {
|
||||||
case MakefileStyle:
|
|
||||||
ActivePrefix = ActiveObjRoot;
|
|
||||||
ActiveBinDir = ActiveObjRoot + "/" + build_mode + "/bin";
|
|
||||||
ActiveLibDir =
|
|
||||||
ActiveObjRoot + "/" + build_mode + "/lib" + LLVM_LIBDIR_SUFFIX;
|
|
||||||
break;
|
|
||||||
case CMakeStyle:
|
case CMakeStyle:
|
||||||
ActiveBinDir = ActiveObjRoot + "/bin";
|
ActiveBinDir = ActiveObjRoot + "/bin";
|
||||||
ActiveLibDir = ActiveObjRoot + "/lib" + LLVM_LIBDIR_SUFFIX;
|
ActiveLibDir = ActiveObjRoot + "/lib" + LLVM_LIBDIR_SUFFIX;
|
||||||
@ -397,16 +378,8 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
const bool BuiltDyLib = (std::strcmp(LLVM_ENABLE_DYLIB, "ON") == 0);
|
const bool BuiltDyLib = (std::strcmp(LLVM_ENABLE_DYLIB, "ON") == 0);
|
||||||
|
|
||||||
enum { CMake, AutoConf } ConfigTool;
|
|
||||||
if (std::strcmp(LLVM_BUILD_SYSTEM, "cmake") == 0) {
|
|
||||||
ConfigTool = CMake;
|
|
||||||
} else {
|
|
||||||
ConfigTool = AutoConf;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// CMake style shared libs, ie each component is in a shared library.
|
/// CMake style shared libs, ie each component is in a shared library.
|
||||||
const bool BuiltSharedLibs =
|
const bool BuiltSharedLibs = std::strcmp(LLVM_ENABLE_SHARED, "ON") == 0;
|
||||||
(ConfigTool == CMake && std::strcmp(LLVM_ENABLE_SHARED, "ON") == 0);
|
|
||||||
|
|
||||||
bool DyLibExists = false;
|
bool DyLibExists = false;
|
||||||
const std::string DyLibName =
|
const std::string DyLibName =
|
||||||
|
Loading…
Reference in New Issue
Block a user