This is an archive of the discontinued LLVM Phabricator instance.

gitignore: Ignore in-tree Swift builds
AbandonedPublic

Authored by modocache on Mar 24 2019, 6:33 PM.

Details

Summary

LLVM external tools such as Clang, lld, and Polly, can be built as part
of a unified CMake build. This is done by placing checkouts of these
projects in the llvm/tools directory (at least, this is how it was
done before the LLVM project began migrating to a monorepo model. I
don't know if or how this changed in a monorepo configuration).
To keep these projects from showing up as unstaged changes in a user's
Git checkout of LLVM, these projects are included in the .gitignore
file: tools/clang, tools/lld, etc.

Apple's Swift project is also capable of being built as part of a
unified CMake build (admittedly this is not the typically recommended
way of building the project, but the Swift project does include
extensive CMake code to make this type of build possible). When this
is done, it's placed in tools/swift. It also relies on another
dependency, which is placed in tools/cmark. Include these two
projects in the .gitignore, to make it easier for users to perform
unified builds.

Diff Detail

Event Timeline

modocache created this revision.Mar 24 2019, 6:33 PM
Herald added a project: Restricted Project. · View Herald Transcript

This definitely makes sense for Swift's downstream fork of LLVM, but I'm not sure it makes sense upstream. I'm not sure how much special treatment we want to give Swift-the-project in the LLVM repo.

modocache abandoned this revision.Mar 25 2019, 10:12 AM

Right, that makes sense @jordan_rose. I'll submit this to swift-llvm, then.

I'd recommend keeping the projects out-of-tree and using LLVM_ENABLE_PROJECTS instead.