Index: lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py =================================================================== --- lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py +++ lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py @@ -15,8 +15,6 @@ # skipIf's in the future. @add_test_categories(["libc++"]) @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) def test(self): self.build() Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -220,10 +220,12 @@ static void SetupModuleHeaderPaths(CompilerInstance *compiler, std::vector include_directories, - lldb::TargetSP target_sp) { + lldb_private::Target &target) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); HeaderSearchOptions &search_opts = compiler->getHeaderSearchOpts(); + search_opts.Sysroot = + target.GetPlatform()->GetSDKDirectory(target).GetStringRef().str(); for (ConstString dir : include_directories) { search_opts.AddPath(dir.AsCString(), frontend::System, false, true); @@ -249,7 +251,7 @@ search_opts.ImplicitModuleMaps = true; std::vector system_include_directories = - target_sp->GetPlatform()->GetSystemIncludeDirectories( + target.GetPlatform()->GetSystemIncludeDirectories( lldb::eLanguageTypeC_plus_plus); for (const std::string &include_dir : system_include_directories) { @@ -512,8 +514,7 @@ lang_opts.DoubleSquareBracketAttributes = true; lang_opts.CPlusPlus11 = true; - SetupModuleHeaderPaths(m_compiler.get(), m_include_directories, - target_sp); + SetupModuleHeaderPaths(m_compiler.get(), m_include_directories, *target_sp); } if (process_sp && lang_opts.ObjC) {