hmap files

What are hmap files and how do they relate to the swift compilation
process? It seems that they are a clang thing, but I can't find any
documentation on them.

They are "header map" files and you are right they are very poorly documented.

Xcode uses them to provide the compiler with a mapping of textual include names to actual file paths.

What are you specifically looking into?

- Daniel

ยทยทยท

On Apr 26, 2016, at 11:42 AM, Rafkind, Jon via swift-dev <swift-dev@swift.org> wrote:

What are hmap files and how do they relate to the swift compilation
process? It seems that they are a clang thing, but I can't find any
documentation on them.
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Well I'm wondering what to do with them since I am writing a program
that directly invokes the swift compiler code. Meaning, I create a
swift::Module*, call swift::parseIntoSourceFile,
swift::performTypeChecking, etc. So far it doesn't seem that I need to
pass along the hmap files to anything in the swift codebase, perhaps the
hmap files I see xcode adding to the swiftc lines so far are all
superfluous.

ยทยทยท

On 04/26/2016 11:46 AM, Daniel Dunbar wrote:

They are "header map" files and you are right they are very poorly documented.

Xcode uses them to provide the compiler with a mapping of textual include names to actual file paths.

What are you specifically looking into?

- Daniel

On Apr 26, 2016, at 11:42 AM, Rafkind, Jon via swift-dev <swift-dev@swift.org> wrote:

What are hmap files and how do they relate to the swift compilation
process? It seems that they are a clang thing, but I can't find any
documentation on them.
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Yes, you should avoid passing header map files.

They should only be used when trying to integrate with existing Xcode projects, when invoking swiftc yourself you should use the simpler header search path options (-I, -F).

- Daniel

ยทยทยท

On Apr 26, 2016, at 11:51 AM, Rafkind, Jon <jon.rafkind@hpe.com> wrote:

Well I'm wondering what to do with them since I am writing a program
that directly invokes the swift compiler code. Meaning, I create a
swift::Module*, call swift::parseIntoSourceFile,
swift::performTypeChecking, etc. So far it doesn't seem that I need to
pass along the hmap files to anything in the swift codebase, perhaps the
hmap files I see xcode adding to the swiftc lines so far are all
superfluous.

On 04/26/2016 11:46 AM, Daniel Dunbar wrote:

They are "header map" files and you are right they are very poorly documented.

Xcode uses them to provide the compiler with a mapping of textual include names to actual file paths.

What are you specifically looking into?

- Daniel

On Apr 26, 2016, at 11:42 AM, Rafkind, Jon via swift-dev <swift-dev@swift.org> wrote:

What are hmap files and how do they relate to the swift compilation
process? It seems that they are a clang thing, but I can't find any
documentation on them.
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

1 Like

Thanks for posting this. I saw them in a React Native project in Derived Data and so mistakenly assumed they were RN related files.

RN does not stand for Richard Nixon.

1 Like