Revert "Clang module compilation options need to be per-platform."

This reverts commit r251340.

Breaks the Windows build because Windows doesn't have getuid.  The fix is not obvious.

llvm-svn: 251354
This commit is contained in:
Adrian McCarthy
2015-10-26 21:38:41 +00:00
parent 298639a5fd
commit 3f989d4e6e
5 changed files with 14 additions and 97 deletions

View File

@@ -38,13 +38,12 @@
#include "lldb/Target/Target.h"
#include "lldb/Target/UnixSignals.h"
#include "lldb/Utility/Utils.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "Utility/ModuleCache.h"
// Define these constants from POSIX mman.h rather than include the file
// so that they will be correct even when compiled on Linux.
#define MAP_PRIVATE 2
@@ -622,17 +621,6 @@ Platform::AddClangModuleCompilationOptions (Target *target, std::vector<std::str
options.insert(options.end(),
default_compilation_options.begin(),
default_compilation_options.end());
{
llvm::SmallString<128> DefaultModuleCache;
const bool erased_on_reboot = false;
llvm::sys::path::system_temp_directory(erased_on_reboot, DefaultModuleCache);
llvm::sys::path::append(DefaultModuleCache, "org.llvm.clang");
llvm::sys::path::append(DefaultModuleCache, "ModuleCache");
std::string module_cache_argument("-fmodules-cache-path=");
module_cache_argument.append(DefaultModuleCache.str().str());
options.push_back(module_cache_argument);
}
}