From fbfb7c224d67d7c4e2df1834ff2309c0f73ca0ce Mon Sep 17 00:00:00 2001 From: Levon Gevorgyan Date: Sat, 23 Aug 2025 12:54:05 -0500 Subject: [PATCH] rename variables --- Jenkinsfile | 6 +++--- lib/build.sh | 18 +++++++++--------- lib/compile_opts.sh | 6 +++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 09890ca..eba75a4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,9 +53,9 @@ pipeline { } axis { name 'OPT_AND_LTO' - values 'OPT_LVL=0 LTO=false', - 'OPT_LVL=2 LTO=false', - 'OPT_LVL=3 LTO=true' + values 'OPT=0 LTO=false', + 'OPT=2 LTO=false', + 'OPT=3 LTO=true' } } stages { diff --git a/lib/build.sh b/lib/build.sh index 711b686..011877e 100644 --- a/lib/build.sh +++ b/lib/build.sh @@ -71,13 +71,13 @@ set_compile_opts() { CARGO_CINSTALL_FLAGS+=("--${CARGO_BUILD_TYPE}") # setting optimization level - if [[ ${OPT_LVL} == '' ]]; then - OPT_LVL='0' + if [[ ${OPT} == '' ]]; then + OPT='0' fi - C_FLAGS+=("-O${OPT_LVL}") - RUSTFLAGS+=("-C opt-level=${OPT_LVL}") - MESON_FLAGS+=("--optimization=${OPT_LVL}") - echo_info "building with optimization: ${OPT_LVL}" + C_FLAGS+=("-O${OPT}") + RUSTFLAGS+=("-C opt-level=${OPT}") + MESON_FLAGS+=("--optimization=${OPT}") + echo_info "building with optimization: ${OPT}" # static/shared linking unset PKG_CFG_FLAGS LIB_SUFF @@ -351,7 +351,7 @@ build() { # embed this project's enables/versions # into ffmpeg with this variable FFMPEG_BUILDER_INFO=("ffmpeg-builder=$(cd "${REPO_DIR}" && git rev-parse HEAD)") - for build in ${FFMPEG_ENABLES}; do + for build in ${ENABLE}; do do_build "${build}" || return 1 done do_build "ffmpeg" || return 1 @@ -484,7 +484,7 @@ build_libopus() { build_libdav1d() { local enableAsm='true' # arm64 will fail the build at 0 optimization - if [[ "${HOSTTYPE}:${OPT_LVL}" == "aarch64:0" ]]; then + if [[ "${HOSTTYPE}:${OPT}" == "aarch64:0" ]]; then enableAsm="false" fi meson \ @@ -608,7 +608,7 @@ add_project_versioning_to_ffmpeg() { return 0 } build_ffmpeg() { - for enable in ${FFMPEG_ENABLES}; do + for enable in ${ENABLE}; do test "${enable}" == 'libsvtav1_psy' && enable='libsvtav1' CONFIGURE_FLAGS+=("--enable-${enable}") done diff --git a/lib/compile_opts.sh b/lib/compile_opts.sh index 7161b34..c8fa6fc 100644 --- a/lib/compile_opts.sh +++ b/lib/compile_opts.sh @@ -10,7 +10,7 @@ DEFAULT_CLEAN=true # enable link time optimization DEFAULT_LTO=true # optimization level (0-3) -DEFAULT_OPT_LVL=3 +DEFAULT_OPT=3 # static or shared build DEFAULT_STATIC=true # CPU type (amd64/v{1,2,3}...) @@ -20,7 +20,7 @@ DEFAULT_ARCH=native # prefix to install to, default is local install DEFAULT_PREFIX='local' # configure what ffmpeg enables -DEFAULT_FFMPEG_ENABLES="\ +DEFAULT_ENABLE="\ libsvtav1_psy \ libopus \ libdav1d \ @@ -31,7 +31,7 @@ libvmaf \ # user-overridable compile option variable names FB_COMP_OPTS=( - CLEAN LTO OPT_LVL STATIC CPU ARCH PREFIX FFMPEG_ENABLES + CLEAN LTO OPT STATIC CPU ARCH PREFIX ENABLE ) # sets FB_COMP_OPTS to allow for user-overriding