about summary refs log tree commit diff
path: root/mk
AgeCommit message (Collapse)AuthorLines
2016-05-08Rollup merge of #33424 - semarie:dist, r=alexcrichtonManish Goregaokar-1/+2
make dist: specify the archive file as stdout If the `-f` option isn't given, GNU tar will use environment variable `TAPE` first, and next use the compiled-in default, which isn't necessary `stdout` (it is the tape device `/dev/rst0` under OpenBSD for example).
2016-05-08Auto merge of #33130 - eddyb:mir-const, r=nikomatsakisbors-1/+1
Implement constant support in MIR. All of the intended features in `trans::consts` are now supported by `mir::constant`. The implementation is considered a temporary measure until `miri` replaces it. A `-Z orbit` bootstrap build will only translate LLVM IR from AST for `#[rustc_no_mir]` functions. Furthermore, almost all checks of constant expressions have been moved to MIR. In non-`const` functions, trees of temporaries are promoted, as per RFC 1414 (rvalue promotion). Promotion before MIR borrowck would allow reasoning about promoted values' lifetimes. The improved checking comes at the cost of four `[breaking-change]`s: * repeat counts must contain a constant expression, e.g.: `let arr = [0; { println!("foo"); 5 }];` used to be allowed (it behaved like `let arr = [0; 5];`) * dereference of a reference to a `static` cannot be used in another `static`, e.g.: `static X: [u8; 1] = [1]; static Y: u8 = (&X)[0];` was unintentionally allowed before * the type of a `static` *must* be `Sync`, irrespective of the initializer, e.g. `static FOO: *const T = &BAR;` worked as `&T` is `Sync`, but it shouldn't because `*const T` isn't * a `static` cannot wrap `UnsafeCell` around a type that *may* need drop, e.g. `static X: MakeSync<UnsafeCell<Option<String>>> = MakeSync(UnsafeCell::new(None));` was previously allowed based on the fact `None` alone doesn't need drop, but in `UnsafeCell` it can be later changed to `Some(String)` which *does* need dropping The drop restrictions are relaxed by RFC 1440 (#33156), which is implemented, but feature-gated. However, creating `UnsafeCell` from constants is unstable, so users can just enable the feature gate.
2016-05-07Rollup merge of #33314 - alexcrichton:fix-enable-ccache, r=pnkfelixSteve Klabnik-5/+5
mk: Fix building with --enable-ccache We will no longer use `ccache` in the makefiles for our local dependencies like miniz, but they're so small anyway it doesn't really matter. Closes #33285
2016-05-07Rollup merge of #33256 - pnkfelix:add-rustc-specific-tags-files, r=nikomatsakisSteve Klabnik-4/+11
Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets, (re-)including rustc source.
2016-05-07mir: qualify and promote constants.Eduard Burtescu-1/+1
2016-05-07Add armv7-linux-androideabi target.Nerijus Arlauskas-0/+25
2016-05-06Auto merge of #33228 - nikomatsakis:compiletest-gut, r=acrichtobors-1/+0
Move auxiliary directories to live with the tests This is a step for enabling testing of cross-crate incremental compilation. The idea is that instead of having a central auxiliary directory, when you have a `// aux-build:foo.rs` annotation in the test `run-pass/bar.rs`, it will look in (e.g.) `run-pass/aux/foo.rs`. In general, it looks for an `aux` directory in the same directory as the test. We also ignore the `aux` directories when enumerating the set of tests. As part of this PR, also refactor `runtest.rs` to use methods on a context, which means we can stop passing around context everywhere. r? @alexcrichton
2016-05-06kill the old auxiliary directoryNiko Matsakis-1/+0
2016-05-06mk: Try to fix nightlies againAlex Crichton-3/+3
Looks like the real bug on nightlies is that the `llvm-pass` run-make test is not actually getting the value of `LLVM_CXXFLAGS` correct. Namely, it's blank! Now the only change #33093 which actually affected this is that the argument `$(LLVM_CXXFLAGS_$(2))` was moved up from a makefile rule into the definition of a variable. Sounds innocuous? Turns out the variable this was moved into is defined with `:=`, which means that it's not recursively expanded, which basically means that it's expanded immediately. Unfortunately part of this expansion involves running `llvm-config`, which doesn't exist at the start of distcheck build! This didn't show up on the bots because they run `make` *then* `make check`, and the first step builds llvm-config so the next time `make` is loaded everything is available. The distcheck bots, however, run just a plain `distcheck` so `make` doesn't exist ahead of time. You can see this in action where the distcheck bots start out with a bunch of "llvm-config not found" error messages. This commit just changes a few variables to be defined with `=` which essentially means they're lazily expanded. I did not run a full distcheck locally, but this makes the initial "llvm-config not found" error messages go away so I suspect that this is the fix. Closes #33379
2016-05-06Distribute both rust-lldb and rust-gdb everywhere except win-msvcBrian Anderson-5/+8
Both debuggers are viable in some capacity on all tier-1 platforms, and people often ask for rust-lldb on Linux or rust-gdb on OS X.
2016-05-05mk: Fix building with --enable-ccacheAlex Crichton-5/+5
We will no longer use `ccache` in the makefiles for our local dependencies like miniz, but they're so small anyway it doesn't really matter. Closes #33285
2016-05-05specify the archive file as stdoutSébastien Marie-1/+2
If the `-f` option isn't given, GNU tar will use environment variable `TAPE` first, and next use the compiled-in default, which isn't necessary `stdout` (it is the tape device `/dev/rst0` under OpenBSD for example).
2016-05-03mk: Pass CFLAGS for target, not hostAlex Crichton-5/+5
This changes the CFLAGS and related variables passed to compiletest to be passed for the target, not the host, so we can correctly test 32-bit cross compiles on 64-bit host machines. Hopefuly fixes #33379
2016-04-28Auto merge of #33093 - alexcrichton:rustbuild-rmake, r=nikomatsakisbors-92/+45
test: Move run-make tests into compiletest Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-28test: Move run-make tests into compiletestAlex Crichton-92/+45
Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-28Add `TAGS.rustc.emacs`/`TAGS.rustc.vi` make targets, (re-)including rustc ↵Felix S. Klock II-4/+11
source.
2016-04-28Auto merge of #33208 - nrc:save-json, r=pnkfelixbors-1/+1
save-analysis: dump in JSON format cc #18582
2016-04-25mk: Fix use of deprecated configure varAlex Crichton-1/+1
The `--android-cross-path` has been deprecated for some time now, we should use `CFG_ARM_LINUX_ANDROIDEABI_NDK` instead. Ideally this would use the right triple, but we're only testing ARM for now.
2016-04-25save-analysis: implement JSON dumpsNick Cameron-1/+1
2016-04-23Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoeristerbors-1/+2
Sanity check Python on OSX for LLDB tests Two primary changes: * Don't get past the configure stage if `python` isn't coming from `/usr/bin` * Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB. Closes #32994
2016-04-21port compiletest to use JSON outputNiko Matsakis-1/+1
This uncovered a lot of bugs in compiletest and also some shortcomings of our existing JSON output. We had to add information to the JSON output, such as suggested text and macro backtraces. We also had to fix various bugs in the existing tests. Joint work with jntrnr.
2016-04-20Auto merge of #31709 - ranma42:target_feature-from-llvm, r=alexcrichtonbors-1/+5
Compute `target_feature` from LLVM This is a work-in-progress fix for #31662. The logic that computes the target features from the command line has been replaced with queries to the `TargetMachine`.
2016-04-19mk: Bootstrap from stable instead of snapshotsAlex Crichton-40/+27
This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
2016-04-19mk: Force system python for LLDB tests on OSXAlex Crichton-1/+2
Force usage of /usr/bin/python whenever we run LLDB tests on OSX because it looks like no other Python will work.
2016-04-18rustbuild: Add support for compiletest test suitesAlex Crichton-3/+2
This commit adds support in rustbuild for running all of the compiletest test suites as part of `make check`. The `compiletest` program was moved to `src/tools` (like `rustbook` and others) and is now just compiled like any other old tool. Each test suite has a pretty standard set of dependencies and just tweaks various parameters to the final compiletest executable. Note that full support is lacking in terms of: * Once a test suite has passed, that's not remembered. When a test suite is requested to be run, it's always run. * The arguments to compiletest probably don't work for every possible combination of platforms and testing environments just yet. There will likely need to be future updates to tweak various pieces here and there. * Cross compiled test suites probably don't work just yet, support for that will come in a follow-up patch.
2016-04-14Rollup merge of #32884 - brson:bump, r=alexcrichtonSteve Klabnik-1/+1
Bump to 1.10
2016-04-12tidy: Add a check to ensure Cargo.toml is in syncAlex Crichton-2/+2
This verifies that the crates listed in the `[dependencies]` section of `Cargo.toml` are a subset of the crates listed in `lib.rs` for our in-tree crates. This should help ensure that when we refactor crates over time we keep these dependency lists in sync.
2016-04-12rustbuild: Migrate tidy checks to RustAlex Crichton-45/+9
This commit rewrites all of the tidy checks we have, namely: * featureck * errorck * tidy * binaries into Rust under a new `tidy` tool inside of the `src/tools` directory. This at the same time deletes all the corresponding Python tidy checks so we can be sure to only have one source of truth for all the tidy checks. cc #31590
2016-04-11Bump to 1.10Brian Anderson-1/+1
2016-04-09Implement feature extraction from `TargetMachine`Andrea Canciani-0/+4
Add the `LLVMRustHasFeature` function to check whether a `TargetMachine` has a given feature.
2016-04-09Reintroduce rustc_llvm dependency in rustcAndrea Canciani-1/+1
The dependency was removed in 352b44d1fa9ec2c969d7c8360106e6838233bcba, but it is needed in order to compute the target features.
2016-04-07Auto merge of #32800 - Manishearth:rollup, r=Manishearthbors-0/+11
Rollup of 7 pull requests - Successful merges: #32687, #32729, #32731, #32732, #32734, #32737, #32741 - Failed merges:
2016-04-07Rollup merge of #32731 - alexcrichton:known-bootstrap-key, r=brsonManish Goregaokar-0/+11
mk: Hardcode the bootstrap key for each release Starting with the 1.10.0 release we would like to bootstrap all compilers from the previous stable release. For example the 1.10.0 compiler should bootstrap from the literal 1.9.0 release artifacts. To do this, however, we need a way to enable unstable features temporarily in a stable compiler (as the released compiler is stable), but it turns out we already have a way to do that! At compile time the configure script selects a `CFG_BOOTSTRAP_KEY` variable value and then exports it into the makefiles. If the `RUSTC_BOOTSTRAP_KEY` environment variable is set to this value, then the compiler is allowed to "cheat" and use unstable features. This method of choosing the bootstrap key, however, is problematic for the intention of bootstrapping from the previous release. Each time a 1.9.0 compiler is created, a new bootstrap key will be selected. That means that the 1.10.0 compiler will only compile from *our* literal release artifacts. Instead distributions would like to bootstrap from their own compilers, so instead we simply hardcode the bootstrap key for each release. This patch uses the same `CFG_FILENAME_EXTRA` value (a hash of the release string) as the bootstrap key. Consequently all 1.9.0 compilers, no matter where they are compiled, will have the same bootstrap key. Additionally we won't need to keep updating this as it'll be based on the release number anyway. Once the 1.9.0 beta has been created, we can update the 1.10.0 nightly sources (the `master` branch at that time) to bootstrap from that release using this hard-coded bootstrap key. We will likely just hardcode into the makefiles what the previous bootstrap key was and we'll change that whenever the stage0 compiler is updated.
2016-04-06patch name in incremental's Cargo.tomlNiko Matsakis-1/+2
2016-04-06Address nits.Niko Matsakis-1/+1
2016-04-06add incremental test runner and some testsNiko Matsakis-1/+11
2016-04-06make an incremental crateNiko Matsakis-2/+3
for now, this houses `svh` and the code to check `assert_dep_graph` is sane
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-16/+15
2016-04-05Rollup merge of #32686 - mneumann:dragonfly_jemalloc_prefix, r=alexcrichtonManish Goregaokar-0/+2
Prefix jemalloc on DragonFly to prevent segfaults. Similar to commits ed015456a114ae907a36af80c06f81ea93182a24 (iOS) and e3b414d8612314e74e2b0ebde1ed5c6997d28e8d (Android)
2016-04-04mk: Hardcode the bootstrap key for each releaseAlex Crichton-0/+11
Starting with the 1.10.0 release we would like to bootstrap all compilers from the previous stable release. For example the 1.10.0 compiler should bootstrap from the literal 1.9.0 release artifacts. To do this, however, we need a way to enable unstable features temporarily in a stable compiler (as the released compiler is stable), but it turns out we already have a way to do that! At compile time the configure script selects a `CFG_BOOTSTRAP_KEY` variable value and then exports it into the makefiles. If the `RUSTC_BOOTSTRAP_KEY` environment variable is set to this value, then the compiler is allowed to "cheat" and use unstable features. This method of choosing the bootstrap key, however, is problematic for the intention of bootstrapping from the previous release. Each time a 1.9.0 compiler is created, a new bootstrap key will be selected. That means that the 1.10.0 compiler will only compile from *our* literal release artifacts. Instead distributions would like to bootstrap from their own compilers, so instead we simply hardcode the bootstrap key for each release. This patch uses the same `CFG_FILENAME_EXTRA` value (a hash of the release string) as the bootstrap key. Consequently all 1.9.0 compilers, no matter where they are compiled, will have the same bootstrap key. Additionally we won't need to keep updating this as it'll be based on the release number anyway. Once the 1.9.0 beta has been created, we can update the 1.10.0 nightly sources (the `master` branch at that time) to bootstrap from that release using this hard-coded bootstrap key. We will likely just hardcode into the makefiles what the previous bootstrap key was and we'll change that whenever the stage0 compiler is updated.
2016-04-03mk: Add configure option for disabling codegen testsAlex Crichton-2/+6
Our `codegen` test suite requires the LLVM `FileCheck` utility but unfortunately this isn't always available in all custom LLVM roots (e.g. those specified via `--llvm-root`). This commit adds a `./configure` option called `--disable-codegen-tests` which will manually disable running these tests. In the case that this option is passed we can forgo the need for the `FileCheck` executable. Note that we still require `FileCheck` by default as we will attempt to run these tests. Closes #28667
2016-04-02Prefix jemalloc on DragonFly to prevent segfaults.Michael Neumann-0/+2
Similar to commits ed015456a114ae907a36af80c06f81ea93182a24 (iOS) and e3b414d8612314e74e2b0ebde1ed5c6997d28e8d (Android)
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-10/+13
2016-03-30rename `rustc_const_eval` to `rustc_const_math`Oliver Schneider-1/+1
2016-03-29Auto merge of #32593 - alexcrichton:fix-i586-msvc, r=brsonbors-2/+2
mk: A few build fixes for i586-pc-windows-msvc Detect the triple in the configure script for probing MSVC shenanigans and also be sure to use `llvm-config` from the build host and not the target when configuring compiler-rt.
2016-03-29Auto merge of #32576 - alexcrichton:metadata-for-our-crates, r=brsonbors-9/+5
mk: Fix cross-host builds The change in b20e748 had the unintended consequence of breaking cross-host builds as we apparently relied on the incorrect definition of this variable in the makefiles. That change, however, was required to get tests passing so we couldn't just revert it. This commit fixes the underlying bug by leaving the "more correct" definition of `LD_LIBRARY_PATH_ENV_TARGETDIR` (also fixing it with a hardcoded reference to `CFG_BUILD`) and updating the `RPATH_VAR` definition below. Turned out we already had special-casing logic for passing `--cfg stage1` during the well-we-print-this-as-stage0 build of a cross-host. That logic was just updated to pull from a different variable as opposed to relying on the definition of that variable to accommodate this. Closes #32568
2016-03-29mk: A few build fixes for i586-pc-windows-msvcAlex Crichton-2/+2
Detect the triple in the configure script for probing MSVC shenanigans and also be sure to use `llvm-config` from the build host and not the target when configuring compiler-rt.
2016-03-29mk: move rustc_const_eval to RUSTC_CRATES where it belongs.Eduard Burtescu-2/+3
2016-03-29rustc_platform_intrinsics: remove unused rustc dependency.Eduard Burtescu-1/+1
2016-03-29Remove unnecessary dependencies on rustc_llvm.Eduard Burtescu-2/+2