Skip to content
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

Rework ldc-bootstrap to use the same compiler version as the release #76

Merged

Conversation

WebDrake
Copy link
Contributor

@WebDrake WebDrake commented Apr 1, 2019

LDC v1.12.0+ supports LLVM 7, but v0.17.6 does not. This means that to build more recent LDC releases with the latest LLVM we will either need to build multiple LLVMs (!) or change the bootstrap compiler.

This patch implements an alternative to the solution in #75 using a technique already used by upstream LDC package builds: the bootstrap compiler is the same version as the one to be released, built with minimal features using the host system's LDC but the latest LLVM. This means that we can take advantage of the most up to date compiler features when building the final release.

Note that an alternative would be to use build-snaps for the LDC used to build ldc-bootstrap. This is avoided for now since avoiding having any snap-package dependencies should make it easier to build the package on a wider variety of systems.

@WebDrake WebDrake requested a review from kinke April 1, 2019 17:41
LDC v1.12.0+ supports LLVM 7, but v0.17.6 does not.  This means that to
build more recent LDC releases with the latest LLVM we will either need
to build multiple LLVMs (!) or change the bootstrap compiler.

This patch therefore implements a technique already used by upstream LDC
package builds: the bootstrap compiler is the same version as the one to
be released, built with minimal features using the host system's LDC but
the latest LLVM.  This means that we can take advantage of the most up
to date compiler features when building the final release.

Note that an alternative would be to use `build-snaps` for the LDC used
to build `ldc-bootstrap`.  This is avoided for now since avoiding having
any snap-package dependencies should make it easier to build the package
on a wider variety of systems.

One consequence of this change is that we need to use an override-build
to ensure that we use Ninja as the cmake build backend, as we already do
for the main LDC build.
@WebDrake WebDrake force-pushed the identical-bootstrap-compiler branch from 8bebb9a to e4a9cac Compare April 1, 2019 17:43
@WebDrake
Copy link
Contributor Author

WebDrake commented Apr 1, 2019

@kinke is this more in line with what you had in mind?

@kinke
Copy link
Member

kinke commented Apr 1, 2019

Yeah, appears good.

@WebDrake WebDrake merged commit e4a9cac into ldc-developers:1.11 Apr 1, 2019
@WebDrake WebDrake deleted the identical-bootstrap-compiler branch April 1, 2019 21:19
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.

2 participants