Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDownload extra standard library packages only when cross-compiling #9557
Labels
Comments
dlrobertson
added a commit
to dlrobertson/servo
that referenced
this issue
Feb 11, 2016
Split ensure_bootstrap into two phases including a phase checking the compiler, and a phase checking for target libraries.
dlrobertson
added a commit
to dlrobertson/servo
that referenced
this issue
Feb 12, 2016
Split ensure_bootstrap into two phases including a phase checking the compiler, and a phase checking for target libraries.
dlrobertson
added a commit
to dlrobertson/servo
that referenced
this issue
Feb 12, 2016
Split ensure_bootstrap into two phases including a phase checking the compiler, and a phase checking for target libraries.
dlrobertson
added a commit
to dlrobertson/servo
that referenced
this issue
Feb 12, 2016
Split ensure_bootstrap into two phases including a phase checking the compiler, and a phase checking for target libraries.
dlrobertson
added a commit
to dlrobertson/servo
that referenced
this issue
Feb 12, 2016
Split ensure_bootstrap into two phases including a phase checking the compiler, and a phase checking for target libraries.
bors-servo
added a commit
that referenced
this issue
Feb 12, 2016
Download extra stdlib only when required: #9557 Split [`ensure_bootstrap`](https://github.com/danlrobertson/servo/blob/i9557/python/servo/command_base.py#L397-L422) into two phases including a phase checking the compiler, and a phase checking for target libraries. E.g. ``` # should download the stdlib for "i686-unknown-linux-gnu", "arm-linux-androideabi" # and the hosts target ./mach build -d --target i686-unknown-linux-gnu --android # should only download the stdlib for the hosts target ./mach build -d ``` Let me know if I missed anything! There are a few parts of this patch in its current state that I'm not a huge fan of, but I couldn't think of a better way in the moment. Still new to working on servo, so any comments or critiques are welcome! Fix #9557 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9611) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently when downloading the Rust compiler, the
bootstrap_rustcfunction downloads two copies of the standard libraries: one for the host platform, and one for cross-compiling to Android.Instead, when not cross-compiling, we should download libraries for the host platform only. When cross-compiling (with
mach build --targetormach build --android), we should download libraries for the host platform plus the specified target platform.To implement this, the
CommandBase.ensure_bootstrappedmethod should be changed to take an optionaltargetparameter. Themach buildcommand should pass a target toensure_bootstrappedwhen--targetor--androidis specified. Thenensure_bootstrapandbootstrap_rustcshould be split up into two phases: First, check for the compiler and host libraries (and download them if not found), then optionally check for the target libraries (and download them if not found).