!111 编译选项增加对coverage版本的适配

Merge pull request !111 from muyouquan123/master
This commit is contained in:
openharmony_ci 2023-08-07 06:20:28 +00:00 committed by Gitee
commit 5ea6180a04
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 24 additions and 0 deletions

View File

@ -1617,12 +1617,19 @@ action("gen_config_header") {
if (ffmpeg_selected_platform == "aarch64") {
deps = [ "//third_party/musl:musl_libs" ]
}
ucc = "false"
if (use_clang_coverage) {
ucc = "true"
}
args = [
rebase_path("//third_party/ffmpeg", root_build_dir),
rebase_path("${target_gen_dir}/include/", root_build_dir),
ffmpeg_selected_platform,
rebase_path(default_clang_base_path, root_build_dir),
rebase_path(sysroot, root_build_dir),
ucc,
]
outputs = [ "${target_gen_dir}/include/config.h" ]

View File

@ -8,6 +8,7 @@ FFMPEG_OUT_PATH=$2
FFMPEG_PLAT=$3
LLVM_PATH=$4
SYSROOT_PATH=$5
USE_CLANG_COVERAGE=$6
if [ ${FFMPEG_PLAT} = "aarch64" ]; then
@ -76,6 +77,22 @@ EXTRA_LDFLAGS="
--sysroot=${SYSROOT_PATH}
"
if [ ${USE_CLANG_COVERAGE} = "true" ]; then
EXTRA_CFLAGS="
--target=aarch64-linux-ohos
--sysroot=${SYSROOT_PATH}
--coverage
-mllvm
-limited-coverage-experimental=true
"
EXTRA_LDFLAGS="
--target=aarch64-linux-ohos
--sysroot=${SYSROOT_PATH}
--coverage
-fno-use-cxa-atexit
"
fi
FF_CONFIG_OPTIONS=`echo $FF_CONFIG_OPTIONS`
${FFMPEG_PATH}/configure ${FF_CONFIG_OPTIONS} --extra-cflags="${EXTRA_CFLAGS}" --extra-ldflags="${EXTRA_LDFLAGS}"