mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-08 16:54:03 +02:00
configure: add --enable-lto option
This works with gcc. Other compilers might need to have a flag mapping added. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
54b243141e
commit
65d1290043
38
configure
vendored
38
configure
vendored
@ -238,6 +238,7 @@ Advanced options (experts only):
|
|||||||
disable buffer boundary checking in bitreaders
|
disable buffer boundary checking in bitreaders
|
||||||
(faster, but may crash)
|
(faster, but may crash)
|
||||||
--enable-memalign-hack emulate memalign, interferes with memory debuggers
|
--enable-memalign-hack emulate memalign, interferes with memory debuggers
|
||||||
|
--enable-lto use link-time optimization
|
||||||
|
|
||||||
Optimization options (experts only):
|
Optimization options (experts only):
|
||||||
--disable-asm disable all assembler optimizations
|
--disable-asm disable all assembler optimizations
|
||||||
@ -1290,6 +1291,7 @@ CMDLINE_SELECT="
|
|||||||
debug
|
debug
|
||||||
extra_warnings
|
extra_warnings
|
||||||
logging
|
logging
|
||||||
|
lto
|
||||||
optimizations
|
optimizations
|
||||||
"
|
"
|
||||||
|
|
||||||
@ -3445,17 +3447,31 @@ void ff_foo(void) {}
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$optflags" ]; then
|
if [ -z "$optflags" ]; then
|
||||||
add_cflags $optflags
|
if enabled small; then
|
||||||
elif enabled small; then
|
optflags=$cflags_size
|
||||||
add_cflags $cflags_size
|
elif enabled optimizations; then
|
||||||
elif enabled optimizations; then
|
optflags=$cflags_speed
|
||||||
add_cflags $cflags_speed
|
else
|
||||||
else
|
optflags=$cflags_noopt
|
||||||
add_cflags $cflags_noopt
|
fi
|
||||||
fi
|
fi
|
||||||
check_cflags -fno-math-errno
|
|
||||||
check_cflags -fno-signed-zeros
|
check_optflags(){
|
||||||
|
check_cflags "$@"
|
||||||
|
enabled lto && check_ldflags "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if enabled lto; then
|
||||||
|
test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker"
|
||||||
|
check_cflags -flto
|
||||||
|
check_ldflags -flto $cpuflags
|
||||||
|
fi
|
||||||
|
|
||||||
|
check_optflags $optflags
|
||||||
|
check_optflags -fno-math-errno
|
||||||
|
check_optflags -fno-signed-zeros
|
||||||
|
|
||||||
if enabled icc; then
|
if enabled icc; then
|
||||||
# Just warnings, no remarks
|
# Just warnings, no remarks
|
||||||
@ -3490,7 +3506,7 @@ elif enabled ccc; then
|
|||||||
add_cflags -msg_disable ptrmismatch1
|
add_cflags -msg_disable ptrmismatch1
|
||||||
add_cflags -msg_disable unreachcode
|
add_cflags -msg_disable unreachcode
|
||||||
elif enabled gcc; then
|
elif enabled gcc; then
|
||||||
check_cflags -fno-tree-vectorize
|
check_optflags -fno-tree-vectorize
|
||||||
check_cflags -Werror=implicit-function-declaration
|
check_cflags -Werror=implicit-function-declaration
|
||||||
check_cflags -Werror=missing-prototypes
|
check_cflags -Werror=missing-prototypes
|
||||||
check_cflags -Werror=declaration-after-statement
|
check_cflags -Werror=declaration-after-statement
|
||||||
|
Loading…
x
Reference in New Issue
Block a user