mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 05:00:37 +00:00
!111 编译选项增加对coverage版本的适配
Merge pull request !111 from muyouquan123/master
This commit is contained in:
commit
5ea6180a04
7
BUILD.gn
7
BUILD.gn
@ -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" ]
|
||||
|
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user