Skip to content

"Rebase" onto master branch of rust-lang/rust #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9,723 commits into from

Conversation

fmckeogh
Copy link

I just cherry-picked the esp-related commits onto the master Rust branch. This means there aren't any release-specific commits to cause rebase issues in the future, or when esp support is upstreamed. I did have to add in a commit as the name of some ABI types changed.

I totally understand if you'd prefer to only rebase onto stable release branches though :)

@fmckeogh fmckeogh changed the title Rebase onto master branch of rust-lang/rust "Rebase" onto master branch of rust-lang/rust Mar 17, 2020
@fmckeogh fmckeogh force-pushed the xtensa-rebase-master branch from db12eb2 to c43f3b9 Compare March 18, 2020 07:59
@fmckeogh
Copy link
Author

I just rebased, easy as pie :D

$ git fetch upstream
remote: Enumerating objects: 246, done.
remote: Counting objects: 100% (246/246), done.
remote: Total 296 (delta 245), reused 246 (delta 245), pack-reused 50
Receiving objects: 100% (296/296), 84.69 KiB | 21.17 MiB/s, done.
Resolving deltas: 100% (257/257), completed with 144 local objects.
From github.com:rust-lang/rust
   660326e9791..f509b26a773  auto       -> upstream/auto
   5e9ebf4da35..d939f708d96  master     -> upstream/master
 + 38c48c2ed15...81fe3b5cf76 try        -> upstream/try  (forced update)
Fetching submodule src/tools/cargo
From https://github.com/rust-lang/cargo
 + 7b1e9f583...7019b3ed3 auto-cargo  -> origin/auto-cargo  (forced update)
   1fc0630da..7019b3ed3  master      -> origin/master
   7b1e9f583..3532cf738  rust-1.43.0 -> origin/rust-1.43.0

$ git rebase upstream/master
First, rewinding head to replay your work on top of it...
Applying: The xtensa triples are recognized by the compiler. Need to implement the calling convention, target -> call -> abi
Applying: Preliminary call abi for xtensa, it almost certainly has mistakes/ missing stuff.
Applying: Replace ArgType and FnType with ArgAbi and FnAbi in librustc_target::abi::call::xtensa
Applying: Tweaks to the xtensa call abi, small arrays arguments still need to be sorted, and it all needs to be verified on actual hardware
Applying: Add built in target, based on msp430. This uses external gcc to generate object files
Applying: Add xtensa-esp32-none-elf, xtensa-esp8266-none-elf targets. Remove xtensa-none-elf
Applying: Update README.md
Applying: Merge pull request #3 from 0ndorio/fix/register_calculation
Applying: Merge pull request #10 from chocol4te/tidy_fix
Applying: Fix ESP8266 linker.
Applying: Add matrix link

@MabezDev
Copy link
Member

Nice! I think this is the way to go :)

@fmckeogh fmckeogh force-pushed the xtensa-rebase-master branch from c43f3b9 to 1547b0c Compare March 22, 2020 07:48
Centril and others added 25 commits March 23, 2020 04:26
handle ConstKind::Unresolved after monomorphizing

fixes rust-lang#70125

r? @bjorn3
…an-DPC

remove redundant closures (clippy::redundant_closure)
Previously, we threw away the `Span` associated with a definition's
identifier when we encoded crate metadata, causing us to lose location
and hygiene information.

We now store the identifier's `Span` in the crate metadata.
When we decode items from the metadata, we combine
the name and span back into an `Ident`.

This improves the output of several tests, which previously had messages
suppressed due to dummy spans.

This is a prerequisite for rust-lang#68686, since throwing away a `Span` means
that we lose hygiene information.
Rollup of 9 pull requests

Successful merges:

 - rust-lang#69251 (#[track_caller] in traits)
 - rust-lang#69880 (miri engine: turn error sanity checks into assertions)
 - rust-lang#70207 (Use getentropy(2) on macos)
 - rust-lang#70227 (Only display definition when suggesting a typo)
 - rust-lang#70236 (resolve: Avoid "self-confirming" import resolutions in one more case)
 - rust-lang#70248 (parser: simplify & remove unused field)
 - rust-lang#70249 (handle ConstKind::Unresolved after monomorphizing)
 - rust-lang#70269 (remove redundant closures (clippy::redundant_closure))
 - rust-lang#70270 (Clean up E0449 explanation)

Failed merges:

r? @ghost
…-a-bar, r=michaelwoerister

rustc_codegen_llvm: don't generate any type debuginfo for -Cdebuginfo=1.

Works towards rust-lang#69074 by adding more checks for `DebugInfo::Full` in a few places in `rustc_codegen_llvm`, bringing us in line with what `clang -g1` generates (no debuginfo types, nor debuginfo for `static`s).

<hr/>

My local build's (`debuginfo-level=1`, `debug-assertions=1`) `librustc_driver-*.so` went from just over 1GiB (1019MiB) down to 402MiB.

It's still bad, but the `.debug_*` sections themselves (as reported by `objdump`) went from something like 853MiB down to 236MiB, i.e. roughly a 3.6x reduction.

<hr/>

Sadly, I don't think this is enough to justify *shipping* all of this debuginfo, but now it's more plausible that we could at least *build* with `debuginfo-level=1` *then* strip it.
That would give us real backtraces for e.g. ICEs during builds, but I don't know how often that's relevant.

We could also look into split DWARF, and maybe have a `rustc-debuginfo` component in `rustup`.

There's also the possibility of making it slimmer by omitting parameters to functions, or perhaps some deduplication (I think right now there is no DWARF reuse across CGUs? maybe ThinLTO helps?).

r? @michaelwoerister cc @rust-lang/wg-codegen @alexcrichton @Mark-Simulacrum
librustc_codegen_llvm: Replace deprecated API usage
…hewjasper

Increase verbosity when suggesting subtle code changes

Do not suggest changes that are actually quite small inline, to minimize the likelihood of confusion.

Fix rust-lang#69243.
…komatsakis

rustc: keep upvars tupled in {Closure,Generator}Substs.

Previously, each closure/generator capture's (aka "upvar") type was tracked as one "synthetic" type parameter in the closure/generator substs, and figuring out where the parent `fn`'s generics end and the synthetics start involved slicing at `tcx.generics_of(def_id).parent_count`.

Needing to query `generics_of` limited @davidtwco (who wants to compute some `TypeFlags` differently for parent generics vs upvars, and `TyCtxt` is not available there), which is how I got started on this, but it's also possible that the `generics_of` queries are slowing down `{Closure,Generator}Substs` methods.

To give an example, for a `foo::<T, U>::{closure#0}` with captures `x: X` and `y: Y`, substs are:
* before this PR: `[T, U, /*kind*/, /*signature*/, X, Y]`
* after this PR: `[T, U, /*kind*/, /*signature*/, (X, Y)]`

You can see that, with this PR, no matter how many captures, the last 3 entries in the substs (or 5 for a generator) are always the "synthetic" ones, with the last one being the tuple of capture types.

r? @nikomatsakis cc @Zoxc
…crum

Ensure LLVM is in the link path for rustc tools

The build script for `rustc_llvm` outputs LLVM information in `cargo:rustc-link-lib` and `cargo:rustc-link-search` so the compiler can be linked correctly. However, while the lib is carried along in metadata, the search paths are not. So when cargo is invoked again later for rustc _tools_, they'll also try to link with LLVM, but the necessary paths may be left out.

Rustbuild can use the environment to set the LLVM link path for tools -- `LIB` for MSVC toolchains and `LIBRARY_PATH` for everyone else.

Fixes rust-lang#68714.
…lbini

Update the bundled wasi-libc with libstd

Brings in WebAssembly/wasi-libc#184 which can help standalone programs
with environment variables!
…morse

resolve: Do not resolve visibilities on proc macro definitions twice

Fixes rust-lang#68921
…nkov

Miri error type: remove UbExperimental variant

In rust-lang/miri#1250, I will move Miri away from that variant, and use a custom `MachineStop` exception instead.
Rollup of 8 pull requests

Successful merges:

 - rust-lang#69080 (rustc_codegen_llvm: don't generate any type debuginfo for -Cdebuginfo=1.)
 - rust-lang#69940 (librustc_codegen_llvm: Replace deprecated API usage)
 - rust-lang#69942 (Increase verbosity when suggesting subtle code changes)
 - rust-lang#69968 (rustc: keep upvars tupled in {Closure,Generator}Substs.)
 - rust-lang#70123 (Ensure LLVM is in the link path for rustc tools)
 - rust-lang#70159 (Update the bundled wasi-libc with libstd)
 - rust-lang#70233 (resolve: Do not resolve visibilities on proc macro definitions twice)
 - rust-lang#70286 (Miri error type: remove UbExperimental variant)

Failed merges:

r? @ghost
estebank and others added 26 commits March 25, 2020 16:45
Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors
Tweak chained operators diagnostic

Use more selective spans
Improve suggestion output
Be more selective when displaying suggestions
Silence some knock-down type errors

r? @Centril
avoid catching InterpError

Avoid raising and then capturing `InterpError` for the definedness check.

Cc rust-lang#69297
r? @oli-obk
typeck: minor pattern typing improvements

r? @estebank
…mark-i-m

borrowck: prefer "value" over "`_`" in diagnostics

Fixes rust-lang#67565.

r? @pnkfelix @matthewjasper
cc @mark-i-m
Update cargo.

8 commits in 7019b3ed3d539db7429d10a343b69be8c426b576..8a0d4d9c9abc74fd670353094387d62028b40ae9
2020-03-17 21:02:00 +0000 to 2020-03-24 17:57:04 +0000
- Re-implement proc-macro feature decoupling. (rust-lang/cargo#8028)
- Remove unused transitive dependencies: miniz_oxide, adler32 (rust-lang/cargo#8023)
- Fix bug with -Zfeatures=dev_dep and `check --profile=test`. (rust-lang/cargo#8027)
- Remove Config from CompileOptions. (rust-lang/cargo#8021)
- Add `rustless.org` to documented blocklist. (rust-lang/cargo#7922)
- Print colored warnings when build script panics (rust-lang/cargo#8017)
- Do not supply --crate-version flag to rustdoc if present in RUSTDOCFLAGS (rust-lang/cargo#8014)
- Add proc-macro to index, and new feature resolver. (rust-lang/cargo#8003)
Rollup of 6 pull requests

Successful merges:

 - rust-lang#69866 (Rename `def_span` to `guess_head_span`)
 - rust-lang#69878 (Tweak chained operators diagnostic)
 - rust-lang#70375 (avoid catching InterpError)
 - rust-lang#70386 (typeck: minor pattern typing improvements)
 - rust-lang#70389 (borrowck: prefer "value" over "`_`" in diagnostics)
 - rust-lang#70395 (Update cargo.)

Failed merges:

r? @ghost
update miri

Usually I'd wait until rust-lang#70226 lands which will break Miri again, but... the queue is empty (!), so whatever.^^

r? @ghost Cc @oli-obk
Fixes rust-lang#70346
…the calling convention, target -> call -> abi
…e sorted, and it all needs to be verified on actual hardware
Fix argument register calculation.

Co-authored-by: rnd <bruno.kirschner@online.de>
@fmckeogh fmckeogh force-pushed the xtensa-rebase-master branch from 1547b0c to 3a48b93 Compare March 26, 2020 12:18
@fmckeogh
Copy link
Author

fmckeogh commented Apr 7, 2020

Superseded by #24

@fmckeogh fmckeogh closed this Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.