diff --git a/uppsrc/Core/Path.h b/uppsrc/Core/Path.h index a970ef4de..8c71d90e9 100644 --- a/uppsrc/Core/Path.h +++ b/uppsrc/Core/Path.h @@ -38,7 +38,9 @@ String GetFullPath(const char *path); String GetCurrentDirectory(); #endif +#ifdef PLATFORM_POSIX bool SetCurrentDirectory(const char *path); +#endif struct FileTime; diff --git a/uppsrc/ide/Builders/GccBuilder.icpp b/uppsrc/ide/Builders/GccBuilder.icpp index f5c7e21f9..f6dab6735 100644 --- a/uppsrc/ide/Builders/GccBuilder.icpp +++ b/uppsrc/ide/Builders/GccBuilder.icpp @@ -91,7 +91,7 @@ bool GccBuilder::BuildPackage(const String& package, Vector& linkfile, V if(ext == ".a" || ext == ".so") linkfile.Add(fn); else - if(IsHeaderExt(ext) && pkg[i].pch && allow_pch && release && !HasAnyDebug() && !blitz) { + if(IsHeaderExt(ext) && pkg[i].pch && allow_pch && !blitz) { if(pch_header.GetCount()) PutConsole(GetFileName(fn) + ": multiple PCHs are not allowed. Check your package configuration"); else @@ -473,7 +473,7 @@ bool GccBuilder::Link(const Vector& linkfile, const String& linkoptions, lnk << " -o " << GetHostPathQ(target); if(createmap) lnk << " -Wl,-Map," << GetHostPathQ(GetFileDirectory(target) + GetFileTitle(target) + ".map"); - if(HasFlag("DEBUG") || HasFlag("DEBUG_MINIMAL") || HasFlag("DEBUG_FULL")) + if(HasFlag("DEBUG_MINIMAL") || HasFlag("DEBUG_FULL")) lnk << " -ggdb"; else lnk << (!HasFlag("OSX11") ? " -Wl,-s" : ""); diff --git a/uppsrc/ide/InstantSetup.cpp b/uppsrc/ide/InstantSetup.cpp index eaf4de699..17aea8069 100644 --- a/uppsrc/ide/InstantSetup.cpp +++ b/uppsrc/ide/InstantSetup.cpp @@ -219,23 +219,25 @@ void InstantSetup() Vector bins = Split(bm.Get("PATH", ""), ';'); Vector incs = Split(bm.Get("INCLUDE", ""), ';'); Vector libs = Split(bm.Get("LIB", ""), ';'); + #ifndef _DEBUG if(CheckDirs(bins, 3) && CheckDirs(incs, 2) && CheckDirs(libs, 2)) { if(!x64) default_method = Nvl(default_method, method); continue; } + #endif bmSet(bm, "BUILDER", "GCC"); bmSet(bm, "COMPILER", ""); bmSet(bm, "COMMON_OPTIONS", "-msse2 -D__CRT__NO_INLINE"); bmSet(bm, "COMMON_CPP_OPTIONS", "-std=c++14"); bmSet(bm, "COMMON_C_OPTIONS", ""); - bmSet(bm, "COMMON_LINK", x64 ? "" : "-m32"); + bmSet(bm, "COMMON_LINK", ""); bmSet(bm, "COMMON_FLAGS", ""); bmSet(bm, "DEBUG_INFO", "2"); - bmSet(bm, "DEBUG_BLITZ", "1"); + bmSet(bm, "DEBUG_BLITZ", ""); bmSet(bm, "DEBUG_LINKMODE", "0"); - bmSet(bm, "DEBUG_OPTIONS", "-O0 -ggdb"); + bmSet(bm, "DEBUG_OPTIONS", "-Os"); bmSet(bm, "DEBUG_FLAGS", ""); bmSet(bm, "DEBUG_LINK", ""); bmSet(bm, "RELEASE_BLITZ", "");