[libcxx-commits] [libcxx] [libcxx][clang-modules] Fix headers being marked as textual (PR #130723)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 19 10:10:20 PDT 2025
https://github.com/ldionne requested changes to this pull request.
Thanks for the patch. I'm trying to understand the issue you're running into (I read the PR description a few times), and I'm struggling to understand how you run into this issue (especially why we don't run into it in our current modules build). Could you provide a reproducer for this issue? How do you come across it? You mention
> When building libcxx as a module
but it's not clear to me what that means. Additionally, the [modules CI job](https://github.com/llvm/llvm-project/actions/runs/13901208680/job/38984562823?pr=130723) is now failing with issues like:
```
/.../libcxx/test/libcxx/libcpp_version.gen.py/experimental/iterator.compile.pass.cpp:8:3: error: <experimental/iterator> does not seem to define _LIBCPP_VERSION
# | 8 | # error <experimental/iterator> does not seem to define _LIBCPP_VERSION
# | | ^
# | 1 error generated.
```
There are also some `XPASS`es in tests like `std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp`. After investigating and reproducing locally (by applying your patch), what's happening with these `XPASS`es is that the testing configuration incorrectly defines the `win32-broken-utf8-wchar-ctype` Lit feature, because `_LIBCPP_HAS_LOCALIZATION` is not detected in the compiler macros [here](https://github.com/llvm/llvm-project/blob/dd17c649abbfc7e4052e45d3240b23feb6530a31/libcxx/utils/libcxx/test/features.py#L226).
All in all, it seems like the net effect of making this change is that we don't export the `__config_site` macros out of libc++ anymore. Perhaps there's a simple fix, but I tried a couple of things locally with no success.
I don't have a problem with this patch as a matter of principle, but I'd like to understand what it fixes, add a test for that, and make sure that it doesn't break other stuff.
CC @ian-twilightcoder for general modules expertise
https://github.com/llvm/llvm-project/pull/130723
More information about the libcxx-commits
mailing list