Skip to content

build: assume a parallel tree layout for unified builds #20881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2018

Conversation

compnerd
Copy link
Member

Attempt to repair the build for the unified swift build. This allows us
to build a single unified toolchain with swift support. In this layout
assume that cmark and clang are peers of LLVM rather than located in
tools. Doing so allows a uniform layout of the tree and a simpler
build approach.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Attempt to repair the build for the unified swift build.  This allows us
to build a single unified toolchain with swift support.  In this layout
assume that cmark and clang are peers of LLVM rather than located in
`tools`.  Doing so allows a uniform layout of the tree and a simpler
build approach.
@compnerd
Copy link
Member Author

CC: @gottesmm @Rostepher @shahmishal

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@lanza you may be interested in this too

@jrose-apple
Copy link
Contributor

I think @llvm-beanz was still interested in having swift/ inside llvm/tools/ (or llvm/projects/ ?) but I'm not sure what that ever did with CMark. Or I could be misremembering.

@compnerd
Copy link
Member Author

@jrose-apple ... so, this actually is somewhat related. This allows me to do a unified build, the difference is that the tree lives as a peer rather than inside of tools. This allows building with -DLLVM_ENABLE_PROJECTS=cmark

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 16a4af0

@llvm-beanz
Copy link
Contributor

When I build with Swift in llvm/tools, I also put CMark there. You can also have Swift and CMark as peers of LLVM in the directory structure and use -DLLVM_EXTERNAL_PROJECTS=swift;cmark -DLLVM_ENABLE_PROJECTS=clang;swift;cmark which leverages the LLVM mono-repo build system tooling.

@compnerd
Copy link
Member Author

@llvm-beanz - hmm, would this change then break that? IIRC, the *_EXTERNAL_SOURCE_DIR are supposed to be setup

@llvm-beanz
Copy link
Contributor

This change will break the workflow of nesting under llvm/tools because the LLVM_EXTERNAL_*_SOURCE_DIR variables aren't set in that case. Personally I don't care if we break that flow because the new mono-repo will make working with LLVM projects nested a thing of the past. As long as the LLVM_EXTERNAL_PROJECTS and LLVM_ENABLE_PROJECTS options work that is good enough.

@compnerd
Copy link
Member Author

@swift-ci please test Linux platform

@compnerd compnerd merged commit 3bf54c3 into swiftlang:master Nov 30, 2018
@compnerd compnerd deleted the the-world-is-flat branch November 30, 2018 04:31
@davezarzycki
Copy link
Contributor

davezarzycki commented Nov 30, 2018

Did I miss a warning email about this change? I've been using unified builds for a long time, and the error message if one tries to do it the old way (with clang/swift in the tools directory) isn't helpful.

Where are the directions for how to do it the new way?

[EDIT x 2] – @compnerd is helping via the forums. I really wish that this was announced first. A heads up on the forums would have been nice.

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.

5 participants