Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1922,8 +1922,8 @@ void SwiftASTContext::AddExtraClangCC1Args(
const std::vector<std::pair<std::string, bool>> framework_search_paths,
std::vector<std::string> &dest) {
clang::CompilerInvocation invocation;
std::vector<std::string> default_paths = {"/usr/include",
"/user/local/include"};
std::vector<std::string> default_paths = {
"/usr/include", "/usr/local/include", "/usr/lib/swift/shims"};
llvm::SmallVector<const char *> clangArgs;
clangArgs.reserve(source.size() + module_search_paths.size() * 2 +
framework_search_paths.size() * 2 +
Expand Down Expand Up @@ -1979,6 +1979,11 @@ void SwiftASTContext::AddExtraClangCC1Args(
invocation.getHeaderSearchOpts().ModuleCachePath =
GetCompilerInvocation().getClangModuleCachePath().str();

// Since explicit module build, do not check relocated modules and update
// module base directories. Clang modules loaded from swift are loaded
// by name and there is no need to update and validate module maps.
invocation.getPreprocessorOpts().ModulesCheckRelocated = false;

bool use_cas_module = m_cas && m_action_cache;
if (use_cas_module) {
// Load from CAS.
Expand Down