mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-07-21 21:45:21 +00:00
fix libsnappy with PGO
This commit is contained in:
@@ -420,6 +420,25 @@ using_cmake3() {
|
|||||||
line_starts_with "${cmakeVersion}" 3
|
line_starts_with "${cmakeVersion}" 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_cmake_flag() {
|
||||||
|
local findFlag="$1"
|
||||||
|
shift
|
||||||
|
local flags=("$@")
|
||||||
|
local flagOption
|
||||||
|
for flag in "${flags[@]}"; do
|
||||||
|
if line_starts_with "${flag}" "-D${findFlag}="; then
|
||||||
|
IFS='=' read -r _ flagOption <<<"${flag}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z ${flagOption} ]]; then
|
||||||
|
echo_fail "could not find ${findFlag} from ${flags[*]}"
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
echo "${flagOption}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
have_req_meson_version() {
|
have_req_meson_version() {
|
||||||
local min=1.6.1
|
local min=1.6.1
|
||||||
have_required_version "$(meson --version)" "${min}"
|
have_required_version "$(meson --version)" "${min}"
|
||||||
|
|||||||
@@ -1067,7 +1067,15 @@ build_expat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_libsnappy() {
|
build_libsnappy() {
|
||||||
|
local modCxx
|
||||||
|
modCxx="$(get_cmake_flag CMAKE_CXX_FLAGS "${CMAKE_FLAGS[@]}")" || return 1
|
||||||
|
if [[ ${PGO} == 'ON' ]]; then
|
||||||
|
# libsnappy fails PGO for some reason
|
||||||
|
modCxx+=" -Wno-backend-plugin"
|
||||||
|
fi
|
||||||
|
|
||||||
meta_cmake_build \
|
meta_cmake_build \
|
||||||
|
-DCMAKE_CXX_FLAGS="${modCxx}" \
|
||||||
-DSNAPPY_BUILD_TESTS=OFF \
|
-DSNAPPY_BUILD_TESTS=OFF \
|
||||||
-DSNAPPY_BUILD_BENCHMARKS=OFF || return 1
|
-DSNAPPY_BUILD_BENCHMARKS=OFF || return 1
|
||||||
sanitize_sysroot_libs libsnappy || return 1
|
sanitize_sysroot_libs libsnappy || return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user