mirror of
https://gitee.com/openharmony/third_party_gn
synced 2024-11-27 03:40:25 +00:00
!31 修复external_deps不能指定工具链信息的问题和放开可执行文件作为innerapi的拦截
Merge pull request !31 from RingKing/master
This commit is contained in:
commit
79af559790
@ -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 + ").");
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user