summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2016-04-01Auto merge of #32544 - alexcrichton:rustbuild-dist-libtest, r=brsonbors-0/+1
rustbuild: Fix dist for non-host targets The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-04-01rustbuild: Fix dist for non-host targetsAlex Crichton-0/+1
The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-03-29rustc_platform_intrinsics: remove unused rustc dependency.Eduard Burtescu-2/+1
2016-03-24remove broken configSteve Klabnik-4/+0
Fixes #32412
2016-03-15rustc: Improve compile time of platform intrinsicsAlex Crichton-23/+48
This commit improves the compile time of `rustc_platform_intrinsics` from 23s to 3.6s if compiling with `-O` and from 77s to 17s if compiling with `-O -g`. The compiled rlib size also drops from 3.1M to 1.2M. The wins here were gained by removing the destructors associated with `Type` by removing the internal `Box` and `Vec` indirections. These destructors meant that a lot of landing pads and extra code were generated to manage the runtime representations. Instead everything can basically be statically computed and shoved into rodata, so all we need is a giant string compare to lookup what's what. Closes #28273
2016-03-13Define AVX blend intrinsicsRuud van Asseldonk-0/+7
This defines the `_mm256_blendv_pd` and `_mm256_blendv_ps` intrinsics. The `_mm256_blend_pd` and `_mm256_blend_ps` intrinsics are not available as LLVM intrinsics. In Clang they are implemented using the shufflevector builtin. Intel reference: https://software.intel.com/en-us/node/524070.
2016-03-13Define AVX comparison intrinsicsRuud van Asseldonk-0/+7
This defines `_mm256_cmp_pd` and `_mm256_cmp_ps`. Intel reference: https://software.intel.com/en-us/node/524075.
2016-03-09Define AVX conversion intrinsicsRuud van Asseldonk-0/+56
This defines the following intrinsics: * `_mm256_cvtepi32_pd` * `_mm256_cvtepi32_ps` * `_mm256_cvtpd_epi32` * `_mm256_cvtpd_ps` * `_mm256_cvtps_epi32` * `_mm256_cvtps_pd` * `_mm256_cvttpd_epi32` * `_mm256_cvttps_epi32` Intel reference: https://software.intel.com/en-us/node/514130.
2016-03-09Define AVX broadcast intrinsicsRuud van Asseldonk-0/+7
This defines `_mm256_broadcast_ps` and `_mm256_broadcast_pd`. The `_ss` and `_sd` variants are not supported by LLVM. In Clang these intrinsics are implemented as inline functions in C++. Intel reference: https://software.intel.com/en-us/node/514144. Note: the argument type should really be "0hPc" (a pointer to a vector of half the width), but internally the LLVM intrinsic takes a pointer to a signed integer, and for any other type LLVM will complain. This means that a transmute is required to call these intrinsics. The AVX2 broadcast intrinsics `_mm256_broadcastss_ps` and `_mm256_broadcastsd_pd` are not available as LLVM intrinsics. In Clang they are implemented using the shufflevector builtin.
2016-03-07Auto merge of #29734 - Ryman:whitespace_consistency, r=Aatchbors-2/+2
libsyntax: be more accepting of whitespace in lexer Fixes #29590. Perhaps this may need more thorough testing? r? @Aatch
2016-03-05Update platform intrinsic generator scriptRuud van Asseldonk-3/+3
The file it generates had been modified, but instead the generator should have been modified, and the file regenerated. This merges the modifications into the template in the generator.
2016-03-05Define x86 fused multiply-add intrinsicsRuud van Asseldonk-0/+47
This defines the following intrinsics for 128 and 256 bit vectors of f32 and f64: * `fmadd` * `fmaddsub` * `fmsub` * `fmsubadd` * `fnmadd` * `fnmsub` The `_sd` and `_ss` variants are not included yet. Intel intrinsic reference: https://software.intel.com/en-us/node/523929 The intrinsics there are listed under AVX2, but in the Intel Intrinsic Guide they are part of the "FMA" technology, and LLVM puts them under FMA, not AVX2.
2016-02-23mk: Tweak tidy script to work on Windows pythonAlex Crichton-2/+5
The MinGW-based Python implementations would automatically do this, but if we want to use Python from the official downloads our usage of `/` instead of `\` can wreak havoc. In a few select locations just use `os.path.normpath` do do the conversions properly for us.
2016-02-16Auto merge of #31672 - semarie:rmake-cxx, r=alexcrichtonbors-0/+1
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-0/+1
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-16Add lint to check that all crates have #![unstable]Keith Yeung-0/+18
2016-02-14Auto merge of #31642 - rkruppe:rm-regex-script, r=alexcrichtonbors-109/+0
This file was probably forgotten when libregex moved out of tree. The rust-lang-nursery/regex repo has a nigh-identical file in its script/ folder.
2016-02-13Add LLVM ModulePass regression test using run-make.Corey Farwell-0/+2
Part of #31185
2016-02-13Remove a regex-related scriptRobin Kruppe-109/+0
This file was probably forgotten when libregex moved out of tree. The rust-lang-nursery/regex repo has a nigh-identical file in its script/ folder.
2016-02-11Add a Cargo-based build systemAlex Crichton-1/+1
This commit is the start of a series of commits which start to replace the makefiles with a Cargo-based build system. The aim is not to remove the makefiles entirely just yet but rather just replace the portions that invoke the compiler to do the bootstrap. This commit specifically adds enough support to perform the bootstrap (and all the cross compilation within) along with generating documentation. More commits will follow up in this series to actually wire up the makefiles to call this build system, so stay tuned!
2016-02-06Auto merge of #31410 - rkruppe:issue31109, r=pnkfelixbors-21/+49
Issue #31109 uncovered two semi-related problems: * A panic in `str::parse::<f64>` * A panic in `rustc::middle::const_eval::lit_to_const` where the result of float parsing was unwrapped. This series of commits fixes both issues and also drive-by-fixes some things I noticed while tracking down the parsing panic.
2016-02-04drive-by doc fixesRobin Kruppe-5/+6
2016-02-04Add the kind of input from #31109 to the expensive tests (not run by default)Robin Kruppe-16/+43
2016-02-03Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichtonbors-1/+2
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-01-31show location of unused error codesAlex Burka-1/+1
2016-01-31Rename sunos to solarisNikita Baksalyar-1/+1
2016-01-31Add Illumos supportNikita Baksalyar-1/+2
2016-01-29Add check for unused error codesggomez-3/+50
2016-01-21etc: Remove old num/libc generation codeAlex Crichton-369/+0
2016-01-21etc: Remove the mingw-fix-include directoryAlex Crichton-69/+0
This isn't used anywhere
2016-01-21etc: Remove old mklldef.py scriptAlex Crichton-25/+0
The compiler has since gained better support for this, so the script is no longer necessary
2016-01-16libsyntax: accept only whitespace with the PATTERN_WHITE_SPACE propertyKevin Butler-2/+2
This aligns with unicode recommendations and should be stable for all future unicode releases. See http://unicode.org/reports/tr31/#R3. This renames `libsyntax::lexer::is_whitespace` to `is_pattern_whitespace` so potentially breaks users of libsyntax.
2016-01-13Auto merge of #30639 - rkruppe:dec2flt-fastpath-tables, r=alexcrichtonbors-6/+29
Add tables of small powers of ten used in the fast path. The tables are redundant: We could also use the big, more accurate table and round the value to the correct type (in fact we did just that before this commit). However, the rounding is extra work and slows down the fast path. Because only very small exponents enter the fast path, the table and thus the space overhead is negligible. Speed-wise, this is a clear win on a [benchmark] comparing the fast path to a naive, hand-optimized, inaccurate algorithm. Specifically, this change narrows the gap from a roughly 5x difference to a roughly 3.4x difference. [benchmark]: https://gist.github.com/Veedrac/dbb0c07994bc7882098e
2016-01-12Speed up dec2flt fast path with additional tables.Robin Kruppe-6/+29
Add tables of small powers of ten used in the fast path. The tables are redundant: We could also use the big, more accurate table and round the value to the correct type (in fact we did just that before this commit). However, the rounding is extra work and slows down the fast path. Because only very small exponents enter the fast path, the table and thus the space overhead is negligible. Speed-wise, this is a clear win on a [benchmark] comparing the fast path to a naive, hand-optimized, inaccurate algorithm. Specifically, this change narrows the gap from a roughly 5x difference to a roughly 3.4x difference. [benchmark]: https://gist.github.com/Veedrac/dbb0c07994bc7882098e
2016-01-04Improve the range comparisonAndrea Canciani-3/+3
As mentioned in #29734, the range comparison closure can be improved. The LLVM IR and the assembly from the new version are much simpler and unfortunately we cannot rely on the compiler to optimise this much, as it would need to know that `lo <= hi`. Besides from simpler code, there might also be a performance advantage, although it is unlikely to appear on benchmarks, as we are doing a binary search, which should always involve few comparisons. The code is available on the playpen for ease of comparison: http://is.gd/4raMmH
2016-01-04Reuse standard methodsAndrea Canciani-10/+1
Do not hand-code `Result::ok` or `cmp` in tables.rs.
2016-01-04Improve formatting of tables.rsAndrea Canciani-3/+3
Make unicode.py generate a tables.rs which is more conformant to usual Rust formatting (as per `rustfmt`).
2016-01-04Cleanup unicode.pyAndrea Canciani-115/+0
The methods related to char width are dead code since 464cdff102993ff1900eebbf65209e0a3c0be0d5; remove them.
2015-12-25update valgrind suppressionsTamir Duberstein-55/+25
2015-12-13Better support for `--llvm-root`.Richard Diamond-4/+20
This handles cases when the LLVM used isn't configured will the 'usual' targets. Also, cases where LLVM is shared are also handled (ie with `LD_LIBRARY_PATH` etc).
2015-12-10Improve `htmldocck.py` error messagesmitaa-54/+86
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-3/+0
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-02Remove AUTHORS.txt and add-authors.shBrian Anderson-37/+0
Keeping this file up to date requires hours of work every release, even with the script. It is a fool's errand and we shall not do it any longer.
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-1/+1
2015-11-14AUTHORS and .mailmap cleanuparcnmx-2/+2
2015-11-10Auto merge of #29699 - tamird:valgrind-supp, r=alexcrichtonbors-475/+140
Quite a bit of cruft in the valgrind suppressions. I started from a clean slate and found a few unique failures; this commit also moves the tests "fixed" by these suppressions into run-pass-valgrind.
2015-11-09std: Migrate to the new libcAlex Crichton-1/+2
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-11-08valgrind: update suppressions and move interesting testsTamir Duberstein-475/+140
2015-11-07Make sure rsbegin.o and rsend.o get packaged with target lib artifacts.Vadim Chugunov-4/+0
Also, unified libc startup objects finding logic with that of the `-musl` target, since conceptually they were doing the same thing.
2015-10-31Windows: Move target libraries to $rustroot/lib/rustlib/... - for symmetry ↵Vadim Chugunov-3/+7
with all other platforms.