about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2017-04-25Build the rustc-src tarball before the rust-src componentJosh Stone-27/+33
2017-04-25Auto merge of #41362 - alexcrichton:run-cargot-ests, r=aturonbors-11/+47
Run tests for the cargo submodule in tree Previously the `cargotest` suite would run some arbitrary revision of Cargo's test suite, but now that we're bundling it in tree we should be running the Cargo submodule's test suite instead.
2017-04-25Support AddressSanitizer and ThreadSanitizer on x86_64-apple-darwin.kennytm-0/+19
ASan and TSan are supported on macOS, and this commit enables their support. The sanitizers are always built as *.dylib on Apple platforms, so they cannot be statically linked into the corresponding `rustc_?san.rlib`. The dylibs are directly copied to `lib/rustlib/x86_64-apple-darwin/lib/` instead. Note, although Xcode also ships with their own copies of ASan/TSan dylibs, we cannot use them due to version mismatch. There is a caveat: the sanitizer libraries are linked as @rpath, so the user needs to additionally pass `-C rpath`: rustc -Z sanitizer=address -C rpath file.rs ^~~~~~~~ Otherwise there will be a runtime error: dyld: Library not loaded: @rpath/libclang_rt.asan_osx_dynamic.dylib Referenced from: /path/to/executable Reason: image not found Abort trap: 6 The next commit includes a temporary change in compiler to force the linker to emit a usable @rpath.
2017-04-25Pass `--format-version 1` to `cargo metadata`.kennytm-0/+1
Suppress warning introduced by rust-lang/cargo#3841.
2017-04-24Adds rust-windbg.cmd scriptAndrew Gaspar-1/+6
2017-04-24Auto merge of #40123 - TimNN:llvm40, r=alexcrichtonbors-0/+7
LLVM 4.0 Upgrade Since nobody has done this yet, I decided to get things started: **Todo:** * [x] push the relevant commits to `rust-lang/llvm` and `rust-lang/compiler-rt` * [x] cleanup `.gitmodules` * [x] Verify if there are any other commits from `rust-lang/llvm` which need backporting * [x] Investigate / fix debuginfo ("`<optimized out>`") failures * [x] Use correct emscripten version in docker image --- Closes #37609. --- **Test results:** Everything is green 🎉
2017-04-24Run tests for the cargo submodule in treeAlex Crichton-11/+47
Previously the `cargotest` suite would run some arbitrary revision of Cargo's test suite, but now that we're bundling it in tree we should be running the Cargo submodule's test suite instead.
2017-04-24Haiku: add missing cases of using LIBRARY_PATHJessica Hamilton-0/+5
2017-04-23FIN: Compile LLVM with -fno-omit-frame-pointer on 32bit MinGW buildsTim Neumann-0/+7
to work around an apparently bad optimization.
2017-04-21Auto merge of #41445 - frewsxcv:rollup, r=frewsxcvbors-0/+6
Rollup of 4 pull requests - Successful merges: #41372, #41376, #41426, #41429 - Failed merges:
2017-04-21Update #[no_core] users with the "freeze" lang item.Eduard-Mihai Burtescu-0/+1
2017-04-21Rollup merge of #41426 - malbarbo:android-x86_64, r=alexcrichtonCorey Farwell-0/+6
Add x86_64-linux-android target
2017-04-20Add x86_64-linux-android targetMarco A L Barbosa-0/+6
2017-04-19Rollup merge of #41391 - durka:patch-40, r=petrochenkovCorey Farwell-4/+0
remove disclaimer from bootstrap/README.md
2017-04-19Auto merge of #41354 - alexcrichton:tool-no-debug, r=aturonbors-2/+7
Disable debuginfo when compiling tools Currently the Cargo binary has jumped from 14M to 34M on the beta channel, which appears to be due to the fact that we're compiling tools with debug information inside them. This additionally means that the `rls` binary is 62M right now! This wasn't an intentional change, so be sure to disable debuginfo when compiling tools as it's just intended for the standard library and compile for now.
2017-04-19Auto merge of #41170 - Nashenas88:master, r=alexcrichtonbors-1/+3
Use the existing path when removing the prefix fails This allows the use of out-of-tree paths to be specified. I found this while trying to build with a modified version of `rls-data`, which is currently pointing to a version on crates.io. cc @alexcrichton Also, it wasn't clear if I needed to add a test for this (or how). I didn't see any tests that took paths into consideration.
2017-04-19remove disclaimer from bootstrap/README.mdAlex Burka-4/+0
2017-04-18Add bootstrap support for androidMarco A L Barbosa-6/+16
2017-04-17bootstrap: Don't workaround uname -m on DarwinRicho Healey-8/+0
This no longer manifests on any versions of OSX that I could find.
2017-04-17Disable debuginfo when compiling toolsAlex Crichton-2/+7
Currently the Cargo binary has jumped from 14M to 34M on the beta channel, which appears to be due to the fact that we're compiling tools with debug information inside them. This additionally means that the `rls` binary is 62M right now! This wasn't an intentional change, so be sure to disable debuginfo when compiling tools as it's just intended for the standard library and compile for now.
2017-04-15[rustbuild] Side-step HashMap iteration to preserve command-line step order.Eduard-Mihai Burtescu-2/+2
2017-04-13rustbuild: Fix recompilation of stage0 tools dirAlex Crichton-42/+167
This commit knocks out a longstanding FIXME in rustbuild which should correctly recompile stage0 compiletest and such whenever libstd itself changes. The solution implemented here was to implement a notion of "order only" dependencies and then add a new dependency stage for clearing out the tools dir, using order-only deps to ensure that it happens correctly. The dependency drawing for tools is a bit wonky now but I think this'll get the job done. Closes #39396
2017-04-12travis: Enable rust-analysis package for more targetsAlex Crichton-0/+1
This commit enables the `rust-analysis` package to be produced for all targets that are part of the `dist-*` suite of docker images on Travis. Currently these packages are showing up with `available = false` in the `channel-rust-nightly.toml` manifest where we'd prefer to have them show up for all targets. Unfortunately rustup isn't handling the `available = false` section well right now, so this should also inadvertently fix the nightly regression.
2017-04-12Auto merge of #40584 - nrc:rls-submod, r=alexcrichtonbors-27/+93
Add the RLS as a submodule and build a package out of it r? @brson (and cc @alexcrichton) Please review closely, I am not at all convinced I've done the right things here. I did run `x.py dist` and it makes an rls package which looks right to my eyes, but I haven't tested on non-linux platforms nor am I really sure what it should look like. This does not attempt to run tests for the RLS yet.
2017-04-11Touch up rls integrationAlex Crichton-4/+26
* Use the right version when building combined installer * Update dependencies of rls as it depends on rustc and plugins * Fix build-manifest and the versions it uses for the rls
2017-04-11Make sccache a bit quieterAidan Hobson Sayers-1/+1
2017-04-10Remove --enable-save-analysis configure flagNick Cameron-18/+4
2017-04-10Reviewer changesNick Cameron-72/+13
2017-04-10Build an RLS package as part of the dist targetNick Cameron-1/+118
2017-04-08Use the existing path when removing the prefix fails. This allows the use of ↵Paul Faria-1/+3
out-of-tree paths to be specified
2017-04-08Rollup merge of #41152 - cuviper:bootstrap-armv7, r=japaricTim Neumann-2/+2
bootstrap.py: fix armv7 detection This matches the logic that was in `./configure` before f8ca805422db8.
2017-04-07bootstrap.py: fix armv7 detectionJosh Stone-2/+2
This matches the logic that was in `./configure` before f8ca805422db8.
2017-04-07Rollup merge of #41047 - cuviper:src_is_git, r=alexcrichtonCorey Farwell-24/+27
Only use cargo-vendor if building from git sources The only time we need to vendor sources is when building from git. If one is building from a rustc source tarball, everything should already be in place. This also matters for distros which do offline builds, as they can't install cargo-vendor this way. This adds a common `Build::src_is_git` flag, and then uses it in the dist-src target to decide whether to install or use `cargo-vendor` at all. Fixes #41042.
2017-04-06Auto merge of #41102 - frewsxcv:rollup, r=frewsxcvbors-159/+187
Rollup of 5 pull requests - Successful merges: #40908, #41011, #41026, #41037, #41050 - Failed merges:
2017-04-05Rollup merge of #41026 - CleanCut:rust-40860, r=alexcrichtonCorey Farwell-20/+22
Handle symlinks in src/bootstrap/clean.rs (mostly) -- resolves #40860. In response to #40860 The broken condition can be replicated with: ```shell export MYARCH=x86_64-apple-darwin && mkdir -p build/$MYARCH/subdir && touch build/$MYARCH/subdir/file && ln -s build/$MYARCH/subdir/file build/$MYARCH/subdir/symlink ``` `src/bootstrap/clean.rs` has a custom implementation of removing a tree `fn rm_rf` that used `std::path::Path::{is_file, is_dir, exists}` while recursively deleting directories and files. Unfortunately, `Path`'s implementation of `is_file()` and `is_dir()` and `exists()` always unconditionally follow symlinks, which is the exact opposite of standard implementations of deleting file trees. It appears that this custom implementation is being used to workaround a behavior in Windows where the files often get marked as read-only, which prevents us from simply using something nice and simple like `std::fs::remove_dir_all`, which properly deletes links instead of following them. So it looks like the fix is to use `.symlink_metadata()` to figure out whether tree items are files/symlinks/directories. The one corner case this won't cover is if there is a broken symlink in the "root" `build/$MYARCH` directory, because those initial entries are run through `Path::canonicalize()`, which panics with broken symlinks. So lets just never use symlinks in that one directory. :-)
2017-04-05Rollup merge of #41011 - CleanCut:bootstrap-help, r=alexcrichtonCorey Farwell-139/+165
Overhaul Bootstrap (x.py) Command-Line-Parsing & Help Output While working on #40417, I got frustrated with the behavior of x.py and the bootstrap binary it wraps, so I decided to do something about it. This PR should improve documentation, make the command-line-parsing more flexible, and clean up some of the internals. No command that worked before should stop working. At least that's the theory. :-) This should resolve at least #40920 and #38373. Changes: - No more manual args manipulation -- getopts used everywhere except the one place it's not possible. As a result, options can be in any position, now, even before the subcommand. - The additional options for test, bench, and dist now appear in the help output. - No more single-letter variable bindings used internally for large scopes. - Don't output the time measurement when just invoking `x.py` or explicitly passing `-h` or `--help` - Logic is now much more linear. We build strings up, and then print them. - Refer to subcommands as subcommands everywhere (some places we were saying "command") - Other minor stuff. @alexcrichton This is my first PR. Do I need to do something specific to request reviewers or anything?
2017-04-06Auto merge of #40805 - vadimcn:msys-mingw, r=alexcrichtonbors-1/+10
[Windows] Enable building rustc with "pthreads" flavor of mingw. Tested on mingw-w64 packaged with msys2. r? @alexcrichton cc #40123
2017-04-04Fixes other targets rustlibs installationGitLab-2/+7
When the user select more than one target to generate rustlibs for, rustbuild will only install the host one. This patch fixes it, more info in https://github.com/rust-lang/rust/issues/39235#issuecomment-285878858
2017-04-04Branch arms need to match the return value even if it's not being assigned ↵Nathan Stocks-4/+4
to anything
2017-04-03Handle options-with-arguments before subcommands such as './x.py -j 10 ↵Nathan Stocks-16/+44
build' and detect pathological cases like './x.py --option-that-takes-argument clean build'
2017-04-03Loosen src_is_git to just check exists()Josh Stone-1/+1
2017-04-03Only use cargo-vendor if building from git sourcesJosh Stone-19/+22
2017-04-03Add a common Build::src_is_git flagJosh Stone-5/+5
2017-04-02Handle symlinks in src/bootstrap/clean.rs (mostly) -- resolves #40860.Nathan Stocks-20/+22
The broken condition can be replicated with: ``shell export MYARCH=x86_64-apple-darwin && mkdir -p build/$MYARCH/subdir && touch build/$MYARCH/subdir/file && ln -s build/$MYARCH/subdir/file build/$MYARCH/subdir/symlink `` `src/bootstrap/clean.rs` has a custom implementation of removing a tree `fn rm_rf` that used `std::path::Path::{is_file, is_dir, exists}` while recursively deleting directories and files. Unfortunately, `Path`'s implementation of `is_file()` and `is_dir()` and `exists()` always unconditionally follow symlinks, which is the exact opposite of standard implementations of deleting file trees. It appears that this custom implementation is being used to workaround a behavior in Windows where the files often get marked as read-only, which prevents us from simply using something nice and simple like `std::fs::remove_dir_all`, which properly deletes links instead of following them. So it looks like the fix is to use `.symlink_metadata()` to figure out whether tree items are files/symlinks/directories. The one corner case this won't cover is if there is a broken symlink in the "root" `build/$MYARCH` directory, because those initial entries are run through `Path::canonicalize()`, which panics with broken symlinks. So lets just never use symlinks in that one directory. :-)
2017-04-02Fix breaking the 'clean' subcommand caused replacing a single-letter ↵Nathan Stocks-1/+1
variable with the same value in two contexts where it was used differently. That's why you don't use "m" as a variable for hundreds of lines in an outer function, and re-use it in closures several times in the same function. Sheesh.
2017-04-02Simplify a "use" statement as per @grunweg's feedback.Nathan Stocks-1/+1
2017-04-02Oops, we can't parse options until all options have been defined. Tiny bit ↵Nathan Stocks-15/+23
of manual arg-parsing. Fixed tidy stuff too.
2017-04-02Finish the improvements I planned.Nathan Stocks-125/+113
- No more manual args manipulation -- getopts used for everything. As a result, options can be in any position, now, even before the subcommand. - The additional options for test, bench, and dist now appear in the help output. - No more single-letter variable bindings used internally for large scopes. - Don't output the time measurement when just invoking 'x.py' - Logic is now much more linear. We build strings up, and then print them.
2017-04-02Save my TODO's as comments, so I don't forget.Nathan Stocks-0/+2
2017-04-02Using an untyped, one-letter variable binding as an argument to a function ↵Nathan Stocks-2/+2
and then not using it until over 100 lines later is just mean.