Add :system-include-type option to use GCC C++ headers#22
Open
slburson wants to merge 1 commit into
Open
Conversation
4647655 to
67ec6d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LibTorch C++ distribution is built against the GCC C++ headers. So to wrap it, I needed Claw to use those headers instead of Clang's. (Lots of system types have different mangled names between the two sets of headers —
ostreamis the one I ran into first, but there turned out to be many more.) I got the effect I wanted by commenting out the firstcondclause inclaw.util:list-system-paths, but I thought there should be adefwrapperoption to do this. (If I already knew what the correct list of paths was, I could supply it as:system-includes, but it's hard to find out what it should be without reading the code that normally generates it.)So I've added an option to
defwrappernamed:system-include-typethat can be set to:clangor:gcc. It defaults to:default, which produces the current behavior (try Clang first, then GCC if Clang is not available); if it's:clangand Clang is not available, an error is signalled.