diff --git a/adapter/uhdf/hdi_small.gni b/adapter/uhdf/hdi_small.gni index 9b05b447f080facab11c6e7e4e1a9df490929100..37640791a419a2d0291a962fbf1604776cc404fb 100644 --- a/adapter/uhdf/hdi_small.gni +++ b/adapter/uhdf/hdi_small.gni @@ -126,15 +126,16 @@ template("hdi_small") { if (defined(invoker.sources)) { sources = hdi_build_info.proxy_sources public_configs = [ ":$idl_headers_config" ] - deps = [ - ":hdi_gen", - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ ":hdi_gen" ] public_deps = hdi_build_info.proxy_deps - external_deps = [ "hdf_core:libhdi" ] + external_deps = [ + "bounds_checking_function:libsec_shared", + "hdf_core:libhdi", + "hilog_lite:hilog_shared", + ] + if (invoker.language == "c") { external_deps += [ "hdf_core:libhdf_utils" ] } @@ -150,6 +151,12 @@ template("hdi_small") { } } + lib_server = "lib" + target_name + "_stub" + "_" + hdi_build_info.version + group(lib_server) { + public_configs = [ ":$idl_headers_config" ] + deps = [ ":hdi_gen" ] + } + # generate code and shared library group("$target_name" + "_idl_target") { deps = [ ":$lib_client" ] diff --git a/framework/tools/hdi-gen/ast/ast_attribute.h b/framework/tools/hdi-gen/ast/ast_attribute.h index bc272ab3a8a14caf498030bc8c3f687cb8c55fc8..7a438580aa95594b991cf5a5b08b81d156f7da37 100644 --- a/framework/tools/hdi-gen/ast/ast_attribute.h +++ b/framework/tools/hdi-gen/ast/ast_attribute.h @@ -34,6 +34,11 @@ public: value_ |= value; } + inline Attribute GetValue() const + { + return value_; + } + bool HasValue(Attribute attr) const { return (value_ & attr) != 0; diff --git a/framework/tools/hdi-gen/ast/ast_method.h b/framework/tools/hdi-gen/ast/ast_method.h index 2eeaa5b92d9a285e52df4c1d4ad9c604d33ed2b7..89e44ce4a5e17de743dbdfb6c3b62be300421369 100644 --- a/framework/tools/hdi-gen/ast/ast_method.h +++ b/framework/tools/hdi-gen/ast/ast_method.h @@ -29,10 +29,10 @@ public: return name_; } - inline void SetAttribute(const AutoPtr &attr) + inline void SetAttribute(AutoPtr attr) { - if (attr != nullptr) { - attr_ = attr; + if (attr_ != nullptr && attr != nullptr) { + attr_->SetValue(attr->GetValue()); } } diff --git a/framework/tools/hdi-gen/parser/parser.cpp b/framework/tools/hdi-gen/parser/parser.cpp index de44c8992e31bf8e7c3fde12a64c4c8555ba984c..396686972d9263b648b4d50c437878633642ded4 100644 --- a/framework/tools/hdi-gen/parser/parser.cpp +++ b/framework/tools/hdi-gen/parser/parser.cpp @@ -610,7 +610,7 @@ void Parser::CheckMethodAttr(const AutoPtr &interface, const A { // if the attribute of method is empty, the default value is attribute of interface if (!method->IsMini() && !method->IsLite() && !method->IsFull()) { - method->GetAttribute()->SetValue(ASTAttr::FULL | ASTAttr::LITE | ASTAttr::MINI); + method->SetAttribute(interface->GetAttribute()); } if (!interface->IsMini() && method->IsMini()) {