From b0a00a5387697a0450f9d67061f0976a803363de Mon Sep 17 00:00:00 2001 From: liuwenfeng Date: Thu, 29 May 2025 04:08:20 +0000 Subject: [PATCH 1/8] support asan Signed-off-by: liuwenfeng --- BUILD.gn | 9 ++++++ ohos/build_ohos64.py | 6 ++-- ohos/meson_cross_process64.py | 59 ++++++++++++++++++++++++++++++----- 3 files changed, 63 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 2a03af468f8..0c45e230ef9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -28,10 +28,19 @@ action("mesa3d_action_build") { ohos_root_path = rebase_path("//") product_name = rebase_path("${root_build_dir}", "//out") mesa3d_source_path = rebase_path("//third_party/mesa3d", root_build_dir) + asan_option = "noasan" + if (is_asan) { + if (use_hwasan) { + asan_option = "hwasan" + } else { + asan_option = "swasan" + } + } args = [ "$ohos_root_path", "$product_name", "$mesa3d_source_path", + "$asan_option", ] external_deps = [ "hilog:libhilog", diff --git a/ohos/build_ohos64.py b/ohos/build_ohos64.py index a103065eeb0..b7c8340b719 100755 --- a/ohos/build_ohos64.py +++ b/ohos/build_ohos64.py @@ -24,11 +24,11 @@ import sys import ntpath import os if __name__ == '__main__': - if len(sys.argv) < 4: - print("must input the OpenHarmony directory and the product name and the source dir") + if len(sys.argv) < 5: + print("must input the OpenHarmony directory and the product name and the source dir and the asan option") exit(-1) script_dir = os.path.split(os.path.abspath( __file__))[0] - run_cross_pross_cmd = 'python3 ' + script_dir + '/meson_cross_process64.py ' + sys.argv[1] + ' ' + sys.argv[2] + run_cross_pross_cmd = 'python3 ' + script_dir + '/meson_cross_process64.py ' + sys.argv[1] + ' ' + sys.argv[2] + ' ' + sys.argv[4] os.system(run_cross_pross_cmd) run_build_cmd = 'PKG_CONFIG_PATH=./thirdparty/mesa3d/pkgconfig ' diff --git a/ohos/meson_cross_process64.py b/ohos/meson_cross_process64.py index 6c8d0c85fab..f42c4cf5423 100755 --- a/ohos/meson_cross_process64.py +++ b/ohos/meson_cross_process64.py @@ -36,13 +36,17 @@ c_args = [ '--target=aarch64-linux-ohosmusl', '--sysroot=sysroot_stub', '-fno-emulated-tls', - '-fPIC'] + '-fPIC', + asan_compile_args_stub + ] cpp_args = [ '--target=aarch64-linux-ohosmusl', '--sysroot=sysroot_stub', '-fno-emulated-tls', - '-fPIC'] + '-fPIC', + asan_compile_args_stub + ] c_link_args = [ '--target=aarch64-linux-ohosmusl', @@ -52,6 +56,7 @@ c_link_args = [ '-Lproject_stub/prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/current/lib/aarch64-linux-ohos', '-Lproject_stub/prebuilts/clang/ohos/linux-x86_64/llvm/lib/aarch64-linux-ohos/c++', '--rtlib=compiler-rt', + asan_link_args_stub ] cpp_link_args = [ @@ -66,6 +71,7 @@ cpp_link_args = [ '-Wl,--exclude-libs=libvpx_assembly_arm.a', '-Wl,--warn-shared-textrel', '--rtlib=compiler-rt', + asan_link_args_stub ] [binaries] @@ -84,10 +90,47 @@ cpu = 'armv8' endian = 'little' ''' -def generate_cross_file(project_stub_in, sysroot_stub_in): +hwasan_compile_args = ''' + '-shared-libasan', + '-fsanitize=hwaddress', + '-mllvm', + '-hwasan-globals=0', + '-fno-lto', + '-fno-whole-program-vtables', +''' +hwasan_link_args = ''' + '-shared-libasan', + '-fsanitize=hwaddress', +''' + +swasan_compile_args = ''' + '-fsanitize=address', + '-fno-inline-functions', + '-fno-inline', + '-fsanitize-address-use-after-scope', + '-fno-omit-frame-pointer', +''' +swasan_link_args = ''' + '-lclang_rt.asan', +''' + +noasan_compile_args = ''' +''' +noasan_link_args = ''' +''' +def generate_cross_file(project_stub_in, sysroot_stub_in, asan_option): with open("thirdparty/mesa3d/cross_file", 'w+') as file: result = corss_file_content.replace("project_stub", project_stub_in) result = result.replace("sysroot_stub", sysroot_stub_in) + if asan_option == "hwasan": + result = result.replace("asan_compile_args_stub", hwasan_compile_args) + result = result.replace("asan_link_args_stub", hwasan_link_args) + elif asan_option == "swasan": + result = result.replace("asan_compile_args_stub", swasan_compile_args) + result = result.replace("asan_link_args_stub", swasan_link_args) + else: + result = result.replace("asan_compile_args_stub", noasan_compile_args) + result = result.replace("asan_link_args_stub", noasan_link_args) file.write(result) print("generate_cross_file") @@ -113,17 +156,17 @@ def process_pkgconfig(project_dir, product_name): generate_pc_file(template_dir + '/' + template, project_dir, product_name) print("process_pkgconfig") -def prepare_environment(project_path, product): +def prepare_environment(project_path, product, asan_option): global project_stub global sysroot_stub product = product.lower() project_stub = project_path sysroot_stub = os.path.join(project_stub, "out", product, "obj", "third_party", "musl") - generate_cross_file(project_path, sysroot_stub) + generate_cross_file(project_path, sysroot_stub, asan_option) process_pkgconfig(project_path, product) if __name__ == '__main__': - if len(sys.argv) < 3: - print("must input the OpenHarmony directory and the product name") + if len(sys.argv) < 4: + print("must input the OpenHarmony directory and the product name and the asan option") exit(-1) - prepare_environment(sys.argv[1], sys.argv[2]) + prepare_environment(sys.argv[1], sys.argv[2], sys.argv[3]) -- Gitee From 48ebdd479014b1776bdc3807dab2d5b770014ac5 Mon Sep 17 00:00:00 2001 From: liuwenfeng Date: Fri, 30 May 2025 09:00:11 +0000 Subject: [PATCH 2/8] support dt coverage Signed-off-by: liuwenfeng --- BUILD.gn | 11 +++++++- ohos/build_ohos64.py | 6 ++--- ohos/meson_cross_process64.py | 47 ++++++++++++++++++++++------------- 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 0c45e230ef9..4aec01ea46f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -28,19 +28,28 @@ action("mesa3d_action_build") { ohos_root_path = rebase_path("//") product_name = rebase_path("${root_build_dir}", "//out") mesa3d_source_path = rebase_path("//third_party/mesa3d", root_build_dir) - asan_option = "noasan" + if (is_asan) { if (use_hwasan) { asan_option = "hwasan" } else { asan_option = "swasan" } + } else { + asan_option = "noasan" + } + + if (use_clang_coverage) { + coverage_option = "use_clang_coverage" + } else { + coverage_option = "no_coverage" } args = [ "$ohos_root_path", "$product_name", "$mesa3d_source_path", "$asan_option", + "$coverage_option" ] external_deps = [ "hilog:libhilog", diff --git a/ohos/build_ohos64.py b/ohos/build_ohos64.py index b7c8340b719..97694938644 100755 --- a/ohos/build_ohos64.py +++ b/ohos/build_ohos64.py @@ -24,11 +24,11 @@ import sys import ntpath import os if __name__ == '__main__': - if len(sys.argv) < 5: - print("must input the OpenHarmony directory and the product name and the source dir and the asan option") + if len(sys.argv) < 6: + print("must input the OpenHarmony directory, the product name, the source dir, the asan option and the coverage option") exit(-1) script_dir = os.path.split(os.path.abspath( __file__))[0] - run_cross_pross_cmd = 'python3 ' + script_dir + '/meson_cross_process64.py ' + sys.argv[1] + ' ' + sys.argv[2] + ' ' + sys.argv[4] + run_cross_pross_cmd = 'python3 ' + script_dir + '/meson_cross_process64.py ' + sys.argv[1] + ' ' + sys.argv[2] + ' ' + sys.argv[4] + ' ' + sys.argv[5] os.system(run_cross_pross_cmd) run_build_cmd = 'PKG_CONFIG_PATH=./thirdparty/mesa3d/pkgconfig ' diff --git a/ohos/meson_cross_process64.py b/ohos/meson_cross_process64.py index f42c4cf5423..c9c79444a62 100755 --- a/ohos/meson_cross_process64.py +++ b/ohos/meson_cross_process64.py @@ -37,7 +37,7 @@ c_args = [ '--sysroot=sysroot_stub', '-fno-emulated-tls', '-fPIC', - asan_compile_args_stub + compile_args_stub ] cpp_args = [ @@ -45,7 +45,7 @@ cpp_args = [ '--sysroot=sysroot_stub', '-fno-emulated-tls', '-fPIC', - asan_compile_args_stub + compile_args_stub ] c_link_args = [ @@ -56,7 +56,7 @@ c_link_args = [ '-Lproject_stub/prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/current/lib/aarch64-linux-ohos', '-Lproject_stub/prebuilts/clang/ohos/linux-x86_64/llvm/lib/aarch64-linux-ohos/c++', '--rtlib=compiler-rt', - asan_link_args_stub + link_args_stub ] cpp_link_args = [ @@ -71,7 +71,7 @@ cpp_link_args = [ '-Wl,--exclude-libs=libvpx_assembly_arm.a', '-Wl,--warn-shared-textrel', '--rtlib=compiler-rt', - asan_link_args_stub + link_args_stub ] [binaries] @@ -113,24 +113,37 @@ swasan_compile_args = ''' swasan_link_args = ''' '-lclang_rt.asan', ''' - noasan_compile_args = ''' ''' noasan_link_args = ''' ''' -def generate_cross_file(project_stub_in, sysroot_stub_in, asan_option): + +coverage_compile_args = ''' + '--coverage', +''' +coverage_link_args = ''' + '--coverage', +''' +def generate_cross_file(project_stub_in, sysroot_stub_in, asan_option, coverage_option): with open("thirdparty/mesa3d/cross_file", 'w+') as file: result = corss_file_content.replace("project_stub", project_stub_in) result = result.replace("sysroot_stub", sysroot_stub_in) + compile_args = "" + link_args = "" if asan_option == "hwasan": - result = result.replace("asan_compile_args_stub", hwasan_compile_args) - result = result.replace("asan_link_args_stub", hwasan_link_args) + compile_args = hwasan_compile_args + link_args = hwasan_link_args elif asan_option == "swasan": - result = result.replace("asan_compile_args_stub", swasan_compile_args) - result = result.replace("asan_link_args_stub", swasan_link_args) + compile_args = swasan_compile_args + link_args = swasan_link_args else: - result = result.replace("asan_compile_args_stub", noasan_compile_args) - result = result.replace("asan_link_args_stub", noasan_link_args) + compile_args = noasan_compile_args + link_args = noasan_link_args + if coverage_option == "use_clang_coverage": + compile_args = compile_args + coverage_compile_args + link_args = link_args + coverage_link_args + result = result.replace("compile_args_stub", compile_args) + result = result.replace("link_args_stub", link_args) file.write(result) print("generate_cross_file") @@ -156,17 +169,17 @@ def process_pkgconfig(project_dir, product_name): generate_pc_file(template_dir + '/' + template, project_dir, product_name) print("process_pkgconfig") -def prepare_environment(project_path, product, asan_option): +def prepare_environment(project_path, product, asan_option, coverage_option): global project_stub global sysroot_stub product = product.lower() project_stub = project_path sysroot_stub = os.path.join(project_stub, "out", product, "obj", "third_party", "musl") - generate_cross_file(project_path, sysroot_stub, asan_option) + generate_cross_file(project_path, sysroot_stub, asan_option, coverage_option) process_pkgconfig(project_path, product) if __name__ == '__main__': - if len(sys.argv) < 4: - print("must input the OpenHarmony directory and the product name and the asan option") + if len(sys.argv) < 5: + print("must input the OpenHarmony directory, the product name, the asan option and the coverage option") exit(-1) - prepare_environment(sys.argv[1], sys.argv[2], sys.argv[3]) + prepare_environment(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) -- Gitee From c8e6739f8ed3667b9c4b0cc41d6377d5445d2377 Mon Sep 17 00:00:00 2001 From: liuwenfeng Date: Tue, 3 Jun 2025 18:44:15 +0800 Subject: [PATCH 3/8] stripped symbols Signed-off-by: liuwenfeng --- BUILD.gn | 23 +++++++++++++++++++++-- ohos/meson_cross_process64.py | 8 ++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 0c45e230ef9..2611b0c2eca 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -50,13 +50,27 @@ action("mesa3d_action_build") { ] } +ohos_copy("mesa3d_unstripped_copy") { + sources = [ + "${root_build_dir}/thirdparty/mesa3d/lib/libEGL_mesa.so", + "${root_build_dir}/thirdparty/mesa3d/lib/libgallium-25.0.1.so", + ] + outputs = [ root_out_dir + "/lib.unstripped/thirdparty/mesa3d/{{source_file_part}}" ] + deps = [ ":mesa3d_action_build" ] +} + ohos_prebuilt_shared_library("mesa3d_libEGL") { source = "${root_build_dir}/thirdparty/mesa3d/lib/libEGL_mesa.so" subsystem_name = "$SUBSYSTEM_NAME" part_name = "$PART_NAME" module_install_dir = "lib64" install_enable = true - deps = [ ":mesa3d_action_build" ] + enable_strip = true + mini_debug = true + deps = [ + ":mesa3d_action_build", + ":mesa3d_unstripped_copy" + ] } ohos_prebuilt_shared_library("mesa3d_libgallium") { @@ -65,7 +79,12 @@ ohos_prebuilt_shared_library("mesa3d_libgallium") { part_name = "$PART_NAME" module_install_dir = "lib64" install_enable = true - deps = [ ":mesa3d_action_build" ] + enable_strip = true + mini_debug = true + deps = [ + ":mesa3d_action_build", + ":mesa3d_unstripped_copy" + ] } group("zink_opengl") { diff --git a/ohos/meson_cross_process64.py b/ohos/meson_cross_process64.py index f42c4cf5423..55c38f6fa6b 100755 --- a/ohos/meson_cross_process64.py +++ b/ohos/meson_cross_process64.py @@ -37,6 +37,10 @@ c_args = [ '--sysroot=sysroot_stub', '-fno-emulated-tls', '-fPIC', + '-g', + '-O2', + '-D_FORTIFY_SOURCE=2', + '-fstack-protector-all', asan_compile_args_stub ] @@ -45,6 +49,10 @@ cpp_args = [ '--sysroot=sysroot_stub', '-fno-emulated-tls', '-fPIC', + '-g', + '-O2', + '-D_FORTIFY_SOURCE=2', + '-fstack-protector-all', asan_compile_args_stub ] -- Gitee From 0888477c3fe8b58d6eb144c4e5db4aee1f8e4d54 Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Thu, 5 Jun 2025 11:32:25 +0800 Subject: [PATCH 4/8] fix heap-use-after-free (batch_state) Signed-off-by: zhangqiang --- src/gallium/drivers/zink/zink_batch.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 21cae967758..5354bc0f032 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -447,18 +447,7 @@ get_batch_state(struct zink_context *ctx) if (bs == ctx->last_free_batch_state) ctx->last_free_batch_state = NULL; } - /* try from the ones that are given back to the screen next */ - if (!bs) { - simple_mtx_lock(&screen->free_batch_states_lock); - if (screen->free_batch_states) { - bs = screen->free_batch_states; - bs->ctx = ctx; - screen->free_batch_states = bs->next; - if (bs == screen->last_free_batch_state) - screen->last_free_batch_state = NULL; - } - simple_mtx_unlock(&screen->free_batch_states_lock); - } + /* states are stored sequentially, so if the first one doesn't work, none of them will */ if (!bs && ctx->batch_states && ctx->batch_states->next) { /* only a submitted state can be reused */ -- Gitee From 0e129f973f8243b164cb5fe25d2df06dd507acbd Mon Sep 17 00:00:00 2001 From: zhangqiang Date: Fri, 6 Jun 2025 16:45:52 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9A=E5=9C=B0=E5=BD=A2terrain=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E5=9B=A0=E4=B8=BAzink=E6=8A=8A=E8=BD=AE?= =?UTF-8?q?=E8=BD=ACbuffer=E4=B8=AA=E6=95=B0=E6=94=B9=E4=B8=BA3=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E6=BB=A1=E8=B6=B3xcomponent=E4=B8=8Erender=5Fservice?= =?UTF-8?q?=E4=B9=8B=E9=97=B4=E7=9A=845=E4=B8=AA=E7=9A=84=E6=9C=BA?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangqiang --- src/gallium/drivers/zink/zink_kopper.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_kopper.c b/src/gallium/drivers/zink/zink_kopper.c index fd715b163f1..5fa43f4c1ec 100644 --- a/src/gallium/drivers/zink/zink_kopper.c +++ b/src/gallium/drivers/zink/zink_kopper.c @@ -30,6 +30,8 @@ #include "zink_resource.h" #include "zink_kopper.h" +#define SWAP_BUFFER_COUNT 5 + static void zink_kopper_set_present_mode_for_interval(struct kopper_displaytarget *cdt, int interval) { @@ -304,7 +306,11 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget * cswap->scci.clipped = VK_TRUE; } cswap->scci.presentMode = cdt->present_mode; - cswap->scci.minImageCount = cdt->caps.minImageCount; + if (SWAP_BUFFER_COUNT >= cdt->caps.minImageCount && SWAP_BUFFER_COUNT <= cdt->caps.maxImageCount) { + cswap->scci.minImageCount = SWAP_BUFFER_COUNT; + } else { + cswap->scci.minImageCount = cdt->caps.minImageCount; + } cswap->scci.preTransform = cdt->caps.currentTransform; if (cdt->formats[1]) cswap->scci.pNext = &cdt->format_list; -- Gitee From 4c5044c4671cb7d489bff419c9dce0a3c71128a4 Mon Sep 17 00:00:00 2001 From: liuwenfeng Date: Mon, 9 Jun 2025 20:55:53 +0800 Subject: [PATCH 6/8] adapter skia version change Signed-off-by: liuwenfeng --- BUILD.gn | 14 ++++++++++++-- ohos/build_ohos64.py | 6 +++--- ohos/meson_cross_process64.py | 24 ++++++++++++++++-------- ohos/pkgconfig_template/expat.pc | 6 +++--- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 25efb6770fa..34c2481e8b5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -44,19 +44,29 @@ action("mesa3d_action_build") { } else { coverage_option = "no_coverage" } + if (use_new_skia) { + skia_version = "new_skia" + } else { + skia_version = "skia" + } args = [ "$ohos_root_path", "$product_name", "$mesa3d_source_path", "$asan_option", - "$coverage_option" + "$coverage_option", + "$skia_version" ] external_deps = [ "hilog:libhilog", "graphic_surface:surface", - "skia:expat", "zlib:libz", ] + if (use_new_skia) { + external_deps += [ "skia:expatm133", ] + } else { + external_deps += [ "skia:expat", ] + } } ohos_copy("mesa3d_unstripped_copy") { diff --git a/ohos/build_ohos64.py b/ohos/build_ohos64.py index 97694938644..decdfce8017 100755 --- a/ohos/build_ohos64.py +++ b/ohos/build_ohos64.py @@ -24,11 +24,11 @@ import sys import ntpath import os if __name__ == '__main__': - if len(sys.argv) < 6: - print("must input the OpenHarmony directory, the product name, the source dir, the asan option and the coverage option") + if len(sys.argv) < 7: + print("must input the OpenHarmony directory, the product name, the source dir, the asan option, the coverage option and the skia version") exit(-1) script_dir = os.path.split(os.path.abspath( __file__))[0] - run_cross_pross_cmd = 'python3 ' + script_dir + '/meson_cross_process64.py ' + sys.argv[1] + ' ' + sys.argv[2] + ' ' + sys.argv[4] + ' ' + sys.argv[5] + run_cross_pross_cmd = 'python3 ' + script_dir + '/meson_cross_process64.py ' + sys.argv[1] + ' ' + sys.argv[2] + ' ' + sys.argv[4] + ' ' + sys.argv[5] + ' ' + sys.argv[6] os.system(run_cross_pross_cmd) run_build_cmd = 'PKG_CONFIG_PATH=./thirdparty/mesa3d/pkgconfig ' diff --git a/ohos/meson_cross_process64.py b/ohos/meson_cross_process64.py index 3671eee4402..a9232bee0e3 100755 --- a/ohos/meson_cross_process64.py +++ b/ohos/meson_cross_process64.py @@ -155,39 +155,47 @@ def generate_cross_file(project_stub_in, sysroot_stub_in, asan_option, coverage_ file.write(result) print("generate_cross_file") -def generate_pc_file(file_raw, project_dir, product_name): +def generate_pc_file(file_raw, project_dir, product_name, skia_version): print(file_raw) if not os.path.exists('thirdparty/mesa3d/pkgconfig'): os.makedirs('thirdparty/mesa3d/pkgconfig') - filename = 'thirdparty/mesa3d/pkgconfig/'+ ntpath.basename(file_raw) + shortfilename = ntpath.basename(file_raw) + filename = 'thirdparty/mesa3d/pkgconfig/'+ shortfilename with open(file_raw, 'r+') as file_raw: with open(filename, "w+") as pc_file: raw_content = file_raw.read() raw_content = raw_content.replace("ohos_project_directory_stub", project_dir) raw_content = raw_content.replace("ohos-arm-release", product_name) raw_content = raw_content.replace("ohos-arm", "ohos-arm64") + if shortfilename == "expat.pc": + if skia_version == "new_skia": + raw_content = raw_content.replace("skia_folder_stub", "skia/m133") + raw_content = raw_content.replace("expat_lib_stub", "expatm133") + else: + raw_content = raw_content.replace("skia_folder_stub", "skia") + raw_content = raw_content.replace("expat_lib_stub", "expat") pc_file.write(raw_content) print("generate_pc_file") -def process_pkgconfig(project_dir, product_name): +def process_pkgconfig(project_dir, product_name, skia_version): template_dir = os.path.split(os.path.abspath( __file__))[0] + r"/pkgconfig_template" templates = os.listdir(template_dir) for template in templates: if not os.path.isdir(template): - generate_pc_file(template_dir + '/' + template, project_dir, product_name) + generate_pc_file(template_dir + '/' + template, project_dir, product_name, skia_version) print("process_pkgconfig") -def prepare_environment(project_path, product, asan_option, coverage_option): +def prepare_environment(project_path, product, asan_option, coverage_option, skia_version): global project_stub global sysroot_stub product = product.lower() project_stub = project_path sysroot_stub = os.path.join(project_stub, "out", product, "obj", "third_party", "musl") generate_cross_file(project_path, sysroot_stub, asan_option, coverage_option) - process_pkgconfig(project_path, product) + process_pkgconfig(project_path, product, skia_version) if __name__ == '__main__': - if len(sys.argv) < 5: + if len(sys.argv) < 6: print("must input the OpenHarmony directory, the product name, the asan option and the coverage option") exit(-1) - prepare_environment(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) + prepare_environment(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]) diff --git a/ohos/pkgconfig_template/expat.pc b/ohos/pkgconfig_template/expat.pc index 7e6331369d8..d24f466d5ca 100644 --- a/ohos/pkgconfig_template/expat.pc +++ b/ohos/pkgconfig_template/expat.pc @@ -1,10 +1,10 @@ ohos_project_dir=ohos_project_directory_stub -libdir=${ohos_project_dir}/out/ohos-arm-release/obj/third_party/skia/third_party/expat -includedir=${ohos_project_dir}/third_party/skia/third_party/externals/expat/expat/lib +libdir=${ohos_project_dir}/out/ohos-arm-release/obj/third_party/skia_folder_stub/third_party/expat +includedir=${ohos_project_dir}/third_party/skia_folder_stub/third_party/externals/expat/expat/lib Name: expat Version: 2.4.1 Description: expat XML parser -Libs: -L${libdir} -lexpat +Libs: -L${libdir} -lexpat_lib_stub Cflags: -I${includedir} expat -- Gitee From a2d799bc0a59c2c5918b80f4fbe4b840afedaf21 Mon Sep 17 00:00:00 2001 From: liuwenfeng Date: Wed, 11 Jun 2025 11:29:03 +0000 Subject: [PATCH 7/8] modify oat Signed-off-by: liuwenfeng --- OAT.xml | 6 ++++++ dependency_inputs.gni | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/OAT.xml b/OAT.xml index b0537e94582..1ae8aad29ce 100644 --- a/OAT.xml +++ b/OAT.xml @@ -74,8 +74,10 @@ Note:If the text contains special characters, please escape them according to th + + @@ -84,6 +86,10 @@ Note:If the text contains special characters, please escape them according to th + + + + diff --git a/dependency_inputs.gni b/dependency_inputs.gni index 280de6d689d..e6c8f63f396 100644 --- a/dependency_inputs.gni +++ b/dependency_inputs.gni @@ -37,7 +37,6 @@ declare_args() { "./include/drm-uapi/drm.h", "./include/drm-uapi/gpu_scheduler.h", "./include/drm-uapi/lima_drm.h", - "./include/drm-uapi/sync_file.h", "./include/drm-uapi/drm_mode.h", "./include/drm-uapi/d3dkmthk.h", "./include/drm-uapi/msm_drm.h", @@ -223,7 +222,6 @@ declare_args() { "./.gitlab-ci/bare-metal/serial_buffer.py", "./.gitlab-ci/bare-metal/eth008-power-relay.py", "./.gitlab-ci/bare-metal/poe_run.py", - "./.gitlab-ci/bare-metal/google-power-relay.py", "./.gitlab-ci/bare-metal/cros_servo_run.py", "./.gitlab-ci/bare-metal/mkbootimg.py", "./.gitlab-ci/report-flakes.py", @@ -497,7 +495,6 @@ declare_args() { "./src/util/perf/u_perfetto.h", "./src/util/perf/u_gpuvis.c", "./src/util/perf/u_trace.py", - "./src/util/perf/gpuvis_trace_utils.h", "./src/util/perf/u_perfetto_renderpass.h", "./src/util/perf/u_trace.c", "./src/util/perf/cpu_trace.h", @@ -1006,7 +1003,6 @@ declare_args() { "./src/amd/vpelib/src/core/color_gamma.c", "./src/amd/vpelib/src/core/vpe_visual_confirm.c", "./src/amd/vpelib/src/core/color_bg.c", - "./src/amd/vpelib/src/core/geometric_scaling.c", "./src/amd/vpelib/src/core/color_table.c", "./src/amd/vpelib/src/core/resource.c", "./src/amd/vpelib/src/core/background.c", @@ -1537,7 +1533,6 @@ declare_args() { "./src/etnaviv/drm-shim/etnaviv_noop.c", "./src/etnaviv/drm-shim/meson.build", "./src/etnaviv/hwdb/etna_hwdb.h", - "./src/etnaviv/hwdb/amlogic/gc_feature_database.h", "./src/etnaviv/hwdb/hwdb.h.py", "./src/etnaviv/hwdb/st/gc_feature_database.h", "./src/etnaviv/hwdb/etna_hwdb.c", -- Gitee From b8f41c0bdb02d9b441b362d42495a8fc5a18c0f4 Mon Sep 17 00:00:00 2001 From: liuwenfeng Date: Thu, 12 Jun 2025 06:12:20 +0000 Subject: [PATCH 8/8] modify README.OpenSource Signed-off-by: liuwenfeng --- README.OpenSource | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.OpenSource b/README.OpenSource index e2f957b42c9..92d4d6ae8a4 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -1,11 +1,11 @@ [ { - "Name": "mesa", + "Name": "Mesa3D - MesaLib", "License": "MIT license", "License File": "docs/license.rst", "Version Number": "25.0.1", "Owner": "liaosirui@huawei.com", - "Upstream URL": "https://archive.mesa3d.org/mesa-25.0.1.tar.xz", + "Upstream URL": "https://gitlab.freedesktop.org/mesa/mesa", "Description": "mesa is an open-source software implementation of OpenGL, Vulkan, and other graphics API specifications." } ] \ No newline at end of file -- Gitee