Commit Graph

118 Commits

Author SHA1 Message Date
Matthias Krüger 1c0561aca6
Rollup merge of #101072 - tmandry:llvm-is-vanilla, r=Mark-Simulacrum
bootstrap: Add llvm-has-rust-patches target option

This is so you can check out an upstream commit in src/llvm-project and
have everything just work.

This simplifies the logic in `is_rust_llvm` a bit; it doesn't need to
check for download-ci-llvm because we would have already errored if both
that and llvm-config were specified on the host platform.
2022-09-01 21:37:09 +02:00
Tyler Mandry 73958fdf14 Ignore cargo target folder in src/bootstrap
Needed after changes in #97513.
2022-08-29 16:23:19 -07:00
Nilstrieb 0c3ed968a2 Add `/build-rust-analyzer/` to .gitignore
To avoid rust-analyzer and rustc having to wait for each other,
the dev guide mentions using another build directory for RA.

We should also put this into the .gitignore, just like the normal `build`.
2022-08-20 21:07:13 +02:00
Joshua Nelson d16187c47f Remove references to `./tmp` in-tree
These used to be used by codegen-units tests, but were switched from manually specifying directories
to just using `// incremental` in https://github.com/rust-lang/rust/pull/89101.
Remove the old references.
2022-06-26 23:25:12 -05:00
Guillaume Gomez ed88e615c4 Add package.json in gitignore 2022-02-01 17:14:59 +01:00
Canop e5cfe844c9 Fix invalid rules in .gitignore
`**node_modules` in a .gitignore is the same than
`*node_modules` or `*****node_modules`.

It matches every file whose name ends with `node_modules`,
including `not_node_modules`.

The intent here was obviously to have `**/node_modules`
which is the same than just `node_modules`.
2021-10-12 15:09:28 +02:00
Guillaume Gomez da6d82e465 Simplify build system for rustdoc-gui test crates 2021-07-12 19:03:59 +02:00
Christiaan Dirkx c0d05d2162 Remove "Version control" 2021-04-22 11:36:12 +02:00
Christiaan Dirkx 3794fc9ce9 Clean up .gitignore 2021-04-22 11:33:19 +02:00
Camelid 68f50c8025
Ignore Vim swap files 2021-03-10 18:28:05 -08:00
Guillaume Gomez fa131845bc Ignore nodejs/npm files 2021-02-21 14:21:38 +01:00
Casey Rodarmor 5fc22f1431
Add a tool to run `x.py` from any subdirectory
This adds a binary called `x` in `src/tools/x`. All it does is check the
current directory and its ancestors for a file called `x.py`, and if it
finds one, runs it.

By installing x, you can easily `x.py` from any subdirectory.

It can be installed globally with `cargo install --path src/tools/x`
2020-11-03 19:40:02 -08:00
Vadim Petrochenkov 10d3f8a484 Move `rustllvm` into `rustc_llvm` 2020-09-09 23:05:43 +03:00
Ben Boeckel 1dc722c292 gitignore: allow target to be a symlink
Following rust-lang/cargo#4944.
2020-03-25 17:30:40 -04:00
Mark Rousskov 064f8885d5 Add unicode table generator 2020-01-14 19:11:15 -05:00
Josh Triplett 00e7ff44ca .gitignore: Don't ignore a file that exists in the repository
.gitignore should not ignore files that exist in the repository. The
ignore of .cargo applies to the committed .cargo directory used in an
example:

$ git ls-files --exclude-standard --ignored
src/test/run-make/thumb-none-qemu/example/.cargo/config

Explicitly un-ignore that file.
2019-12-15 23:17:06 -08:00
Ralf Jung ebc9a1ab10 expand comment 2019-10-21 18:05:48 +02:00
Ralf Jung 55b787e675 keep the root dir clean from debugging 2019-10-21 10:30:35 +02:00
Dylan MacKenzie efcae577bf Ignore DOT files in .gitignore 2019-10-20 11:03:13 -07:00
Mazdak Farrokhzad 83b837a7f9
.gitignore: Explain why `/obj/` is ignored 2019-08-10 10:39:40 +02:00
Mazdak Farrokhzad 87a8c5706d
Explain why `/tmp/` is ignored 2019-08-10 10:01:03 +02:00
Mazdak Farrokhzad 352c6d036f
.gitignore: Readd `/tmp/`
It is produced during `./x.py test`
2019-08-10 08:47:22 +02:00
Ralf Jung 798767ca21 more alphabetical 2019-08-08 19:43:44 +02:00
Ralf Jung 4bde056ed2 tweak ignores 2019-08-08 19:42:46 +02:00
Ralf Jung fcb186d0fe
fix typo in .gitignore
Co-Authored-By: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2019-08-08 11:19:44 +02:00
Ralf Jung 9cea446c6c Cargo.toml is at the root these days 2019-08-08 11:19:09 +02:00
Ralf Jung 58c231dce7 gitignore: remove some things that look ancient 2019-08-08 09:11:32 +02:00
Ralf Jung b9978e9220 explain what we want and what not in .gitignore 2019-08-08 08:49:58 +02:00
Ralf Jung 7c374cf7d2 don't ignore mir_dump folder 2019-08-05 22:30:13 +02:00
Mazdak Farrokhzad 327c54ed02
Rollup merge of #60081 - pawroman:cleanup_unicode_script, r=varkor
Refactor unicode.py script

Hi, I noticed that the `unicode.py` script used some deprecated escapes in regular expressions. E.g. `\d`, `\w`, `\.` will be illegal in the future without "raw strings". This is now fixed. I have also cleaned up the script quite a bit.

## Escape deprecation

OK (note the `r`):
`re.compile(r"\d")`

Deprecated (from Python 3.6 onwards, see [here][link1] and [here][link2]):
`re.compile("\d")`.

[link1]: https://docs.python.org/3.6/whatsnew/3.6.html#deprecated-python-behavior
[link2]: https://bugs.python.org/issue27364

This was evident running the script using Python 3.7 like so:

```
$ python3 -Wall unicode.py
unicode.py:227: DeprecationWarning: invalid escape sequence \w
  re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)")
unicode.py:228: DeprecationWarning: invalid escape sequence \.
  re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
unicode.py:453: DeprecationWarning: invalid escape sequence \d
  pattern = "for Version (\d+)\.(\d+)\.(\d+) of the Unicode"
```

The documentation states that
> A backslash-character pair that is not a valid escape sequence now generates a DeprecationWarning. Although this will eventually become a SyntaxError, that will not be for several Python releases.

## Testing

To test my changes, I had to add support for choosing the Unicode version to use. The script will default to latest release (which is 12.0.0 at the moment, repo has 11.0.0 checked in).

The script generates the exact same output for version 11.0.0 with Python 2.7 and 3.7 and no longer generates any deprecation warnings:

```
$ python3 -Wall unicode.py -v 11.0.0
Using Unicode version: 11.0.0
Regenerated tables.rs.
$ git diff tables.rs
$ python2 -Wall unicode.py -v 11.0.0
Using Unicode version: 11.0.0
Regenerated tables.rs.
$ git diff tables.rs
$ python2 --version
Python 2.7.16
$ python3 --version
Python 3.7.3
```

## Extra functionality

Furthermore, the script will check and download the latest Unicode version by default (without the `-v` argument). The `--help` is below:

```
$ ./unicode.py --help
usage: unicode.py [-h] [-v VERSION]

Regenerate Unicode tables (tables.rs).

optional arguments:
  -h, --help            show this help message and exit
  -v VERSION, --version VERSION
                        Unicode version to use (if not specified, defaults to
                        latest available final release).
```

## Cleanups

I have cleaned up the code quite a bit, with Python best practices and code style in mind. I'm happy to provide more details and rationale for all my changes if the reviewers so desire.

One externally visible change is that the Unicode data will now be downloaded into `src/libcore/unicode/downloaded` directory suffixed by Unicode version:

```
$ pwd
.../rust/src/libcore/unicode
$ exa -T downloaded/
downloaded
├── 11.0.0
│  ├── DerivedCoreProperties.txt
│  ├── DerivedNormalizationProps.txt
│  ├── PropList.txt
│  ├── ReadMe.txt
│  ├── Scripts.txt
│  ├── SpecialCasing.txt
│  └── UnicodeData.txt
└── 12.0.0
   ├── DerivedCoreProperties.txt
   ├── DerivedNormalizationProps.txt
   ├── PropList.txt
   ├── ReadMe.txt
   ├── Scripts.txt
   ├── SpecialCasing.txt
   └── UnicodeData.txt
```
2019-07-06 22:14:33 +02:00
Oliver Scherer d85e866c0d Ignore .vscode even if it is a symlink 2019-05-25 10:07:01 +02:00
Paweł Romanowski 89feb6d5fd Clean up unicode.py script 2019-04-18 15:30:50 +02:00
Oliver Scherer 67ede4cb7f Ignore some IDE-local files 2019-01-08 15:21:06 +01:00
Ralf Jung 6628d39f4a move file-extension based .gitignore down to src/ 2018-08-28 20:04:52 +02:00
David Wood c645ecd0a6
Added new lines to .gitignore. 2018-07-22 14:14:39 +01:00
varkor 9802300302 Update .gitignore for libstd_unicode 2018-05-21 18:57:54 +01:00
toidiu 6a229cbfac Implement inferring outlives requirements for references, structs, enum, union, and projection types. added a feature gate and tests for these scenarios. 2018-04-12 13:52:06 -04:00
Tamir Duberstein 658ea389fd
rustc_llvm: remove stale references
...that were removed in 77c3bfa742.
2017-11-28 18:15:28 -05:00
bjorn3 cba53f0be5 Allow writing metadata without llvm 2017-09-23 12:54:53 +02:00
Stepan Koltsov affe6e148c Ignore *.iml files
... which are IntelliJ IDEA module files. (`.idea` is IDEA project files.)
2017-06-30 23:18:47 +03:00
kennytm 57356b36fc
Ignore some folders.
- /src/target -- created when trying to directly `cargo build` on a single
  package.
2017-06-02 01:14:25 +08:00
Steve Klabnik 626cf3a263 include everything in the vendor directory 2017-02-13 13:41:17 -05:00
Simon Sapin 3b208d2dac 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.

 ## 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-03 08:28:58 +01:00
Alex Crichton 31a8638e5e rustbuild: Tweak for vendored dependencies
A few changes are included here:

* The `winapi` and `url` dependencies were dropped. The source code for these
  projects is pretty weighty, and we're about to vendor them, so let's not
  commit to that intake just yet. If necessary we can vendor them later but for
  now it shouldn't be necessary.

* The `--frozen` flag is now always passed to Cargo, obviating the need for
  tidy's `cargo_lock` check.

* Tidy was updated to not check the vendor directory

Closes #34687
2016-11-08 07:32:05 -08:00
Vadim Chugunov 751d43ade4 Ignore VS Code settings directory 2016-08-05 00:17:20 -07:00
bors 5d12502d3a Auto merge of #33617 - sanmai-NL:gitignore_IntelliJ, r=nikomatsakis
IntelliJ support, ordering, cleanup
2016-05-17 04:02:15 -07:00
Scott Olson ef53fa76df rustbuild: Ignore user config.toml file. 2016-05-14 01:16:08 -06:00
Sander Maijers 650855322b
IntelliJ support, ordering, cleanup 2016-05-13 19:18:59 +02:00
Alex Crichton de1838148c Add /obj/ to .gitignore
This is the build directory our buildbots use, and right now the bots are
running `git clean -f -f -d` to remove all untracked files between runs and this
is accidentally deleting `obj`, so we're building LLVM a lot.

Hopefully this keeps the bots caching `obj` so we can clean it out manually and
leave LLVM around.
2016-04-13 17:46:01 -07:00
Robin Kruppe e4ef60c6c5 Add *.pdb to .gitignore 2016-02-13 20:24:31 +01:00