diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 884464a8b..bc215595f 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -292,7 +292,8 @@ void Parser::Setup(bool Compile) if (opts->verbose) printf("Target triple: %s\n", TO->Triple.c_str()); - TO->FeatureMap.insert(std::make_pair("neon", true)); + if (std::find(opts->Defines.begin(), opts->Defines.end(), "ANDROID") != opts->Defines.end()) + TO->FeatureMap.insert(std::make_pair("neon", true)); TargetInfo* TI = TargetInfo::CreateTargetInfo(c->getDiagnostics(), TO); if (!TI)