Skip to content

Add :system-include-type option to use GCC C++ headers#22

Open
slburson wants to merge 1 commit into
borodust:masterfrom
slburson:use-gcc-headers-option
Open

Add :system-include-type option to use GCC C++ headers#22
slburson wants to merge 1 commit into
borodust:masterfrom
slburson:use-gcc-headers-option

Conversation

@slburson

Copy link
Copy Markdown

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 — ostream is the one I ran into first, but there turned out to be many more.) I got the effect I wanted by commenting out the first cond clause in claw.util:list-system-paths, but I thought there should be a defwrapper option 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 defwrapper named :system-include-type that can be set to :clang or :gcc. It defaults to :default, which produces the current behavior (try Clang first, then GCC if Clang is not available); if it's :clang and Clang is not available, an error is signalled.

@slburson slburson force-pushed the use-gcc-headers-option branch from 4647655 to 67ec6d1 Compare June 13, 2026 02:33
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.

1 participant