diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-03-14 16:05:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-14 16:05:54 (GMT) |
commit | 1ff81c0cb67215694f084e51c4d35ae53b9f5cf9 (patch) | |
tree | e8067aff7f52f7b17284caa3452b17a98a9ae1bc /Makefile.pre.in | |
parent | a703f743dbf2675948e59c44fa9d7112f7825100 (diff) | |
download | cpython-1ff81c0cb67215694f084e51c4d35ae53b9f5cf9.zip cpython-1ff81c0cb67215694f084e51c4d35ae53b9f5cf9.tar.gz cpython-1ff81c0cb67215694f084e51c4d35ae53b9f5cf9.tar.bz2 |
gh-81057: Add a CI Check for New Unsupported C Global Variables (gh-102506)
This will keep us from adding new unsupported (i.e. non-const) C global variables, which would break interpreter isolation.
FYI, historically it is very uncommon for new global variables to get added. Furthermore, it is rare for new code to break the c-analyzer. So the check should almost always pass unnoticed.
Note that I've removed test_check_c_globals. A test wasn't a great fit conceptually and was super slow on debug builds. A CI check is a better fit.
This also resolves gh-100237.
https://github.com/python/cpython/issues/81057
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 1a1853b..5976216 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2560,6 +2560,12 @@ distclean: clobber docclean smelly: all $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/smelly.py +# Check if any unsupported C global variables have been added. +check-c-globals: + $(PYTHON_FOR_REGEN) $(srcdir)/Tools/c-analyzer/check-c-globals.py \ + --format summary \ + --traceback + # Find files with funny names funny: find $(SUBDIRS) $(SUBDIRSTOO) \ |