mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
configure: drop the redundant ObjC flags from check_allcflags
ObjC is compiled with the C flags. OBJCCFLAGS in ffbuild/common.mak includes CFLAGS and test_objcc() passes it as well. OBJCFLAGS is meant for what ObjC needs beyond C. No need to duplicate all flags there. They were needed for the short while0ce413af9chad $CFLAGS taken out of test_objcc().189d0b83b2put it back and left the duplication. Note that the issue is not only cosmetic duplication, for example MSVC cannot compile ObjC, so the check_allcflags never suceeded there. While the ObjC were checked last, flags were added for C/CXX, but the return value was always false. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
1 parent
639ee84952
commit
b4bd8d1f64
1 file changed
+3
-8
@@ -990,10 +990,10 @@ add_objcflags(){
|
||||
append OBJCFLAGS $($objcflags_filter "$@")
|
||||
}
|
||||
|
||||
# This also covers ObjC, it inherits CFLAGS.
|
||||
add_allcflags(){
|
||||
add_cflags "$@"
|
||||
add_cxxflags "$@"
|
||||
add_objcflags "$@"
|
||||
}
|
||||
|
||||
add_asflags(){
|
||||
@@ -1390,11 +1390,7 @@ check_objcflags(){
|
||||
}
|
||||
|
||||
check_allcflags(){
|
||||
allcret=0
|
||||
check_cflags "$@" || allcret=$?
|
||||
check_cxxflags "$@" || allcret=$?
|
||||
check_objcflags "$@" || allcret=$?
|
||||
return $allcret
|
||||
check_cflags "$@" && check_cxxflags "$@"
|
||||
}
|
||||
|
||||
test_ldflags(){
|
||||
@@ -7784,7 +7780,7 @@ fi
|
||||
|
||||
enabled debug && add_allcflags -g"$debuglevel" && add_asflags -g"$debuglevel"
|
||||
|
||||
for lang in c cxx objc; do
|
||||
for lang in c cxx; do
|
||||
test_${lang}flags -Werror=unused-command-line-argument &&
|
||||
append unknown_warning_${lang}flags "-Werror=unused-command-line-argument"
|
||||
test_${lang}flags -Werror=unknown-warning-option &&
|
||||
@@ -7796,7 +7792,6 @@ check_warning(){
|
||||
flag_to_add=${2:-$1}
|
||||
test_cflags $unknown_warning_cflags $warning_flag && add_cflags $flag_to_add
|
||||
test_cxxflags -Werror $unknown_warning_cxxflags $warning_flag && add_cxxflags $flag_to_add
|
||||
test_objcflags $unknown_warning_objcflags $warning_flag && add_objcflags $flag_to_add
|
||||
}
|
||||
|
||||
check_disable_warning(){
|
||||
|
||||
Reference in new issue
Block a user