mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-17 14:22:37 -06:00
Hopefully another linux fix
This commit is contained in:
parent
34eaef290c
commit
bca4378009
3 changed files with 9 additions and 7 deletions
|
|
@ -29,14 +29,20 @@ String SourceLocation::ToString() const
|
|||
return String() << filename << " (" << line << ":" << column << ")";
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
String GetClangInternalIncludes()
|
||||
{
|
||||
static String includes;
|
||||
ONCELOCK {
|
||||
String dummy = ConfigFile("dummy.cpp");
|
||||
Upp::SaveFile(dummy, String());
|
||||
String h = Sys(GetExeDirFile("bin/clang/bin/c++") + " -v -x c++ -E " + dummy);
|
||||
String h = Sys(
|
||||
#ifdef PLATFORM_WIN32
|
||||
GetExeDirFile("bin/clang/bin/c++") +
|
||||
#else
|
||||
"clang++"
|
||||
#endif
|
||||
" -v -x c++ -E " + dummy
|
||||
);
|
||||
DeleteFile(dummy);
|
||||
h.Replace("\r", "");
|
||||
Vector<String> ln = Split(h, '\n');
|
||||
|
|
@ -48,7 +54,6 @@ String GetClangInternalIncludes()
|
|||
}
|
||||
return includes;
|
||||
}
|
||||
#endif
|
||||
|
||||
SourceLocation::SourceLocation(CXSourceLocation location)
|
||||
{
|
||||
|
|
@ -79,9 +84,7 @@ bool Clang::Parse(const String& filename, const String& content, const String& i
|
|||
cmdline << RedefineMacros();
|
||||
|
||||
String includes = includes_;
|
||||
#ifdef PLATFORM_WIN32
|
||||
MergeWith(includes, ";", GetClangInternalIncludes());
|
||||
#endif
|
||||
|
||||
Vector<String> args;
|
||||
for(const String& s : Split(includes, ';'))
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ struct SourceLocation {
|
|||
};
|
||||
|
||||
String RedefineMacros();
|
||||
String GetClangInternalIncludes();
|
||||
|
||||
enum AdditionalKinds {
|
||||
KIND_INCLUDEFILE = -1000,
|
||||
|
|
|
|||
|
|
@ -116,8 +116,6 @@ void StartEditorMode(const Vector<String>& args, Ide& ide, bool& clset)
|
|||
return Upp::GetExitCode(); \
|
||||
}
|
||||
|
||||
String GetClangInternalIncludes();
|
||||
|
||||
#ifdef flagMAIN
|
||||
GUI_APP_MAIN
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue