!31 修复external_deps不能指定工具链信息的问题和放开可执行文件作为innerapi的拦截

Merge pull request !31 from RingKing/master
This commit is contained in:
openharmony_ci 2024-03-14 13:50:22 +00:00 committed by Gitee
commit 79af559790
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 10 additions and 2 deletions

View File

@ -360,7 +360,14 @@ bool OhosComponentsImpl::GetExternalDepsLabel(const Value &external_dep, std::st
return false;
}
std::string innerapi_name = str_val.substr(sep + 1);
label = component->getInnerApi(innerapi_name);
size_t tool_sep = innerapi_name.find("(");
std::string tool_chain = "";
if (tool_sep != std::string::npos) {
tool_chain = innerapi_name.substr(tool_sep);
innerapi_name = innerapi_name.substr(0, tool_sep);
}
label = component->getInnerApi(innerapi_name) + tool_chain;
if (label == EMPTY_INNERAPI) {
*err = Err(external_dep,
"OHOS innerapi: (" + innerapi_name + ") not found for component (" + component_name + ").");

View File

@ -423,7 +423,8 @@ bool OhosComponentChecker::CheckInnerApiNotLib(const Item *item, const OhosCompo
}
Target::OutputType type = item->AsTarget()->output_type();
if (type == Target::SHARED_LIBRARY || type == Target::STATIC_LIBRARY || type == Target::RUST_LIBRARY) {
if (type == Target::SHARED_LIBRARY || type == Target::STATIC_LIBRARY || type == Target::RUST_LIBRARY ||
type == Target::EXECUTABLE || type == Target::COPY_FILES) {
return true;
}