Skip to content

Commit 3ae2716

Browse files
committed
Check for -Wno-int-conversion option.
1 parent 9016bc5 commit 3ae2716

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Tools/configure/conf_compiler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ def setup_gcc_warnings(v):
361361
):
362362
v.CFLAGS_NODIST += " -Wno-unused-parameter"
363363

364+
# config.site for WASI sets ac_cv_disable_int_conversion=yes to suppress
365+
# -Wint-conversion errors (WASI clock types are pointers, not integers).
366+
if v.ac_cv_disable_int_conversion:
367+
v.CFLAGS_NODIST += " -Wno-int-conversion"
368+
364369
if pyconf.check_compile_flag(
365370
"-Wno-missing-field-initializers", extra_flags=["-Werror"]
366371
):

configure-new

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,6 +2896,9 @@ function u_setup_gcc_warnings( cc_ver, cc_with_fna, cc_with_fsa, fna_supporte
28962896
if (pyconf_check_compile_flag("-Wno-unused-parameter", _va8)) {
28972897
V["CFLAGS_NODIST"] = V["CFLAGS_NODIST"] " -Wno-unused-parameter"
28982898
}
2899+
if (((V["ac_cv_disable_int_conversion"] != "") && (V["ac_cv_disable_int_conversion"] != "no"))) {
2900+
V["CFLAGS_NODIST"] = V["CFLAGS_NODIST"] " -Wno-int-conversion"
2901+
}
28992902
delete _va9
29002903
_va9[1] = "-Werror"
29012904
_va9[0] = 1

0 commit comments

Comments
 (0)