about summary refs log tree commit diff
path: root/src/bootstrap/util.rs
AgeCommit message (Collapse)AuthorLines
2020-03-18Ensure LLVM is in the link path for rustc toolsJosh Stone-0/+25
2020-03-18Rename add_lib_path to add_dylib_pathJosh Stone-1/+1
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-1/+1
2020-01-11use winapi for non-stdlib Windows bindingsAndy Russell-49/+13
2019-12-22Format the worldMark Rousskov-67/+62
2019-12-21use Result::map_or for bootstrapLzu Tao-2/+2
2019-12-09Bootstrap: change logic for choosing linker and rpathJethro Beekman-0/+13
2019-11-22ci: add support for GitHub Actions in the CI scriptsPietro Albini-0/+4
2019-07-15ci: Remove Travis/AppVeyor configurationAlex Crichton-73/+3
Now that we've fully moved to Azure Pipelines and bors has been updated to only gate on Azure this commit removes the remaining Travis/AppVeyor support contained in this repository. Most of the deletions here are related to producing better output on Travis by folding certain sections. This isn't supported by Azure so there's no need to keep it around, and if Azure ever adds support we can always add it back!
2019-06-17Make use of `ptr::null(_mut)` instead of casting zeroLzu Tao-1/+1
2019-05-27Only build clang_rt when RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.Michael Woerister-0/+16
2019-05-13Update src/bootstrap/util.rsPietro Albini-1/+1
Co-Authored-By: Jake Goulding <shepmaster@mac.com>
2019-05-10Add Azure PipelinesJohn Erickson-0/+4
2019-05-09remove unneeded `extern crate`s from build toolsAndy Russell-0/+2
2019-02-25bootstrap: deny(rust_2018_idioms)Taiki Endo-1/+1
2019-02-10rustc: doc commentsAlexander Regueiro-1/+1
2019-01-26Workaround presence of LLVM library in stage0/libMark Rousskov-1/+5
This commit works around the newly-introduced LLVM shared library. This is needed such that llvm-config run from librustc_llvm's build script can correctly locate it's own LLVM, not the one in stage0/lib. The LLVM build system uses the DT_RUNPATH/RUNPATH header within the llvm-config binary, which we want to use, but because Cargo always adds the host compiler's "libdir" (stage0/lib in our case) to the dynamic linker's search path, we weren't properly finding the freshly-built LLVM in llvm/lib. By restoring the environment variable setting the search path to what bootstrap sees, the problem is resolved and librustc_llvm correctly links and finds the appropriate LLVM. Several run-make-fulldeps tests are also updated with similar handling.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10bootstrap: fix editionljedrz-2/+2
2018-12-01remove some uses of try!Mark Mansi-3/+3
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-1/+1
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-4/+1
2018-04-17Remove uses of Build across Builder stepsMark Simulacrum-3/+3
2018-04-03Avoid printing output when in dry run modeMark Simulacrum-7/+10
2018-04-03Refactor to use a dry-run config instead of cfg(test)Mark Simulacrum-101/+5
This ensures that each build will support the testing design of "dry running" builds. It's also checked that a dry run build is equivalent step-wise to a "wet" run build; the graphs we generate when running are directly compared node/node and edge/edge, both for order and contents.
2018-04-03Stub out less codeMark Simulacrum-2/+0
2018-04-03Stub out various functions during testingMark Simulacrum-0/+3
2018-03-28rustbuild: Don't leak file handles when creating junctions on WindowsOliver Middleton-2/+5
This fixes building the compiler docs because stage1-rustc\x86_64-pc-windows-msvc\doc is used twice which doesn't work if we still have a handle from the first time.
2018-01-04Bump to 1.25.0Alex Crichton-1/+1
* Bump the release version to 1.25 * Bump the bootstrap compiler to the recent beta * Allow using unstable rustdoc features on beta - this fix has been applied to the beta branch but needed to go to the master branch as well.
2017-12-04template month/year, version into man pages while building dist tarballZack M. Davis-2/+16
This is meant to resolve #25689.
2017-10-18Make sure to clear out the stageN-{rustc,std,tools} directories.Mark Simulacrum-2/+19
We copy built tool binaries into a dedicated directory to avoid deleting them, stageN-tools-bin. These aren't ever cleared out by code, since there should be no reason to do so, and we'll simply overwrite them as necessary. When clearing out the stageN-{std,rustc,tools} directories, make sure to delete both Cargo directories -- per-target and build scripts. This ensures that changing libstd doesn't cause problems due to build scripts not being rebuilt, even though they should be.
2017-09-09rustbuild: Switch back to using hard linksAlex Crichton-3/+6
The `copy` function historically in rustbuild used hard links to speed up the copy operations that it does. This logic was backed out, however, in #39518 due to a bug that only showed up on Windows, described in #39504. The cause described in #39504 happened because Cargo, on a fresh build, would overwrite the previous artifacts with new hard links that Cargo itself manages. This behavior in Cargo was fixed in rust-lang/cargo#4390 where it no longer should overwrite files on fresh builds, opportunistically leaving the filesystem intact and not touching it. Hopefully this can help speed up local builds by doing fewer copies all over the place!
2017-08-31Update Cargo to 0.23.0 and our lockfileAlex Crichton-1/+1
2017-07-04Cleanup utilsMark Simulacrum-12/+3
2017-06-02ci: Improve log output (mainly Travis).kennytm-2/+101
* Bring back colors on Travis, which was disabled since #39036. Append --color=always to cargo when running in CI environment. * Removed `set -x` in the shell scripts. The `retry` function already prints which command it is running, add `-x` just add noise to the output. * Support travis_fold/travis_time. Matching pairs of these allow Travis CI to collapse the output in between. This greatly cut down the unnecessary "successful" output one need to scroll through before finding the failed statement.
2017-04-24Haiku: add missing cases of using LIBRARY_PATHJessica Hamilton-0/+2
2017-03-10rustbuild: Build documentation for `proc_macro`Alex Crichton-0/+139
This commit fixes #38749 by building documentation for the `proc_macro` crate by default for configured hosts. Unfortunately did not turn out to be a trivial fix. Currently rustbuild generates documentation into multiple locations: one for std, one for test, and one for rustc. The initial fix for this issue simply actually executed `cargo doc -p proc_macro` which was otherwise completely elided before. Unfortunately rustbuild was the left to merge two documentation trees together. One for the standard library and one for the rustc tree (which only had docs for the `proc_macro` crate). Rustdoc itself knows how to merge documentation files (specifically around search indexes, etc) but rustbuild was unaware of this, so an initial fix ended up destroying the sidebar and the search bar from the libstd docs. To solve this issue the method of documentation has been tweaked slightly in rustbuild. The build system will not use symlinks (or directory junctions on Windows) to generate all documentation into the same location initially. This'll rely on rustdoc's logic to weave together all the output and ensure that it ends up all consistent. Closes #38749
2017-03-09rustbuild: Use copies instead of hard linksAlex Crichton-2/+10
The original motivation for hard links was to speed up the various stages of rustbuild, but in the end this is causing problems on Windows (#39504). This commit tweaks the build system to use copies instead of hard links unconditionally to ensure that the files accessed by Windows are always disjoint. Locally this added .3s to a noop build, so it shouldn't be too much of a regression hopefully!
2017-02-02Build libbacktrace/jemalloc only when their timestamps are older than sourcesVadim Petrochenkov-37/+0
2016-12-30travis: Add a distcheck targetAlex Crichton-2/+2
This commit adds a new entry to the Travis matrix which performs a "distcheck", which basically means that we create a tarball, extract that tarball, and then build/test inside there. This ensures that the tarballs we produce are actually able to be built/tested! Along the way this also updates the rustbuild distcheck definition to propagate the configure args from the top-level invocation. Closes #38691
2016-12-15rustbuild: Fix `copy` helper with existing filesAlex Crichton-0/+6
This erroneously truncated files when the destination already existed and was an existing hard link to the source. This in turn caused weird bugs! Closes #37745
2016-12-07mk: Switch rustbuild to the default build systemAlex Crichton-0/+17
This commit switches the default build system for Rust from the makefiles to rustbuild. The rustbuild build system has been in development for almost a year now and has become quite mature over time. This commit is an implementation of the proposal on [internals] which slates deletion of the makefiles on 2016-01-02. [internals]: https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368 This commit also updates various documentation in `README.md`, `CONTRIBUTING.md`, `src/bootstrap/README.md`, and throughout the source code of rustbuild itself. Closes #37858
2016-11-05Merge branch 'gdb-next-gen' of https://github.com/TimNN/rust into rollupAlex Crichton-0/+18
2016-11-02rustbuild: Rewrite user-facing interfaceAlex Crichton-2/+1
This commit is a rewrite of the user-facing interface to the rustbuild build system. The intention here is to make it much easier to compile/test the project without having to remember weird rule names and such. An overall view of the new interface is: # build everything ./x.py build # document everyting ./x.py doc # test everything ./x.py test # test libstd ./x.py test src/libstd # build libcore stage0 ./x.py build src/libcore --stage 0 # run stage1 run-pass tests ./x.py test src/test/run-pass --stage 1 The `src/bootstrap/bootstrap.py` script is now aliased as a top-level `x.py` script. This `x` was chosen to be both short and easily tab-completable (no collisions in that namespace!). The build system now accepts a "subcommand" of what to do next, the main ones being build/doc/test. Each subcommand then receives an optional list of arguments. These arguments are paths in the source repo of what to work with. That is, if you want to test a directory, you just pass that directory as an argument. The purpose of this rewrite is to do away with all of the arcane renames like "rpass" is the "run-pass" suite, "cfail" is the "compile-fail" suite, etc. By simply working with directories and files it's much more intuitive of how to run a test (just pass it as an argument). The rustbuild step/dependency management was also rewritten along the way to make this easy to work with and define, but that's largely just a refactoring of what was there before. The *intention* is that this support is extended for arbitrary files (e.g. `src/test/run-pass/my-test-case.rs`), but that isn't quite implemented just yet. Instead directories work for now but we can follow up with stricter path filtering logic to plumb through all the arguments.
2016-10-31rustbuild+configure: improve bin/exe joiningTim Neumann-0/+18
2016-09-12it's also compiler-rt.lib on windows-gnuJorge Aparicio-1/+1
2016-08-12Produce source package in rust-installer format in addition to vanilla tarballDiggory Blake-0/+29
Copy source files from rust code Add missing wildcard Remove unused function Remove use of tar --transform
2016-07-20mk: Stop using cmake for compiler-rtAlex Crichton-1/+4
The compiler-rt build system has been a never ending cause of pain for Rust unfortunately: * The build system is very difficult to invoke and configure to only build compiler-rt, especially across platforms. * The standard build system doesn't actually do what we want, not working for some of our platforms and requiring a significant number of patches on our end which are difficult to apply when updating compiler-rt. * Compiling compiler-rt requires LLVM to be compiled, which... is a big dependency! This also means that over time compiler-rt is not guaranteed to build against older versions of LLVM (or newer versions), and we often want to work with multiple versions of LLVM simultaneously. The makefiles and rustbuild already know how to compile C code, the code here is far from the *only* C code we're compiling. This patch jettisons all logic to work with compiler-rt's build system and just goes straight to the source. We just list all files manually (copied from compiler-rt's lib/builtins/CMakeLists.txt) and compile them into an archive. It's likely that this means we'll fail to pick up new files when we upgrade compiler-rt, but that seems like a much less significant cost to pay than what we're currently paying. cc #34400, first steps towards that
2016-07-05rustbuild: Remove the `build` directoryAlex Crichton-0/+142
The organization in rustbuild was a little odd at the moment where the `lib.rs` was quite small but the binary `main.rs` was much larger. Unfortunately as well there was a `build/` directory with the implementation of the build system, but this directory was ignored by GitHub on the file-search prompt which was a little annoying. This commit reorganizes rustbuild slightly where all the library files (the build system) is located directly inside of `src/bootstrap` and all the binaries now live in `src/bootstrap/bin` (they're small). Hopefully this should allow GitHub to index and allow navigating all the files while maintaining a relatively similar layout to the other libraries in `src/`.