Skip to content

Commit

Permalink
Restore platform arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdufault authored and MaskRay committed Oct 24, 2019
1 parent 504cb8d commit fb304d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ bool IsSymLink(const std::string& path) {
return lstat(path.c_str(), &buf) == 0 && S_ISLNK(buf.st_mode);
}

std::vector<const char*> GetPlatformClangArguments() {
return {};
}

void FreeUnusedMemory() {
#if defined(__GLIBC__)
malloc_trim(0);
Expand Down
19 changes: 19 additions & 0 deletions src/platform_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,25 @@ bool IsSymLink(const std::string& path) {
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() {}

bool RunObjectiveCIndexTests() {
Expand Down

0 comments on commit fb304d5

Please sign in to comment.