This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add install targets for API headers
ClosedPublic

Authored by smeenai on Feb 15 2019, 5:41 PM.

Details

Summary

Add an install target for clang's API headers, which allows them to be
included in distributions. The install rules already existed, but they
lacked a component and a target, making them only accessible via a full
install. These headers are useful for writing clang-based tooling, for
example. They're the clang equivalent to the llvm-headers target and
complement the clang-libraries target.

Event Timeline

smeenai created this revision.Feb 15 2019, 5:41 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 15 2019, 5:41 PM

I'm not entirely happy with the name clang-dev-headers, and am open to suggestions. It's unfortunate clang-headers was already taken for something different, but renaming that target or increasing its scope seems bad for existing users. Other possibilities I thought of include clang-tooling-headers, though that might be confused with the headers for libTooling specifically, and clang-library-headers. I'm open to suggestions.

I'm not entirely happy with the name clang-dev-headers, and am open to suggestions. It's unfortunate clang-headers was already taken for something different, but renaming that target or increasing its scope seems bad for existing users. Other possibilities I thought of include clang-tooling-headers, though that might be confused with the headers for libTooling specifically, and clang-library-headers. I'm open to suggestions.

We could consider renaming clang-headers to e.g. clang-resource-headers and then reusing the name which would match llvm-headers. What do you think about that?

I'm not entirely happy with the name clang-dev-headers, and am open to suggestions. It's unfortunate clang-headers was already taken for something different, but renaming that target or increasing its scope seems bad for existing users. Other possibilities I thought of include clang-tooling-headers, though that might be confused with the headers for libTooling specifically, and clang-library-headers. I'm open to suggestions.

We could consider renaming clang-headers to e.g. clang-resource-headers and then reusing the name which would match llvm-headers. What do you think about that?

I like that, but I'm worried about breaking existing users of the clang-headers target (e.g. in their build scripts or distributions). I could post on cfe-dev and wait for dissent/consensus, I guess, but if there's an option which doesn't involve breaking backward compatibility, maybe that's preferable.

I'm not entirely happy with the name clang-dev-headers, and am open to suggestions. It's unfortunate clang-headers was already taken for something different, but renaming that target or increasing its scope seems bad for existing users. Other possibilities I thought of include clang-tooling-headers, though that might be confused with the headers for libTooling specifically, and clang-library-headers. I'm open to suggestions.

We could consider renaming clang-headers to e.g. clang-resource-headers and then reusing the name which would match llvm-headers. What do you think about that?

I like that, but I'm worried about breaking existing users of the clang-headers target (e.g. in their build scripts or distributions). I could post on cfe-dev and wait for dissent/consensus, I guess, but if there's an option which doesn't involve breaking backward compatibility, maybe that's preferable.

I'd give it a try, if there's a pushback then I'd prefer to go with clang-library-headers.

smeenai updated this revision to Diff 187697.Feb 20 2019, 5:19 PM

Switch to clang-library-headers pending cfe-dev discussion

smeenai updated this revision to Diff 187698.Feb 20 2019, 5:19 PM
smeenai retitled this revision from [clang] Add install targets for development headers to [clang] Add install targets for library headers.
smeenai edited the summary of this revision. (Show Details)

Update description

Harbormaster completed remote builds in B28353: Diff 187698.
smeenai updated this revision to Diff 189199.Mar 4 2019, 1:42 PM
smeenai retitled this revision from [clang] Add install targets for library headers to [clang] Add install targets for API headers.
smeenai edited the summary of this revision. (Show Details)

Update target name

@phosek This is using the clang-headers name now.

Ping (although I'm not planning to land this until Monday).

phosek accepted this revision.Mar 8 2019, 3:26 PM

LGTM

This revision is now accepted and ready to land.Mar 8 2019, 3:26 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2019, 11:53 AM