about summary refs log tree commit diff
path: root/mk
AgeCommit message (Collapse)AuthorLines
2016-03-29mk: Fix cross-host buildsAlex Crichton-9/+5
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-28mk: Add `-C metadata` for compiling crates we shipAlex Crichton-0/+1
This should re-enable all external builds of crates with the same name. Right now Cargo doesn't pass `-C metadata` for the top-level library being compiled, so if that library is called `libc`, for example, then it won't be able to link to the standard library which *also* has a `libc` library compiled without `-C metadata`. This can result in naming conflicts which need to be resolved. By passing `-C metadata` to the in-tree crates we ship it should add some extra salt to all symbol names to ensure that they don't collide.
2016-03-27mk: add missing dep compiletest=>logAlex Burka-1/+1
2016-03-27mk: point target LD_LIBRARY_PATH at current stageAlex Burka-1/+1
2016-03-27rustc_trans: move save to librustc_save_analysis.Eduard Burtescu-2/+3
2016-03-25Salt test crates in buildsystem.Michael Woerister-1/+1
2016-03-21scaffolding for borrowck on MIR.Felix S. Klock II-1/+1
emit (via debug!) scary message from `fn borrowck_mir` until basic prototype is in place. Gather children of move paths and set their kill bits in dataflow. (Each node has a link to the child that is first among its siblings.) Hooked in libgraphviz based rendering, including of borrowck dataflow state. doing this well required some refactoring of the code, so I cleaned it up more generally (adding comments to explain what its trying to do and how it is doing it). Update: this newer version addresses most review comments (at least the ones that were largely mechanical changes), but I left the more interesting revisions to separate followup commits (in this same PR).
2016-03-19Use explicit -march flags in the i586 mk filepetevine-3/+3
`-march` should definitely go last, after the environment C(XX)FLAGS, or it's back to square one. This fixes cross-compilation issues on x86_64.
2016-03-17Add -Z orbit for forcing MIR for everything, unless #[rustc_no_mir] is used.Eduard Burtescu-0/+5
2016-03-14Auto merge of #30587 - oli-obk:eager_const_eval2, r=nikomatsakisbors-6/+10
typestrong const integers ~~It would be great if someone could run crater on this PR, as this has a high danger of breaking valid code~~ Crater ran. Good to go. ---- So this PR does a few things: 1. ~~const eval array values when const evaluating an array expression~~ 2. ~~const eval repeat value when const evaluating a repeat expression~~ 3. ~~const eval all struct and tuple fields when evaluating a struct/tuple expression~~ 4. remove the `ConstVal::Int` and `ConstVal::Uint` variants and replace them with a single enum (`ConstInt`) which has variants for all integral types * `usize`/`isize` are also enums with variants for 32 and 64 bit. At creation and various usage steps there are assertions in place checking if the target bitwidth matches with the chosen enum variant 5. enum discriminants (`ty::Disr`) are now `ConstInt` 6. trans has its own `Disr` type now (newtype around `u64`) This obviously can't be done without breaking changes (the ones that are noticable in stable) We could probably write lints that find those situations and error on it for a cycle or two. But then again, those situations are rare and really bugs imo anyway: ```rust let v10 = 10 as i8; let v4 = 4 as isize; assert_eq!(v10 << v4 as usize, 160 as i8); ``` stops compiling because 160 is not a valid i8 ```rust struct S<T, S> { a: T, b: u8, c: S } let s = S { a: 0xff_ff_ff_ffu32, b: 1, c: 0xaa_aa_aa_aa as i32 }; ``` stops compiling because `0xaa_aa_aa_aa` is not a valid i32 ---- cc @eddyb @pnkfelix related: https://github.com/rust-lang/rfcs/issues/1071
2016-03-12mk: Fix `make dist`Alex Crichton-2/+1
With the movement of the erro-index-generator and rustbook, need to update the rules in `make dist`.
2016-03-11Auto merge of #32133 - alexcrichton:linkchecker, r=brsonbors-2/+2
Add a link validator to rustbuild This commit was originally targeted at just adding a link checking script to the rustbuild system. This ended up snowballing a bit to extend rustbuild to be amenable to various tools we have as part of the build system in general. There's a new `src/tools` directory which has a number of scripts/programs that are purely intended to be used as part of the build system and CI of this repository. This is currently inhabited by rustbook, the error index generator, and a new linkchecker script added as part of this PR. I suspect that more tools like compiletest, tidy scripts, snapshot scripts, etc will migrate their way into this directory over time. The commit which adds the error index generator shows the steps necessary to add new tools to the build system, namely: 1. New steps are defined for building the tool and running the tool 2. The dependencies are configured 3. The steps are implemented In terms of the link checker, these commits do a few things: * A new `src/tools/linkchecker` script is added. This will read an entire documentation tree looking for broken relative links (HTTP links aren't followed yet). * A large number of broken links throughout the documentation were fixed. Many of these were just broken when viewed from core as opposed to std, but were easily fixed. * A few rustdoc bugs here and there were fixed
2016-03-10Auto merge of #32034 - alexcrichton:old-x86-msvc, r=aturonbors-0/+28
rustc: Add an i586-pc-windows-msvc target Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is sometimes a desire to compile for x86 Windows as well where SSE2 is disabled. This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant for Windows as well. This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit Windows due to users having CPUs that don't support SSE2 instructions. It was requested that we could have non-SSE2 builds of the standard library available so they could continue to use vanilla releases and nightlies. [ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
2016-03-10typestrong constant integersOliver Schneider-6/+10
2016-03-08rustbuild: Add the error-index-generatorAlex Crichton-1/+1
This adds a step and a rule for building the error index as part of rustbuild.
2016-03-08rustbuild: Move rustbook to a `src/tools` directoryAlex Crichton-1/+1
We've actually got quite a few tools that are compiled as part of our build, let's start housing them all in a `tools` directory.
2016-03-08Auto merge of #32009 - alexcrichton:trim-fulldeps, r=brsonbors-11/+16
mk: Distribute fewer TARGET_CRATES Right now everything in TARGET_CRATES is built by default for all non-fulldeps tests and is distributed by default for all target standard library packages. Currenly this includes a number of unstable crates which are rarely used such as `graphviz` and `rbml`> This commit trims down the set of `TARGET_CRATES`, moves a number of tests to `*-fulldeps` as a result, and trims down the dependencies of libtest so we can distribute fewer crates in the `rust-std` packages.
2016-03-07Auto merge of #29734 - Ryman:whitespace_consistency, r=Aatchbors-1/+1
libsyntax: be more accepting of whitespace in lexer Fixes #29590. Perhaps this may need more thorough testing? r? @Aatch
2016-03-07mk: Distribute fewer TARGET_CRATESAlex Crichton-11/+16
Right now everything in TARGET_CRATES is built by default for all non-fulldeps tests and is distributed by default for all target standard library packages. Currenly this includes a number of unstable crates which are rarely used such as `graphviz` and `rbml`> This commit trims down the set of `TARGET_CRATES`, moves a number of tests to `*-fulldeps` as a result, and trims down the dependencies of libtest so we can distribute fewer crates in the `rust-std` packages.
2016-03-07Auto merge of #32061 - infinity0:master, r=alexcrichtonbors-2/+2
Adding -Wno-error is more reliable and simple than trying to modify existing flags. We've been using this in Debian already for the past few releases. Making this change also encourages future maintainers towards "best practises". Also take the opportunity to use the same method at all places in the file.
2016-03-05More reliable and consistent method of cancelling -Werror*Angus Lees-2/+2
Adding -Wno-error is more reliable and simple than trying to modify existing flags. We've been using this in Debian already for the past few releases. Making this change also encourages future maintainers towards "best practises". Also take the opportunity to use the same method at all places in the file.
2016-03-04std: Update jemalloc again to the 4.* trackAlex Crichton-4/+0
2016-03-04rustc: Add an i586-pc-windows-msvc targetAlex Crichton-0/+28
Similarly to #31629 where an i586-unknown-linux-gnu target was added, there is sometimes a desire to compile for x86 Windows as well where SSE2 is disabled. This commit mirrors the i586-unknown-linux-gnu target and simply adds a variant for Windows as well. This is motivated by a recent [Gecko bug][ff] where crashes were seen on 32-bit Windows due to users having CPUs that don't support SSE2 instructions. It was requested that we could have non-SSE2 builds of the standard library available so they could continue to use vanilla releases and nightlies. [ff]: https://bugzilla.mozilla.org/show_bug.cgi?id=1253202
2016-03-01Bump to 1.9Brian Anderson-1/+1
2016-02-26Auto merge of #31846 - alexcrichton:better-disable-jemallc, r=brsonbors-20/+68
The `--disable-jemalloc` configure option has a failure mode where it will create a distribution that is not compatible with other compilers. For example the nightly for Linux will assume that it will link to jemalloc by default as an allocator for executable crates. If, however, a standard library is used which was built via `./configure --disable-jemalloc` then this will fail because the jemalloc crate wasn't built. While this seems somewhat reasonable as a niche situation, the same mechanism is used for disabling jemalloc for platforms that just don't support it. For example if the rumprun target is compiled then the sibiling Linux target *also* doesn't have jemalloc. This is currently a problem for our cross-build nightlies which build many targets. If rumprun is also built, it will disable jemalloc for all targets, which isn't desired. This commit moves the platform-specific disabling of jemalloc as hardcoded logic into the makefiles that is scoped per-platform. This way when configuring multiple targets **without the `--disable-jemalloc` option specified** all targets will get jemalloc as they should.
2016-02-25mk: Move disable-jemalloc logic into makefilesAlex Crichton-20/+68
The `--disable-jemalloc` configure option has a failure mode where it will create a distribution that is not compatible with other compilers. For example the nightly for Linux will assume that it will link to jemalloc by default as an allocator for executable crates. If, however, a standard library is used which was built via `./configure --disable-jemalloc` then this will fail because the jemalloc crate wasn't built. While this seems somewhat reasonable as a niche situation, the same mechanism is used for disabling jemalloc for platforms that just don't support it. For example if the rumprun target is compiled then the sibiling Linux target *also* doesn't have jemalloc. This is currently a problem for our cross-build nightlies which build many targets. If rumprun is also built, it will disable jemalloc for all targets, which isn't desired. This commit moves the platform-specific disabling of jemalloc as hardcoded logic into the makefiles that is scoped per-platform. This way when configuring multiple targets **without the `--disable-jemalloc` option specified** all targets will get jemalloc as they should.
2016-02-26Auto merge of #31749 - nikomatsakis:compiletest-subdir, r=alexcrichtonbors-15/+16
You can now group tests into directories like `run-pass/borrowck` or `compile-fail/borrowck`. By default, all `.rs` files within any directory are considered tests: to ignore some directory, create a placeholder file called `compiletest-ignore-dir` (I had to do this for several existing directories). r? @alexcrichton cc @brson
2016-02-25Rollup merge of #31800 - alexcrichton:armv6-plz, r=brsonManish Goregaokar-4/+4
Right now the compiler's we're using actually default to armv7/thumb2 I believe, so this should help push them back to what the arm-unknown-linux-* targets are for. This at least matches that clang does for the `arm-unknown-linux-gnueabihf` target which is to map it to an armv6 architecture. Closes #31787
2016-02-24Recurse to find test files in any subdirectory of the base path. If aNiko Matsakis-15/+16
subdirectory contains `compiletest-ignore-dir`, then ignore it.
2016-02-22Eradicate last vestiges of armv6petevine-1/+1
2016-02-20mk: Add missing rustbuild dirs to `dist`Alex Crichton-0/+3
Forgot to add a few directories to `make dist` so `--enable-rustbuild` can continue to work. Closes #31801
2016-02-20mk: Specify armv6 for gcc on arm-unknown-linux-*Alex Crichton-4/+4
Right now the compiler's we're using actually default to armv7/thumb2 I believe, so this should help push them back to what the arm-unknown-linux-* targets are for. This at least matches that clang does for the `arm-unknown-linux-gnueabihf` target which is to map it to an armv6 architecture. Closes #31787
2016-02-16Auto merge of #31672 - semarie:rmake-cxx, r=alexcrichtonbors-1/+2
use CXX value found at configure time inside run-make tests. it permits OpenBSD to pass llvm-module-pass test (which use CXX variable). r? @alexcrichton
2016-02-16pass CXX to run-makeSébastien Marie-1/+2
use CXX value found at configure time inside run-make tests. it permits OpenBSD to pass llvm-module-pass test (which use CXX variable).
2016-02-14Rename `error-index-generator` to `error_index_generator`Dirk Gadsden-9/+9
This is because the tool compiler passes the name of the tool as a command line `--cfg`. The improved session config parser is stricter and no longer permits invalid meta items (such as "error-index-generator").
2016-02-14std: Stop prefixing jemalloc symbolsAlex Crichton-2/+10
Now that we properly only link in jemalloc when building executables, we have far less to worry about in terms of polluting the global namespace with the `free` and `malloc` symbols on Linux. This commit will primarily allow LLVM to use jemalloc so the compiler will only be using one allocator overall. Locally this took compile time for libsyntax from 95 seconds to 89 (a 6% improvement).
2016-02-14Auto merge of #31391 - frewsxcv:test, r=alexcrichtonbors-1/+2
Part of #31185
2016-02-13Add LLVM ModulePass regression test using run-make.Corey Farwell-1/+2
Part of #31185
2016-02-13Add a new i586 Linux targetpetevine-0/+23
2016-02-12Auto merge of #30726 - GuillaumeGomez:compile-fail, r=brsonbors-11/+41
r? @brson cc @alexcrichton I still need to add error code explanation test with this, but I can't figure out a way to generate the `.md` files in order to test example source codes. Will fix #27328.
2016-02-11rustc_back: Fix disabling jemallocAlex Crichton-2/+1
When building with Cargo we need to detect `feature = "jemalloc"` to enable jemalloc, so propagate this same change to the build system to pass the right `--cfg` argument.
2016-02-11rustc_llvm: Tweak how initialization is performedAlex Crichton-1/+1
Refactor a bit to have less repetition and #[cfg] and try to bury it all inside of a macro.
2016-02-09Allow registering MIR-passes through compiler pluginsOliver Schneider-1/+1
2016-02-09Update MakefileGuillaume Gomez-11/+41
2016-02-06Add support for i686-unknown-linux-muslBrian Anderson-0/+31
2016-02-06Add the asmjs-unknown-emscripten triple. Add cfgs to libs.Brian Anderson-0/+42
Backtraces, and the compilation of libbacktrace for asmjs, are disabled. This port doesn't use jemalloc so, like pnacl, it disables jemalloc *for all targets* in the configure file. It disables stack protection.
2016-02-05Auto merge of #31388 - gmbonnet:compiler-rt-werror, r=alexcrichtonbors-1/+1
Without this patch, `compiler-rt` fails to build when the `CFLAGS` environment variable contains a `-Werror=*` flag (for example `-Werror=format-security`). The build system was removing only the `-Werror` part from the flag, thus passing an unrecognized `=*` (for example `=format-security`) argument to gcc.
2016-02-03Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichtonbors-0/+23
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846. Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138 Here's a snapshot required to build a stage0 compiler: https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz It passes all checks from `make check`. There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated. Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409 Thanks! r? @brson
2016-02-03compiler-rt: Handle -Werror=* arguments in CFLAGSGuillaume Bonnet-1/+1
2016-02-01Revert "mk: fix some undefined variable warnings"Alex Crichton-66/+57
This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.