Don't test internal header files including mimalloc on macOS since
mimalloc emits compiler warnings:
In file included from extension.cpp:21:
In file included from Include/internal/pycore_backoff.h:15:
In file included from Include/internal/pycore_interp_structs.h:15:
In file included from Include/internal/pycore_tstate.h:14:
In file included from Include/internal/pycore_mimalloc.h:43:
Include/internal/mimalloc/mimalloc.h:464:85: error: defaulted
function definitions are a C++11 extension
[-Werror,-Wc++11-extensions]
mi_stl_allocator() mi_attr_noexcept = default;
^
Include/internal/mimalloc/mimalloc.h:465:85: error: defaulted
function definitions are a C++11 extension
[-Werror,-Wc++11-extensions]
mi_stl_allocator(const mi_stl_allocator&) mi_attr_noexcept = default;
Log also CXX and CXXFLAGS env vars in test_cppext. Log also CPPFLAGS
in test_cext.
print(f"Add PCbuild directory: {pcbuild}")
# Display information to help debugging
- for env_name in ('CC', 'CFLAGS'):
+ for env_name in ('CC', 'CFLAGS', 'CPPFLAGS'):
if env_name in os.environ:
print(f"{env_name} env var: {os.environ[env_name]!r}")
else:
#ifdef TEST_INTERNAL_C_API
// gh-135906: Check for compiler warnings in the internal C API
# include "internal/pycore_frame.h"
- // mimalloc emits compiler warnings when Python is built on Windows.
-# if !defined(MS_WINDOWS)
+ // mimalloc emits compiler warnings when Python is built on Windows
+ // and macOS.
+# if !defined(MS_WINDOWS) && !defined(__APPLE__)
# include "internal/pycore_backoff.h"
# include "internal/pycore_cell.h"
# endif
print(f"Add PCbuild directory: {pcbuild}")
# Display information to help debugging
- for env_name in ('CC', 'CFLAGS', 'CPPFLAGS'):
+ for env_name in ('CC', 'CXX', 'CFLAGS', 'CPPFLAGS', 'CXXFLAGS'):
if env_name in os.environ:
print(f"{env_name} env var: {os.environ[env_name]!r}")
else: