Skip to content

[libcxx] Workaround for build error after #108999 #110783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

vitalybuka
Copy link
Collaborator

@vitalybuka vitalybuka commented Oct 2, 2024

We see erros like following after #108999

FAILED: include/c++/v1/libcxx.imp ./libcxx_build_msan/include/c++/v1/libcxx.imp
cd ./libcxx_build_msan/libcxx/include && /usr/bin/python3 ./llvm-project/libcxx/utils/generate_iwyu_mapping.py -o ./libcxx_build_msan/include/c++/v1/libcxx.imp
Traceback (most recent call last):
  File "./llvm-project/libcxx/utils/generate_iwyu_mapping.py", line 94, in <module>
    main(sys.argv[1:])
  File "./llvm-project/libcxx/utils/generate_iwyu_mapping.py", line 84, in main
    raise RuntimeError(f"{header}: Header {public} is not a valid header")
RuntimeError: __cxx03/__algorithm/all_of.h: Header cxx03 is not a valid header
ninja: build stopped: subcommand failed.

Created using spr 1.3.4
@vitalybuka vitalybuka requested a review from a team as a code owner October 2, 2024 02:39
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Oct 2, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 2, 2024

@llvm/pr-subscribers-libcxx

Author: Vitaly Buka (vitalybuka)

Changes
FAILED: include/c++/v1/libcxx.imp ./libcxx_build_msan/include/c++/v1/libcxx.imp
cd ./libcxx_build_msan/libcxx/include &amp;&amp; /usr/bin/python3 ./llvm-project/libcxx/utils/generate_iwyu_mapping.py -o ./libcxx_build_msan/include/c++/v1/libcxx.imp
Traceback (most recent call last):
  File "./llvm-project/libcxx/utils/generate_iwyu_mapping.py", line 94, in &lt;module&gt;
    main(sys.argv[1:])
  File "./llvm-project/libcxx/utils/generate_iwyu_mapping.py", line 84, in main
    raise RuntimeError(f"{header}: Header {public} is not a valid header")
RuntimeError: __cxx03/__algorithm/all_of.h: Header cxx03 is not a valid header
ninja: build stopped: subcommand failed.


Full diff: https://github.com/llvm/llvm-project/pull/110783.diff

1 Files Affected:

  • (modified) libcxx/utils/generate_iwyu_mapping.py (+1)
diff --git a/libcxx/utils/generate_iwyu_mapping.py b/libcxx/utils/generate_iwyu_mapping.py
index 599201808bb79b..dadf6b58bd98a8 100644
--- a/libcxx/utils/generate_iwyu_mapping.py
+++ b/libcxx/utils/generate_iwyu_mapping.py
@@ -15,6 +15,7 @@ def IWYU_mapping(header: str) -> typing.Optional[typing.List[str]]:
         "__pstl/.+",
         "__support/.+",
         "__utility/private_constructor_tag.h",
+        "__cxx03/.+", # FIXME: Workaround for https://github.com/llvm/llvm-project/pull/108999
     ]
     if any(re.match(pattern, header) for pattern in ignore):
         return None

Copy link

github-actions bot commented Oct 2, 2024

✅ With the latest revision this PR passed the Python code formatter.

Created using spr 1.3.4
@ldionne
Copy link
Member

ldionne commented Oct 2, 2024

The patch has since then been reverted, but I guess this is something that @philnik777 should have a look into before it is re-landed.

@vitalybuka
Copy link
Collaborator Author

Thanks!

@vitalybuka vitalybuka closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants