Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

add src/importc.h #3730

Merged
merged 1 commit into from Feb 10, 2022
Merged

add src/importc.h #3730

merged 1 commit into from Feb 10, 2022

Conversation

WalterBright
Copy link
Member

ImportC needs a .h file to precede all other .h files, to account for things like weird extensions. __builtins.d cannot handle it all, because it happens only after preprocessing has completed.

This will reduce the burden of ImportC having to support every nutburger C extension from the Dawn of Man in a much easier manner, usually by just adding a simple macro.

While this currently needs to be added manually, I expect it will become automatically added when dmd learns how to fork the preprocessor.

@WalterBright WalterBright added Easy Review ImportC Pertaining to ImportC support labels Feb 8, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + druntime#3730"

@WalterBright
Copy link
Member Author

Hmm, I thought adding it to mak/COPY did that.

make: *** No rule to make target 'import/importc.h', needed by 'copy'.  Stop.

Copy link
Contributor

@12345swordy 12345swordy left a comment

Choose a reason for hiding this comment

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

LGTM

@WalterBright
Copy link
Member Author

While I'm waiting on this, I added a fix for Issue 22721:

Fix Issue 22721 - importC: some gnu builtins are rejected

https://issues.dlang.org/show_bug.cgi?id=22721

@thewilsonator
Copy link
Contributor

If this fixes an issue, please update the commit message to reflect that so the bot picks it up.

@WalterBright
Copy link
Member Author

I found a better way to fix 22721.

@thewilsonator thewilsonator merged commit baa9443 into dlang:master Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Easy Review ImportC Pertaining to ImportC support
Projects
None yet
4 participants