diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 7be3784088ac..05e26e18f05d 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -240,6 +240,13 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope, m_compiler->getTargetOpts().Triple = llvm::sys::getDefaultTargetTriple(); } + if (target_sp->GetArchitecture().GetMachine() == llvm::Triple::x86 || + target_sp->GetArchitecture().GetMachine() == llvm::Triple::x86_64) + { + m_compiler->getTargetOpts().Features.push_back("+sse"); + m_compiler->getTargetOpts().Features.push_back("+sse2"); + } + if (m_compiler->getTargetOpts().Triple.find("ios") != std::string::npos) m_compiler->getTargetOpts().ABI = "apcs-gnu"; @@ -620,6 +627,9 @@ ClangExpressionParser::PrepareForExecution (lldb::addr_t &func_allocation_addr, StringRef mCPU; SmallVector mAttrs; + for (std::string &feature : m_compiler->getTargetOpts().Features) + mAttrs.push_back(feature); + TargetMachine *target_machine = builder.selectTarget(triple, mArch, mCPU,