mirror of https://github.com/python/cpython
gh-100340: Allows -Wno-int-conversion for wasm (#100341)
Fixes #100340 allows -Wno-int-conversion for wasm
This commit is contained in:
parent
1f0d0a432c
commit
75c8133efe
|
@ -0,0 +1,2 @@
|
|||
Allows -Wno-int-conversion for wasm-sdk 17 and onwards, thus enables
|
||||
building WASI builds once against the latest sdk.
|
|
@ -37,3 +37,6 @@ ac_cv_header_netpacket_packet_h=no
|
|||
# disable accept for WASM runtimes without sock_accept
|
||||
#ac_cv_func_accept=no
|
||||
#ac_cv_func_accept4=no
|
||||
|
||||
# Disable int-conversion for wask-sdk as it triggers an error from version 17.
|
||||
ac_cv_disable_int_conversion=yes
|
||||
|
|
|
@ -8743,6 +8743,44 @@ fi
|
|||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can disable $CC int-conversion warning" >&5
|
||||
$as_echo_n "checking if we can disable $CC int-conversion warning... " >&6; }
|
||||
if ${ac_cv_disable_int_conversion_warning+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
py_cflags=$CFLAGS
|
||||
as_fn_append CFLAGS "-Wint-conversion -Werror"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
ac_cv_disable_int_conversion_warning=yes
|
||||
else
|
||||
ac_cv_disable_int_conversion_warning=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS=$py_cflags
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_int_conversion_warning" >&5
|
||||
$as_echo "$ac_cv_disable_int_conversion_warning" >&6; }
|
||||
|
||||
|
||||
if test "x$ac_cv_disable_int_conversion" = xyes; then :
|
||||
CFLAGS_NODIST="$CFLAGS_NODIST -Wno-int-conversion"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can disable $CC missing-field-initializers warning" >&5
|
||||
$as_echo_n "checking if we can disable $CC missing-field-initializers warning... " >&6; }
|
||||
if ${ac_cv_disable_missing_field_initializers_warning+:} false; then :
|
||||
|
|
|
@ -2288,6 +2288,10 @@ yes)
|
|||
AS_VAR_IF([ac_cv_disable_unused_parameter_warning], [yes],
|
||||
[CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"])
|
||||
|
||||
PY_CHECK_CC_WARNING([disable], [int-conversion])
|
||||
AS_VAR_IF([ac_cv_disable_int_conversion], [yes],
|
||||
[CFLAGS_NODIST="$CFLAGS_NODIST -Wno-int-conversion"])
|
||||
|
||||
PY_CHECK_CC_WARNING([disable], [missing-field-initializers])
|
||||
AS_VAR_IF([ac_cv_disable_missing_field_initializers_warning], [yes],
|
||||
[CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"])
|
||||
|
|
Loading…
Reference in New Issue