Skip to content

Conversation

3405691582
Copy link
Member

On the BSDs when building with bootstrapping and therefore modules enabled,
this will result in a "declaration here is not visible" error. This is
possibly because the assert implementation is not reexported from LLVM,
maybe due to libc differences. Regardless, this fixes the problem and
should be relatively inocuous to unconditionally include.

@3405691582
Copy link
Member Author

cc @egorzhdan

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -17,6 +17,8 @@
#ifndef SWIFT_BASIC_SOURCELOC_H
#define SWIFT_BASIC_SOURCELOC_H

#include <assert.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can you move this a few lines below to where #include <functional> is to make sure the #include<>s are sorted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved it down, is that the location you were after?

(I only put it up there because I thought the standard headers come first, I'm not sure if there's a header order standard for the project.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, thanks.
I don't think Swift has its own #include conventions, and the LLVM conventions say that the system includes go last.

@3405691582 3405691582 force-pushed the AssertHeaderBootstrapping branch from 3600eb3 to e6dc9ea Compare July 26, 2022 21:44
On the BSDs when building with bootstrapping and therefore modules enabled,
this will result in a "declaration here is not visible" error. This is
_possibly_ because the assert implementation is not reexported from LLVM,
maybe due to libc differences. Regardless, this fixes the problem and
should be relatively inocuous to unconditionally include.
@3405691582 3405691582 force-pushed the AssertHeaderBootstrapping branch from e6dc9ea to c5e9e20 Compare July 26, 2022 21:46
@egorzhdan
Copy link
Contributor

@swift-ci please smoke test

@egorzhdan egorzhdan merged commit 7f41010 into swiftlang:main Jul 27, 2022
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.

2 participants