Restore platform arguments

This commit is contained in:
Jacob Dufault 2018-03-19 16:25:35 -07:00
parent 0365e447f0
commit b5bd29b702
2 changed files with 23 additions and 0 deletions

View File

@ -259,6 +259,10 @@ bool IsSymLink(const std::string& path) {
return lstat(path.c_str(), &buf) == 0 && S_ISLNK(buf.st_mode); return lstat(path.c_str(), &buf) == 0 && S_ISLNK(buf.st_mode);
} }
std::vector<const char*> GetPlatformClangArguments() {
return {};
}
void FreeUnusedMemory() { void FreeUnusedMemory() {
#if defined(__GLIBC__) #if defined(__GLIBC__)
malloc_trim(0); malloc_trim(0);

View File

@ -129,6 +129,25 @@ bool IsSymLink(const std::string& path) {
return false; return false;
} }
std::vector<const char*> GetPlatformClangArguments() {
//
// Found by executing
//
// $ clang++ -E -x c++ - -v
//
// https://clang.llvm.org/docs/MSVCCompatibility.html
//
//
// These options are only needed if clang is targeting the msvc triple,
// which depends on how clang was build for windows. clang downloaded from
// releases.llvm.org defaults to msvc, so cquery does as well.
//
// https://github.com/cquery-project/cquery/issues/509 has more context.
//
return {"-fms-extensions", "-fms-compatibility",
"-fdelayed-template-parsing"};
}
void FreeUnusedMemory() {} void FreeUnusedMemory() {}
bool RunObjectiveCIndexTests() { bool RunObjectiveCIndexTests() {