bpo-31904: add library search path by wr-cc in add_cross_compiling_paths() by pxinwr · Pull Request #24191 · python/cpython (original) (raw)

LGTM, thanks for the updates.

I'm not fully comfortable with this PR which is maybe a little bit too specific to "clang --print-search-dirs" on Windows using MSYS. It's only used on VxWorks and only for cross-compilation. It's a little bit annoying to have to accumulate such code in setup.py to support different toolchains, but I don't see a better option for now.

distutils is not great for cross-compiling, and right now setup.py is implemented with distutils build_ext and Extension classes. I doubt that setuptools will have a better support for cross-compilation soon.

In the meanwhile, setup.py is the right place for such code.