修改介绍

编译输出stub.an的code-comment信息跨平台问题

Issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IAXGD6?from=project-issue

Signed-off-by: yangliping <yangliping30@h-partners.com>
This commit is contained in:
yangliping 2024-10-16 12:10:38 +08:00
parent 0798656e68
commit 00b6b56026
2 changed files with 9 additions and 6 deletions

View File

@ -534,11 +534,10 @@ action("gen_stub_file") {
"/thirdparty/bounds_checking_function:" + "/thirdparty/bounds_checking_function:" +
rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib/"), rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib/"),
] ]
outputs = [ "$stub_file_gen_dir/stub.an" ]
outputs = [ if (is_ohos) {
"$stub_file_gen_dir/stub.an", outputs += [ "$stub_file_gen_dir/stub_code_comment.txt" ]
"$stub_file_gen_dir/stub_code_comment.txt", }
]
} }
ohos_prebuilt_shared_library("stub.an") { ohos_prebuilt_shared_library("stub.an") {

View File

@ -122,7 +122,11 @@ def process_open(args: object) -> [str, object]:
def generate_stub_code_comment(out_str:str): def generate_stub_code_comment(out_str:str):
flags = os.O_WRONLY | os.O_CREAT flags = os.O_WRONLY | os.O_CREAT
mode = stat.S_IWUSR | stat.S_IRUSR mode = stat.S_IWUSR | stat.S_IRUSR
fd = os.open('./gen/arkcompiler/ets_runtime/stub_code_comment.txt', flags, mode) dir_path = './gen/arkcompiler/ets_runtime/'
if not os.path.exists(dir_path):
return
file_path = dir_path + 'stub_code_comment.txt'
fd = os.open(file_path, flags, mode)
with os.fdopen(fd, "w") as code_comment_file: with os.fdopen(fd, "w") as code_comment_file:
code_comment_file.write(out_str) code_comment_file.write(out_str)