mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-25 22:03:45 -06:00
ide: clang related fixes, find in files now trims long lines when putting them to output display array to avoid slowdowns
git-svn-id: svn://ultimatepp.org/upp/trunk@14115 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
39355c2646
commit
5941dfdae3
7 changed files with 123 additions and 100 deletions
|
|
@ -121,13 +121,88 @@ void bmSet(VectorMap<String, String>& bm, const char *id, const String& val)
|
|||
|
||||
void InstantSetup()
|
||||
{
|
||||
DirFinder df;
|
||||
|
||||
bool dirty = false;
|
||||
String default_method;
|
||||
|
||||
bool dirty = false;
|
||||
String bin = GetExeDirFile("bin");
|
||||
|
||||
if(DirectoryExists(bin + "/clang")) // hopefully deprecated, but keep it for now
|
||||
for(int x64 = 0; x64 < 2; x64++) {
|
||||
String method = x64 ? "CLANGx64" : "CLANG";
|
||||
#ifdef INSTANT_TESTING
|
||||
method << "Test";
|
||||
#endif
|
||||
VectorMap<String, String> bm = GetMethodVars(method);
|
||||
|
||||
Vector<String> bins = Split(bm.Get("PATH", ""), ';');
|
||||
Vector<String> incs = Split(bm.Get("INCLUDE", ""), ';');
|
||||
Vector<String> libs = Split(bm.Get("LIB", ""), ';');
|
||||
#ifdef INSTANT_TESTING
|
||||
if(CheckDirs(bins, 3) && CheckDirs(incs, 2) && CheckDirs(libs, 2)) {
|
||||
if(!x64)
|
||||
default_method = Nvl(default_method, method);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
bmSet(bm, "BUILDER", "CLANG");
|
||||
bmSet(bm, "COMPILER", x64 ? "" : "i686-w64-mingw32-c++");
|
||||
bmSet(bm, "COMMON_OPTIONS", "");
|
||||
bmSet(bm, "COMMON_CPP_OPTIONS", "");
|
||||
bmSet(bm, "COMMON_C_OPTIONS", "");
|
||||
bmSet(bm, "COMMON_LINK", "");
|
||||
bmSet(bm, "COMMON_FLAGS", "");
|
||||
bmSet(bm, "DEBUG_INFO", "2");
|
||||
bmSet(bm, "DEBUG_BLITZ", "1");
|
||||
bmSet(bm, "DEBUG_LINKMODE", "0");
|
||||
bmSet(bm, "DEBUG_OPTIONS", "-O0 -g -gcodeview -fno-limit-debug-info");
|
||||
bmSet(bm, "DEBUG_FLAGS", "");
|
||||
bmSet(bm, "DEBUG_LINK", "-Wl,-pdb= -Wl,--stack,20000000");
|
||||
bmSet(bm, "RELEASE_BLITZ", "");
|
||||
bmSet(bm, "RELEASE_LINKMODE", "0");
|
||||
bmSet(bm, "RELEASE_OPTIONS", "-O3 ");
|
||||
bmSet(bm, "RELEASE_FLAGS", "");
|
||||
bmSet(bm, "RELEASE_LINK", "-Wl,--stack,20000000");
|
||||
bmSet(bm, "DEBUGGER", "gdb");
|
||||
bmSet(bm, "ALLOW_PRECOMPILED_HEADERS", "1");
|
||||
bmSet(bm, "DISABLE_BLITZ", "");
|
||||
|
||||
// bmSet(bm, "LINKMODE_LOCK", "0");
|
||||
|
||||
String clang = bin + "/clang";
|
||||
|
||||
bins.At(0) = clang + "/bin";
|
||||
bins.At(1) = clang + (x64 ? "/x86_64-w64-mingw32/bin" : "/i686-w64-mingw32/bin");
|
||||
bins.At(2) = bin + (x64 ? "/openssl/bin64" : "/openssl/bin32");
|
||||
bins.At(3) = GetExeDirFile(x64 ? "bin/SDL2/lib/x64" : "bin/SDL2/lib/x86");
|
||||
bins.At(4) = GetExeDirFile(x64 ? "bin/pgsql/x64/bin" : "bin/pgsql/x86/bin");
|
||||
bins.At(5) = GetExeDirFile(x64 ? "bin/mysql/lib64" : "bin/mysql/lib32");
|
||||
|
||||
incs.At(0) = clang + "/include";
|
||||
incs.At(1) = bin + "/openssl/include";
|
||||
incs.At(2) = GetExeDirFile("bin/SDL2/include");
|
||||
incs.At(3) = GetExeDirFile(x64 ? "bin/pgsql/x64/include" : "bin/pgsql/x86/include");
|
||||
incs.At(4) = GetExeDirFile(x64 ? "bin/mysql/include" : "bin/mysql/include");
|
||||
|
||||
libs.At(0) = clang + "/lib";
|
||||
libs.At(1) = bin + (x64 ? "/openssl/lib64" : "/openssl/lib32");;
|
||||
libs.At(2) = GetExeDirFile(x64 ? "bin/SDL2/lib/x64" : "bin/SDL2/lib/x86");
|
||||
libs.At(3) = GetExeDirFile(x64 ? "bin/pgsql/x64/lib" : "bin/pgsql/x86/lib");
|
||||
libs.At(4) = GetExeDirFile(x64 ? "bin/mysql/lib64" : "bin/mysql/lib32");
|
||||
|
||||
bm.GetAdd("PATH") = Join(bins, ";");
|
||||
bm.GetAdd("INCLUDE") = Join(incs, ";");
|
||||
bm.GetAdd("LIB") = Join(libs, ";");
|
||||
|
||||
SaveVarFile(ConfigFile(method + ".bm"), bm);
|
||||
dirty = true;
|
||||
|
||||
if(x64)
|
||||
default_method = Nvl(default_method, method);
|
||||
}
|
||||
|
||||
enum { VS_2015, VS_2017, BT_2017, VS_2019, BT_2019 };
|
||||
DirFinder df;
|
||||
|
||||
for(int version = VS_2015; version <= BT_2019; version++)
|
||||
for(int x64 = 0; x64 < 2; x64++) {
|
||||
|
|
@ -155,8 +230,8 @@ void InstantSetup()
|
|||
Vector<String> libs = Split(bm.Get("LIB", ""), ';');
|
||||
#ifdef INSTANT_TESTING
|
||||
if(CheckDirs(bins, 2) && CheckDirs(incs, 4) && CheckDirs(libs, 3)) {
|
||||
if(!x64)
|
||||
default_method = x86method;
|
||||
if(x64)
|
||||
default_method = Nvl(default_method, x86method);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
@ -303,84 +378,6 @@ void InstantSetup()
|
|||
}
|
||||
}
|
||||
|
||||
String bin = GetExeDirFile("bin");
|
||||
|
||||
if(DirectoryExists(bin + "/clang")) // hopefully deprecated, but keep it for now
|
||||
for(int x64 = 0; x64 < 2; x64++) {
|
||||
String method = x64 ? "CLANGx64" : "CLANG";
|
||||
#ifdef INSTANT_TESTING
|
||||
method << "Test";
|
||||
#endif
|
||||
VectorMap<String, String> bm = GetMethodVars(method);
|
||||
|
||||
Vector<String> bins = Split(bm.Get("PATH", ""), ';');
|
||||
Vector<String> incs = Split(bm.Get("INCLUDE", ""), ';');
|
||||
Vector<String> libs = Split(bm.Get("LIB", ""), ';');
|
||||
#ifdef INSTANT_TESTING
|
||||
if(CheckDirs(bins, 3) && CheckDirs(incs, 2) && CheckDirs(libs, 2)) {
|
||||
if(!x64)
|
||||
default_method = Nvl(default_method, method);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
bmSet(bm, "BUILDER", "CLANG");
|
||||
bmSet(bm, "COMPILER", x64 ? "" : "i686-w64-mingw32-c++");
|
||||
bmSet(bm, "COMMON_OPTIONS", "");
|
||||
bmSet(bm, "COMMON_CPP_OPTIONS", "");
|
||||
bmSet(bm, "COMMON_C_OPTIONS", "");
|
||||
bmSet(bm, "COMMON_LINK", "");
|
||||
bmSet(bm, "COMMON_FLAGS", "");
|
||||
bmSet(bm, "DEBUG_INFO", "2");
|
||||
bmSet(bm, "DEBUG_BLITZ", "1");
|
||||
bmSet(bm, "DEBUG_LINKMODE", "0");
|
||||
bmSet(bm, "DEBUG_OPTIONS", "-O0 -g -gcodeview");
|
||||
bmSet(bm, "DEBUG_FLAGS", "");
|
||||
bmSet(bm, "DEBUG_LINK", "-Wl,-pdb= -Wl,--stack,20000000");
|
||||
bmSet(bm, "RELEASE_BLITZ", "");
|
||||
bmSet(bm, "RELEASE_LINKMODE", "0");
|
||||
bmSet(bm, "RELEASE_OPTIONS", "-O3 ");
|
||||
bmSet(bm, "RELEASE_FLAGS", "");
|
||||
bmSet(bm, "RELEASE_LINK", "-Wl,--stack,20000000");
|
||||
bmSet(bm, "DEBUGGER", "gdb");
|
||||
bmSet(bm, "ALLOW_PRECOMPILED_HEADERS", "1");
|
||||
bmSet(bm, "DISABLE_BLITZ", "");
|
||||
|
||||
// bmSet(bm, "LINKMODE_LOCK", "0");
|
||||
|
||||
String clang = bin + "/clang";
|
||||
|
||||
bins.At(0) = clang + "/bin";
|
||||
bins.At(1) = clang + (x64 ? "/x86_64-w64-mingw32/bin" : "/i686-w64-mingw32/bin");
|
||||
bins.At(2) = bin + (x64 ? "/openssl/bin64" : "/openssl/bin32");
|
||||
bins.At(3) = GetExeDirFile(x64 ? "bin/SDL2/lib/x64" : "bin/SDL2/lib/x86");
|
||||
bins.At(4) = GetExeDirFile(x64 ? "bin/pgsql/x64/bin" : "bin/pgsql/x86/bin");
|
||||
bins.At(5) = GetExeDirFile(x64 ? "bin/mysql/lib64" : "bin/mysql/lib32");
|
||||
|
||||
incs.At(0) = clang + "/include";
|
||||
incs.At(1) = bin + "/openssl/include";
|
||||
incs.At(2) = GetExeDirFile("bin/SDL2/include");
|
||||
incs.At(3) = GetExeDirFile(x64 ? "bin/pgsql/x64/include" : "bin/pgsql/x86/include");
|
||||
incs.At(4) = GetExeDirFile(x64 ? "bin/mysql/include" : "bin/mysql/include");
|
||||
|
||||
libs.At(0) = clang + "/lib";
|
||||
libs.At(1) = bin + (x64 ? "/openssl/lib64" : "/openssl/lib32");;
|
||||
libs.At(2) = GetExeDirFile(x64 ? "bin/SDL2/lib/x64" : "bin/SDL2/lib/x86");
|
||||
libs.At(3) = GetExeDirFile(x64 ? "bin/pgsql/x64/lib" : "bin/pgsql/x86/lib");
|
||||
libs.At(4) = GetExeDirFile(x64 ? "bin/mysql/lib64" : "bin/mysql/lib32");
|
||||
|
||||
bm.GetAdd("PATH") = Join(bins, ";");
|
||||
bm.GetAdd("INCLUDE") = Join(incs, ";");
|
||||
bm.GetAdd("LIB") = Join(libs, ";");
|
||||
|
||||
SaveVarFile(ConfigFile(method + ".bm"), bm);
|
||||
dirty = true;
|
||||
|
||||
if(!x64)
|
||||
default_method = Nvl(default_method, method);
|
||||
}
|
||||
|
||||
|
||||
if(DirectoryExists(bin + "/mingw64")) // hopefully deprecated, but keep it for now
|
||||
for(int x64 = 0; x64 < 2; x64++) {
|
||||
String method = x64 ? "MINGWx64" : "MINGW";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue