summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2017-07-18Remove all packaging support for the RLSAlex Crichton-53/+29
2017-06-13Merge crate `collections` into `alloc`Murarth-8/+8
2017-06-09Auto merge of #42278 - gentoo90:gdb-pretty-printers, r=michaelwoeristerbors-5/+48
Fix GDB pretty-printer for tuples and pointers Names of children should not be the same, because GDB uses them to distinguish the children. |Before|After| |---|---| |![tuples_before](https://cloud.githubusercontent.com/assets/1297574/26527639/5d6cf10e-43a0-11e7-9498-abfcddb08055.png)|![tuples_after](https://cloud.githubusercontent.com/assets/1297574/26527655/9699233a-43a0-11e7-83c6-f58f713b51a0.png)| `main.rs` ```rust enum Test { Zero, One(i32), Two(i32, String), Three(i32, String, Vec<String>), } fn main() { let tuple = (1, 2, "Asdfgh"); let zero = Test::Zero; let one = Test::One(10); let two = Test::Two(42, "Qwerty".to_owned()); let three = Test::Three(9000, "Zxcvbn".to_owned(), vec!["lorem".to_owned(), "ipsum".to_owned(), "dolor".to_owned()]); println!(""); // breakpoint here } ``` `launch.json` ```json { "version": "0.2.0", "configurations": [ { "type": "gdb", "request": "launch", "gdbpath": "rust-gdb", "name": "Launch Program", "valuesFormatting": "prettyPrinters", //this requires plugin Native Debug >= 0.20.0 "target": "./target/debug/test_pretty_printers", "cwd": "${workspaceRoot}" } ] } ```
2017-06-09Add compat_str() which works with unicode in both Python 2 and 3gentoo90-1/+6
GDB can be built with Python 2 or with Python 3
2017-06-07Change `llvm.neon.*` to `llvm.arm.neon.*` in the mapping for platform intrinsicsHenri Sivonen-1/+1
This avoids linker errors when using platform intrinsics on 32-bit ARM with NEON. Fixes rust-lang-nursery/simd#10.
2017-06-02Add separate GDB pretty-printer for empty structsgentoo90-2/+12
Use a class without children() method for printing empty structs. Presence of this method makes GDB's variable objects interface act like if the struct had children.
2017-06-02Add GDB pretty-printer for OsStringgentoo90-0/+27
2017-05-30Fix 'invalid literal for int()' exception with unicode in pretty-printersgentoo90-1/+1
str() can't handle unicode strings
2017-05-30Fix 'invalid literal for int()' exception in pretty-printersgentoo90-1/+2
Some pointers values include additional info, so they can't be parsed with int().
2017-05-29Fix formatting issues in Distribution.xmlEdward Yang-33/+33
2017-05-29Add RLS to .pkg installerEdward Yang-0/+11
2017-05-29Add RLS to .exe and .msi installersEdward Yang-0/+13
2017-05-28Fix GDB pretty-printer for tuplesgentoo90-2/+2
Names of children should not be the same, because GDB uses them to distinguish the children.
2017-05-14Rewrite make-win-dist.py in RustWesley Wiser-126/+0
Fixes #41568
2017-05-07Add support for Hexagon v60 HVX intrinsicsMichael Wu-0/+1326
2017-05-04Move unicode Python script into libstd_unicode crate.Corey Farwell-591/+0
The only place this Python script is used is inside the libstd_unicode crate, so lets move it there.
2017-04-28Auto merge of #41575 - alexcrichton:android-qemu-server, r=TimNNbors-35/+0
travis: Parallelize tests on Android Currently our slowest test suite on android, run-pass, takes over 5 times longer than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed add overhead, but not 5x for this kind of workload. One of the slowest parts of the Android process is that *compilation* happens serially. Tests themselves need to run single-threaded on the emulator (due to how the test harness works) and this forces the compiles themselves to be single threaded. Now Travis gives us more than one core per machine, so it'd be much better if we could take advantage of them! The emulator itself is still fundamentally single-threaded, but we should see a nice speedup by sending binaries for it to run much more quickly. It turns out that we've already got all the toos to do this in-tree. The qemu-test-{server,client} that are in use for the ARM Linux testing are a perfect match for the Android emulator. This commit migrates the custom adb management code in compiletest/rustbuild to the same qemu-test-{server,client} implementation that ARM Linux uses. This allows us to lift the parallelism restriction on the compiletest test suites, namely run-pass. Consequently although we'll still basically run the tests themselves in single threaded mode we'll be able to compile all of them in parallel, keeping the pipeline much more full hopefully and using more cores for the work at hand. Additionally the architecture here should be a bit speedier as it should have less overhead than adb which is a whole new process on both the host and the emulator! Locally on an 8 core machine I've seen the run-pass test suite speed up from taking nearly an hour to only taking 5 minutes. I don't think we'll see quite a drastic speedup on Travis but I'm hoping this change can place the Android tests well below 2 hours instead of just above 2 hours. Because the client/server here are now repurposed for more than just QEMU, they've been renamed to `remote-test-{server,client}`. Note that this PR does not currently modify how debuginfo tests are executed on Android. While parallelizable it wouldn't be quite as easy, so that's left to another day. Thankfull that test suite is much smaller than the run-pass test suite.
2017-04-27travis: Parallelize tests on AndroidAlex Crichton-35/+0
Currently our slowest test suite on android, run-pass, takes over 5 times longer than the x86_64 component (~400 -> ~2200s). Typically QEMU emulation does indeed add overhead, but not 5x for this kind of workload. One of the slowest parts of the Android process is that *compilation* happens serially. Tests themselves need to run single-threaded on the emulator (due to how the test harness works) and this forces the compiles themselves to be single threaded. Now Travis gives us more than one core per machine, so it'd be much better if we could take advantage of them! The emulator itself is still fundamentally single-threaded, but we should see a nice speedup by sending binaries for it to run much more quickly. It turns out that we've already got all the tools to do this in-tree. The qemu-test-{server,client} that are in use for the ARM Linux testing are a perfect match for the Android emulator. This commit migrates the custom adb management code in compiletest/rustbuild to the same qemu-test-{server,client} implementation that ARM Linux uses. This allows us to lift the parallelism restriction on the compiletest test suites, namely run-pass. Consequently although we'll still basically run the tests themselves in single threaded mode we'll be able to compile all of them in parallel, keeping the pipeline much more full and using more cores for the work at hand. Additionally the architecture here should be a bit speedier as it should have less overhead than adb which is a whole new process on both the host and the emulator! Locally on an 8 core machine I've seen the run-pass test suite speed up from taking nearly an hour to only taking 6 minutes. I don't think we'll see quite a drastic speedup on Travis but I'm hoping this change can place the Android tests well below 2 hours instead of just above 2 hours. Because the client/server here are now repurposed for more than just QEMU, they've been renamed to `remote-test-{server,client}`. Note that this PR does not currently modify how debuginfo tests are executed on Android. While parallelizable it wouldn't be quite as easy, so that's left to another day. Thankfully that test suite is much smaller than the run-pass test suite. As a final fix I discovered that the ARM and Android test suites were actually running all library unit tests (e.g. stdtest, coretest, etc) twice. I've corrected that to only run tests once which should also give a nice boost in overall cycle time here.
2017-04-26windows: Copy libwinpthread-1.dll into libdir binAlex Crichton-1/+2
Recently we switched from the win32 MinGW toolchain to the pthreads-based toolchain. We ship `gcc.exe` from this toolchain with the `rust-mingw` package in the standard distribution but the pthreads version of `gcc.exe` depends on `libwinpthread-1.dll`. While we're shipping this DLL for the compiler to depend on we're not shipping it for gcc. As a workaround just copy the dll to gcc.exe location and don't attempt to share for now. cc https://github.com/rust-lang/rust/issues/31840#issuecomment-297478538
2017-04-24Adds rust-windbg.cmd scriptAndrew Gaspar-0/+18
2017-04-20Rename environment variable `GDB_CMD` to `RUST_GDB` to prevent ambiguityNicolas Bigaouette-3/+3
2017-04-18Use an (over-writable) environment variable for the `gdb` commandNicolas Bigaouette-1/+4
Instead of hard-coding the command to run, using the environment variable `GDB_CMD` (that defaults to `gdb`) allows using a different debugger than the default `gdb` executable. This gives the possibility to use `cgdb` as the debugger, which provides a nicer user interface. Note that one has to use `GDB_CMD="cgdb --"` to use cgdb (note the trailing `--`) to let cgdb pass the proper arguments to `gdb`.
2017-04-17Remove non-breaking spacesDiggory Blake-4/+4
2017-04-06Auto merge of #40805 - vadimcn:msys-mingw, r=alexcrichtonbors-1/+2
[Windows] Enable building rustc with "pthreads" flavor of mingw. Tested on mingw-w64 packaged with msys2. r? @alexcrichton cc #40123
2017-04-05Reduce a table used for `Debug` impl of `str`.Kang Seonghoon-34/+98
This commit shrinks the size of the aforementioned table from 2,102 bytes to 1,197 bytes. This is achieved by an observation that most u16 entries are common in its upper byte. Specifically: - SINGLETONS now uses two tables, one for (upper byte, lower count) and another for a series of lower bytes. For each upper byte given number of lower bytes are read and compared. - NORMAL now uses a variable length format for the count of "true" codepoints and "false" codepoints (one byte with MSB unset, or two big-endian bytes with the first MSB set). The code size and relative performance roughly remains same as this commit tries to optimize for both. The new table and algorithm has been verified for the equivalence to older ones.
2017-03-30Include libpthread into mingw package.Vadim Chugunov-1/+2
2017-02-15Vec, LinkedList, VecDeque, String, and Option NatVis visualizationsAndrew Gaspar-0/+95
2017-02-14Auto merge of #38561 - nagisa:rdrandseed, r=alexcrichtonbors-0/+54
Add intrinsics & target features for rd{rand,seed} One question is whether or not we want to map feature name `rdrnd` to `rdrand` instead. EDIT: as for use case, I would like to port my rdrand crate from inline assembly to these intrinsics.
2017-02-06Clean our src/etc of old filesAlex Crichton-520/+0
Some of these have long since expired, some are no longer in use now that we've jettisoned the makefiles, but none of them should be needed any more.
2017-01-24rustbuild: Start building --enable-extendedAlex Crichton-0/+962
This commit adds a new flag to the configure script, `--enable-extended`, which is intended for specifying a desire to compile the full suite of Rust tools such as Cargo, the RLS, etc. This is also an indication that the build system should create combined installers such as the pkg/exe/msi artifacts. Currently the `--enable-extended` flag just indicates that combined installers should be built, and Cargo is itself not compiled just yet but rather only downloaded from its location. The intention here is to quickly get to feature parity with the current release process and then we can start improving it afterwards. All new files in this PR inside `src/etc/installer` are copied from the rust-packaging repository.
2017-01-07Auto merge of #38781 - SimonSapin:unishrink, r=alexcrichtonbors-13/+58
Reduce the size of static data in std_unicode::tables `BoolTrie` works well for sets of code points spread out through most of Unicode’s range, but is uses a lot of space for sets with few, mostly low, code points. This switches a few of its instances to a similar but simpler trie data structure. CC @raphlinus, who wrote the original `BoolTrie`. ## Before `size_of::<BoolTrie>()` is 1552, which is added to `table.r3.len() * 8 + t.r5.len() + t.r6.len() * 8`: * `Cc_table`: 1632 * `White_Space_table`: 1656 * `Pattern_White_Space_table`: 1640 * Total: 4928 bytes ## After `size_of::<SmallBoolTrie>()` is 32, which is added to `t.r1.len() + t.r2.len() * 8`: * `Cc_table`: 51 * `White_Space_table`: 273 * `Pattern_White_Space_table`: 193 * Total: 517 bytes ## Difference Every Rust program with `std` statically linked should be about 4 KB smaller.
2017-01-03Reduce the size of static data in std_unicode::tables.Simon Sapin-6/+58
`BoolTrie` works well for sets of code points spread out through most of Unicode’s range, but is uses a lot of space for sets with few, mostly low, code points. This switches a few of its instances to a similar but simpler trie data structure. ## Before `size_of::<BoolTrie>()` is 1552, which is added to `table.r3.len() * 8 + t.r5.len() + t.r6.len() * 8`: * `Cc_table`: 1632 * `White_Space_table`: 1656 * `Pattern_White_Space_table`: 1640 * Total: 4928 bytes ## After `size_of::<SmallBoolTrie>()` is 32, which is added to `t.r1.len() + t.r2.len() * 8`: * `Cc_table`: 51 * `White_Space_table`: 273 * `Pattern_White_Space_table`: 193 * Total: 517 bytes ## Difference Every Rust program with `std` statically linked should be about 4 KB smaller.
2017-01-02Remove some dead Python code.Simon Sapin-7/+0
It was used to measure before/after size in cfaf66c94e29a38cd3264b4a55c85b90213543d9.
2017-01-01Add pretty printing of unions in debuggersPhilip Craig-7/+13
Fixes #37479
2016-12-26PTX supportJorge Aparicio-0/+110
- `--emit=asm --target=nvptx64-nvidia-cuda` can be used to turn a crate into a PTX module (a `.s` file). - intrinsics like `__syncthreads` and `blockIdx.x` are exposed as `"platform-intrinsics"`. - "cabi" has been implemented for the nvptx and nvptx64 architectures. i.e. `extern "C"` works. - a new ABI, `"ptx-kernel"`. That can be used to generate "global" functions. Example: `extern "ptx-kernel" fn kernel() { .. }`. All other functions are "device" functions.
2016-12-22Add intrinsics & target features for rd{rand,seed}Simonas Kazlauskas-0/+54
2016-11-28rustc: rework stability to be on-demand for type-directed lookup.Eduard Burtescu-4/+1
2016-11-18Fix `fmt::Debug` for strings, e.g. for Chinese charactersTobias Bucher-8/+44
The problem occured due to lines like ``` 3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;; 4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;; ``` in `UnicodeData.txt`, which the script previously interpreted as two characters, although it represents the whole range. Fixes #34318.
2016-10-19Add libproc_macro from local rust to stage0Josh Stone-0/+1
This library is now required to run rustc 1.14.0.
2016-09-25Haiku: add support for building on HaikuNiels Sascha Reedijk-1/+1
* Hand rebased from Niels original work on 1.9.0
2016-09-17remove useless semicolon from pythonEitan Adler-12/+12
2016-09-17modern style classesEitan Adler-7/+7
2016-09-17make functions static where possibleEitan Adler-11/+22
2016-09-17Remove unused codeEitan Adler-2/+0
2016-09-17prefer tuple to arrayEitan Adler-2/+2
2016-09-17pep8 prefers triple quoted with double quotesEitan Adler-9/+9
2016-09-17simplify python codeEitan Adler-1/+1
2016-08-31Auto merge of #35585 - Kha:gdb-qualified, r=michaelwoeristerbors-20/+20
gdb: Fix pretty-printing special-cased Rust types gdb trunk now reports fully qualified type names, just like lldb. Move lldb code for extracting unqualified names to shared file. For current releases of gdb, `extract_type_name` should just be a no-op. Fixes #35155
2016-08-23Auto merge of #35748 - michaelwoerister:fix-rust-gdb-py-version-check, r=brsonbors-1/+1
Make version check in gdb_rust_pretty_printing.py more compatible. Some versions of Python don't support the `major` field on the object returned by `sys.version_info`. Fixes #35724 r? @brson
2016-08-22Add sublime-rust to CONFIGS.md.Terry Sun-0/+1