Skip to content

[cherry-pick stable/20230725] [Modules] Make clang modules for the C standard library headers #7619

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

Merged

Conversation

ian-twilightcoder
Copy link

Differential Revision: https://reviews.llvm.org/D159064
llvm#68163
llvm#68241
rdar://105819340

#7576
rdar://116522302

git apple-llvm automerger and others added 4 commits January 8, 2024 13:43
@ian-twilightcoder
Copy link
Author

@swift-ci test

@ian-twilightcoder ian-twilightcoder merged commit 1a1fb4b into swiftlang:stable/20230725 Jan 9, 2024
@ian-twilightcoder ian-twilightcoder deleted the cstdlib-modules branch January 9, 2024 06:02
@hyp
Copy link

hyp commented Jan 9, 2024

@ian-twilightcoder this broke windows toolchain build for Swift, can you please take a look:

https://github.com/thebrowsercompany/swift-build/actions/runs/7457288070/job/20290377000

C:/a/swift-build/swift-build/SourceCache/swift-corelibs-libdispatch/dispatch/dispatch.h:35:10: note: while building module 'ucrt' imported from C:/a/swift-build/swift-build/SourceCache/swift-corelibs-libdispatch/dispatch/dispatch.h:35:
#include <sys/types.h>
         ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt/fenv.h:13:10: note: while building module '_Builtin_float' imported from C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt/fenv.h:13:
#include <float.h>
         ^
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "float.h"
         ^
C:\a\swift-build\swift-build/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift\clang\include/float.h:32:17: error: cyclic dependency in module 'ucrt': ucrt -> _Builtin_float -> ucrt
#  include_next <float.h>
                ^

@ian-twilightcoder
Copy link
Author

ian-twilightcoder commented Jan 9, 2024

@ian-twilightcoder this broke windows toolchain build for Swift, can you please take a look:

https://github.com/thebrowsercompany/swift-build/actions/runs/7457288070/job/20290377000

C:/a/swift-build/swift-build/SourceCache/swift-corelibs-libdispatch/dispatch/dispatch.h:35:10: note: while building module 'ucrt' imported from C:/a/swift-build/swift-build/SourceCache/swift-corelibs-libdispatch/dispatch/dispatch.h:35:
#include <sys/types.h>
         ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt/fenv.h:13:10: note: while building module '_Builtin_float' imported from C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt/fenv.h:13:
#include <float.h>
         ^
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "float.h"
         ^
C:\a\swift-build\swift-build/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/lib/swift\clang\include/float.h:32:17: error: cyclic dependency in module 'ucrt': ucrt -> _Builtin_float -> ucrt
#  include_next <float.h>
                ^

Do you know if that run includes swiftlang/swift#69707 ? That one is supposed to fix that cycle. Where is that toolchain's command line set up? It's passing a vfs that requires -strict-implicit-module-context -Xcc -Xclang -Xcc -fbuiltin-headers-in-system-modules but it's not passing those flags. I thought I found all of those in that PR, but maybe I missed one?

@ian-twilightcoder
Copy link
Author

@hyp ⬆️

ian-twilightcoder added a commit to ian-twilightcoder/llvm-project that referenced this pull request Jan 10, 2024
…lib-modules"

This reverts commit 1a1fb4b, reversing
changes made to c58c369.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants