Skip to content

bootstrap: add rust.std-features config #130241

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 258 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
dd417ec
handle dry-run mode in `Config::get_builder_toml`
onur-ozkan Aug 30, 2024
efff536
Upgrade CI's mingw-w64 toolchain
mati865 Aug 25, 2024
f5a6903
added support for GNU/Hurd on x86_64
sthibaul Jul 26, 2024
f599fbd
rustdoc: normalise type/field names in rustdoc-json-types/jsondoclint
its-the-shrimp Aug 4, 2024
142b09f
Use sysroot crates maximally in `rustc_codegen_gcc`.
nnethercote Sep 2, 2024
175888c
Fix a typo in the wasm-component-ld README
alexcrichton Sep 6, 2024
f572d7b
Fix enabling wasm-component-ld to match other tools
alexcrichton Sep 6, 2024
4ee6bbc
run-make-support: Add llvm-pdbutil
nebulark Sep 6, 2024
1bf6888
Test codegen when setting deployment target
madsmtm Sep 7, 2024
81a2d86
Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowReg…
gurry Sep 7, 2024
e02f24e
remove 'const' from 'Option::iter'
RalfJung Sep 7, 2024
f76e272
make Result::copied unstably const
RalfJung Sep 7, 2024
99c2c60
add some FIXME(const-hack)
RalfJung Sep 8, 2024
901cb48
Option, Result: put the &mut variants of 'copied' under the same feat…
RalfJung Sep 8, 2024
07da922
Fixes typo in wasm32-wasip2 doc comment
zslayton Sep 7, 2024
0c204a3
const: make ptr.is_null() stop execution on ambiguity
RalfJung Sep 8, 2024
5a5721b
Remove needless returns detected by clippy in libraries
eduardosm Sep 8, 2024
72cfe07
Preparing for merge from rustc
Sep 1, 2024
8eb427b
fmt
Sep 1, 2024
4539ce5
move addr_from_alloc_id logic into its own function
RalfJung Sep 1, 2024
c0eb9ee
Preparing for merge from rustc
Sep 2, 2024
bfe5595
Enable native libraries on macOS
jder Sep 1, 2024
0385748
Detect pthread_mutex_t is moved
Mandragorian Jul 27, 2024
16cb386
Preparing for merge from rustc
Sep 6, 2024
e6194a0
miri.bat: use nightly toolchain
RalfJung Sep 6, 2024
2b487fc
Fix comment in mutex_id_offset
Mandragorian Sep 6, 2024
cbdaf79
Do not skip linker configuration for `check` builds
Kobzol Sep 9, 2024
d6f6bbd
Distribute rustc_codegen_cranelift for Windows
bjorn3 Aug 10, 2024
9cecdd7
Reduce visibilities, and add `warn(unreachable_pub)`.
nnethercote Aug 27, 2024
928ad37
Factor out some more repetitive code.
nnethercote Aug 28, 2024
3ccd60c
Streamline `AbortUnwindingCalls`.
nnethercote Aug 28, 2024
a7513b7
Simplify `verify_candidate_branch`.
nnethercote Aug 29, 2024
8f5cb2d
Use `let`/`else` to de-indent `ElaborateBoxDerefs::run_pass`.
nnethercote Sep 8, 2024
bbbe968
Remove an unnecessary `continue`.
nnethercote Aug 30, 2024
c49e8d5
Remove some unnecessary dereferences.
nnethercote Aug 30, 2024
b72a3d8
Make `CallSite` non-`Copy`.
nnethercote Aug 30, 2024
81bac1e
Use `LocalDecls` in a couple of places.
nnethercote Aug 30, 2024
dc793d6
Improve consistency in `LowerIntrinsics`.
nnethercote Sep 3, 2024
84b08f2
Remove unnecessary lifetimes in dataflow structs.
nnethercote Sep 5, 2024
76a9513
Remove unnecessary lifetime in `PlaceCollector`.
nnethercote Sep 6, 2024
16ae9d2
Remove unnecessary lifetime from `OperandCollector`.
nnethercote Sep 6, 2024
ec0c620
Rename some lifetimes.
nnethercote Sep 6, 2024
cffb2a4
Remove `Gatherer`.
nnethercote Sep 6, 2024
7c4b1c5
Remove `Elaborator`.
nnethercote Sep 6, 2024
e9fd7b3
Remove unnecessary lifetime from `StorageConflictVisitor`.
nnethercote Sep 6, 2024
f4bf544
fix ICE in CMSE type validation
folkertdev Sep 6, 2024
0e13dc0
do `PolyFnSig` -> `FnSig` conversion later
folkertdev Sep 9, 2024
128a986
Remove now redundant check in symlink_hard_link test
madsmtm Sep 7, 2024
7a07e87
Add an explicit ignore message for "up-to-date" tests
Zalathar Sep 9, 2024
d4a5c5b
Print a helpful message if any tests were skipped for being up-to-date
Zalathar Sep 9, 2024
dd537f3
Fix ICE caused by missing span in a region error
gurry Sep 9, 2024
8ed00fd
use verbose flag as a default value for `rust.verbose-tests`
onur-ozkan Sep 9, 2024
241178c
update `rust.verbose-tests` doc in `config.example.toml`
onur-ozkan Sep 9, 2024
396e9db
Stabilize `char::MIN`
okaneco Sep 9, 2024
4d00030
Update books
rustbot Sep 9, 2024
2e006db
rustdoc: use `LocalDefId` for inline stmt
notriddle Aug 30, 2024
6097b40
rustdoc: use a single box to store Attributes and ItemKind
notriddle Aug 30, 2024
24816cf
interpret: remove Readable trait, we can use Projectable instead
RalfJung Aug 28, 2024
fb46f2b
interpret: make Writeable trait about a to_place operation
RalfJung Aug 28, 2024
398af90
interpret: factor out common code for place mutation
RalfJung Aug 29, 2024
f489eca
interpret: reset provenance on typed copies
RalfJung Aug 29, 2024
7beef58
interpret: reset padding during validation
RalfJung Aug 29, 2024
5234d35
clarify comments and names in check_validity_requirement
RalfJung Sep 5, 2024
3079f65
IntervalSet: add comment about representation
RalfJung Sep 5, 2024
355c38c
union padding computation: add fast-path for ZST
RalfJung Sep 9, 2024
b76a810
fix UB in a test
RalfJung Sep 9, 2024
abeb411
Partially stabilize `io_error_more`
GrigorenkoPV Jul 28, 2024
f9ce534
Make `download-ci-llvm = true` check if CI llvm is available
Urgau Aug 23, 2024
b2b4532
Add a run-make test for checking that certain `rustc_` crates build o…
Kobzol Aug 24, 2024
8dcee09
inhibit proc-macro2 nightly detection
lqd Aug 24, 2024
e02c5ed
run test in tmp dir and emit artifacts there
lqd Aug 24, 2024
e548d34
remove use of RUSTC_BOOTSTRAP and cargo nightly features
lqd Aug 25, 2024
80e12e3
separate the crates to test from the test setup
lqd Aug 25, 2024
15779bf
remove unneeded type ascription
lqd Aug 25, 2024
69a436f
address review comments
lqd Sep 2, 2024
0c3450d
Remove `serialized_bitcode` from `LtoModuleCodegen`.
nnethercote Sep 5, 2024
03294b8
compiler: Inform the solver of concurrency
workingjubilee Sep 8, 2024
5f0aa6f
[illumos] enable SIGSEGV handler to detect stack overflows
sunshowers Sep 9, 2024
ac15741
bootstrap `naked_asm!` for `compiler-builtins`
folkertdev Sep 9, 2024
664d484
Helper function for formatting with `LifetimeSuggestionPosition`
GrigorenkoPV Sep 9, 2024
ee9058b
adapt a test for llvm 20
krasimirgg Sep 9, 2024
969fa6c
bump download-ci-llvm-stamp
onur-ozkan Sep 9, 2024
910741c
move some const fn out of the const_ptr_as_ref feature
RalfJung Sep 9, 2024
2b12397
move const fn with a null check into const_ptr_is_null gate
RalfJung Sep 9, 2024
be490be
librustdoc::config: removed Input from Options
EtomicBomb Aug 27, 2024
40b7e8b
rfc#3662 changes under unstable flags
EtomicBomb Aug 20, 2024
0dfb718
add tests for behavior in rfc#3662
EtomicBomb Sep 7, 2024
ae639e8
Also emit `missing_docs` lint with `--test` to fulfill expectations
Urgau Sep 6, 2024
9223854
Add missing `#[allow(missing_docs)]` on hack functions in alloc
Urgau Sep 6, 2024
3dfc7d2
Allow `missing_docs` lint on the generated test harness
Urgau Sep 9, 2024
060e0f6
Add test about missing docs at crate level
Urgau Sep 9, 2024
c674685
bootstrap/Makefile.in: miri: add missing BOOTSTRAP ARGS
RalfJung Sep 9, 2024
5a1b2f3
rustdoc: add two regression tests
fmease Sep 9, 2024
d68de4e
Improve comment formatting.
nnethercote Aug 27, 2024
dd7dfbe
Inline and remove some functions.
nnethercote Aug 28, 2024
9fd076f
Clarify a comment.
nnethercote Aug 30, 2024
81b5610
Add a useful comment.
nnethercote Sep 3, 2024
f8445f0
Add a useful comment about `PromoteTemps`.
nnethercote Sep 4, 2024
91f0384
Use `IndexVec::from_raw` to construct a const `IndexVec`.
nnethercote Sep 4, 2024
02cc196
Remove references from some structs.
nnethercote Sep 4, 2024
f8615e1
Make `check_live_drops` into a `MirLint`.
nnethercote Sep 5, 2024
cba6181
coverage: Avoid referring to "coverage spans" in counter creation
Zalathar Sep 10, 2024
3f8f056
coverage: Avoid referring to out-edges as "branches"
Zalathar Sep 10, 2024
2d1d47f
coverage: Avoid referring to "operands" in counter creation
Zalathar Sep 10, 2024
471a706
abi/compatibility test: remove tests inside repr(C) wrappers
RalfJung Sep 10, 2024
0b4f221
Ban non-array SIMD
scottmcm Aug 22, 2024
7f0e247
Fix the examples in cg_clif
scottmcm Aug 23, 2024
f6a0dba
Update the MIRI tests
scottmcm Aug 23, 2024
76a6932
rustdoc: unify the short-circuit on all lints
notriddle Sep 4, 2024
78fd32c
Check AttrId for expectations.
cjgillot Aug 31, 2024
4a7bd5e
Do not ICE on expect(warnings).
cjgillot Sep 7, 2024
5d7987f
generalize: track relevant info in cache key
lcnr Sep 10, 2024
1e54493
Update LLVM to 19 327ca6c
dianqk Sep 10, 2024
847f6fe
disallow `naked_asm!` outside of `#[naked]` functions
folkertdev Sep 10, 2024
7a0e2ef
interpret: mark some hot functions inline(always)
RalfJung Sep 10, 2024
b40db0b
Don't suggest adding return type for closures with default return type
wafarm Aug 19, 2024
d808aef
Suggest the struct variant pattern syntax on usage of unit variant pa…
tunawasabi Aug 24, 2024
5fad88c
Clarify docs for std::collections
root-goblin Sep 1, 2024
a134bc6
Report the `note` when specified in `diagnostic::on_unimplemented`
FedericoBruzzone Sep 8, 2024
da09ea4
add `git_merge_commit_email` into `GitConfig`
onur-ozkan Sep 9, 2024
5f42437
implement `build_helper::git::get_closest_merge_commit`
onur-ozkan Sep 9, 2024
7c2fdc8
replace `get_closest_merge_base_commit` with `get_closest_merge_commit`
onur-ozkan Sep 9, 2024
0122b42
handle `GitConfig` for `tools/suggest-tests`
onur-ozkan Sep 9, 2024
a36ef10
handle `GitConfig` for `tools/compiletest`
onur-ozkan Sep 9, 2024
d526b4b
skip formatting if no files have been modified
onur-ozkan Sep 9, 2024
caba1f1
document the new git logic in more detail
onur-ozkan Sep 10, 2024
194fc49
Map `WSAEDQUOT` to `ErrorKind::FilesystemQuotaExceeded`
GrigorenkoPV Sep 10, 2024
e5a0ced
Map `ERROR_CANT_RESOLVE_FILENAME` to `ErrorKind::FilesystemLoop`
GrigorenkoPV Sep 10, 2024
0fdba39
Fix false positive with `missing_docs` and `#[test]`
ogoffart Sep 11, 2024
b8ff7bb
Use `#[doc(hidden)]` instead of `#[allow(missing_docs)]` on the const…
ogoffart Sep 11, 2024
bf90449
Use `doc(hidden)` instead of `allow(missing_docs)` in the test harness
ogoffart Sep 11, 2024
209622b
Make SearchPath::new public
Sep 11, 2024
394d477
Revert warning empty patterns as unreachable
Nadrieril Aug 28, 2024
4815ccd
update stdarch
RalfJung Aug 28, 2024
a3469c6
miri: support vector index arguments in simd_shuffle
RalfJung Sep 11, 2024
a8f6196
these tests seem to work fine on i586 these days
RalfJung Aug 31, 2024
f63bdd8
move float tests into their own dir
workingjubilee Sep 10, 2024
182926f
enable and extend float-classify test
RalfJung Aug 31, 2024
597fd19
clean up internal comments about float semantics
RalfJung Aug 31, 2024
d216f19
Fix linking error when compiling for 32-bit watchOS
madsmtm Sep 7, 2024
f9ad045
Remove needless returns detected by clippy in the compiler
eduardosm Sep 9, 2024
b7cc5a2
maint: update docs for change_time ext and doc links
juliusl Sep 9, 2024
d354610
chore: removing supporting links in favor of existing doc-comment style
juliusl Sep 9, 2024
fa4b7ae
docs: remove struct info
juliusl Sep 11, 2024
74e03b4
chore: remove struct details
juliusl Sep 11, 2024
9309dcb
notify Miri when intrinsics are changed
RalfJung Sep 11, 2024
497d94f
miri: fix overflow detection for unsigned pointer offset
RalfJung Sep 11, 2024
5f35a60
Use the same span for attributes and Try expansion of ?
samueltardieu Sep 11, 2024
3b6cee1
Limit `libc::link` usage to `nto70` target only, not NTO OS
nyurik Sep 11, 2024
9f5b871
Bump unicode_data to version 16.0.0
Marcondiro Sep 10, 2024
e0cd985
Bump unicode printable to version 16.0.0
Marcondiro Sep 10, 2024
176b99a
Add -Z small-data-threshold
paulmenage Sep 10, 2024
ee4539a
Pass deployment target when linking with cc on Apple targets
madsmtm Aug 21, 2024
bd07643
Revert 'Stabilize -Znext-solver=coherence'
compiler-errors Sep 11, 2024
ee80921
Expand PathBuf documentation
ChrisJefferson May 13, 2024
d004a88
Fixup docs for PathBuf
workingjubilee Sep 12, 2024
3e08393
Fix default/minimum deployment target for Aarch64 simulator targets
madsmtm Aug 21, 2024
2ee2b4b
Add test for S_OBJNAME and update test for LF_BUILDINFO cl and cmd for
nebulark Sep 6, 2024
b005ab8
Fix slice::first_mut docs
Scripter17 Sep 9, 2024
a2f33f8
Simplify some nested if statements
compiler-errors Sep 11, 2024
46770d2
Also fix if in else
compiler-errors Sep 11, 2024
0565633
clippy::useless_conversion
compiler-errors Sep 11, 2024
1bdb8a9
Properly deny const gen/async gen fns
compiler-errors Sep 11, 2024
1b0a63d
Remove unused functions from ast CoroutineKind
compiler-errors Sep 11, 2024
0881b8e
Re-run coverage tests if `coverage-dump` was modified
Zalathar Sep 12, 2024
21a9730
Update compiler-builtins to 0.1.125
alexcrichton Sep 5, 2024
9d6e442
remove pointless rustc_const_unstable on trait impls
RalfJung Sep 8, 2024
15e1b99
add FIXME(const-hack)
RalfJung Sep 8, 2024
d30997f
remove const_slice_index annotations, it never had a feature gate anyway
RalfJung Sep 8, 2024
532d831
Introduce `'ra` lifetime name.
nnethercote Sep 10, 2024
39e5109
coverage: Separate creation of edge counters from building their sum
Zalathar Sep 11, 2024
5d1a142
coverage: Simplify creation of sum counters
Zalathar Sep 11, 2024
6cbb9c4
more eagerly discard constraints on overflow
lcnr Sep 12, 2024
6fcdd21
Add test for nalgebra hang in coherence
compiler-errors Sep 12, 2024
f6099cc
unify `llvm-bitcode-linker`, `wasm-component-ld` and llvm-tools logics
onur-ozkan Sep 7, 2024
7ce14f0
Fix anon const def-creation when macros are involved
camelid Aug 15, 2024
5cc3b42
Re-enable `ConstArgKind::Path` lowering by default
camelid Sep 8, 2024
2488062
rescope temp lifetime in let-chain into IfElse
dingxiangfei2009 Jan 24, 2023
eb4e459
coalesce lint suggestions that can intersect
dingxiangfei2009 Sep 5, 2024
a7667f3
downgrade borrowck suggestion level due to possible span conflict
dingxiangfei2009 Sep 10, 2024
2829c4a
simplify the suggestion notes
dingxiangfei2009 Sep 12, 2024
1f3f7a6
Revert "Auto merge of #130040 - onur-ozkan:llvm-tools-with-ci-rustc, …
ehuss Sep 13, 2024
99b1740
Don't leave debug locations for constants sitting on the builder inde…
khuey Sep 6, 2024
a32af66
make basic allocation functions track_caller in Miri for nicer backtr…
RalfJung Sep 11, 2024
f718305
skip target sanity check when it's a `local-rebuild`
onur-ozkan Sep 12, 2024
60c4ef5
use `local-rebuild` instead of `BOOTSTRAP_SKIP_TARGET_SANITY` workaround
onur-ozkan Sep 12, 2024
1d77488
Add URL and crate_name to test cases
notriddle Sep 12, 2024
9abca25
rustdoc: rename `issue-\d+.rs` tests to have meaningful names
notriddle Sep 12, 2024
441ad37
rustdoc: re-bless stderrs after renaming the test case
notriddle Sep 12, 2024
1e3d54b
interpret: simplify SIMD type handling
RalfJung Sep 11, 2024
1a9fbdd
When calling a method on Fn* traits explicitly, argument diagnostics …
jder Aug 19, 2024
9dd0ee2
target: default to the medium code model on LoongArch targets
xen0n Feb 5, 2024
21864c1
Remove unnecessary `Clone`/`Copy` derives from analyses.
nnethercote Sep 12, 2024
c76626d
Rename `FlowState` as `Domain`.
nnethercote Sep 13, 2024
2597080
Add set_dcx to ParseSess
Sep 13, 2024
ea1f99d
some fixes for clashing_extern_declarations lint
RalfJung Sep 13, 2024
8a8ec19
Revert "stabilize const_float_bits_conv" for src/tools/clippy/clippy_…
tspiteri Sep 13, 2024
6a29019
handle transmutes in const context if msrvs::CONST_FLOAT_BITS_CONV
tspiteri Sep 13, 2024
948aa96
bootstrap: handle worktrees in warn_old_master_branch
lolbinarycat Sep 8, 2024
ff677f6
Add GCC submodule
GuillaumeGomez May 22, 2024
c9921de
Add libgccjit dist generation
GuillaumeGomez May 22, 2024
51ea106
Ignore gcc submodule for tidy checks
GuillaumeGomez May 23, 2024
d0dce0f
Add missing licenses for GCC
GuillaumeGomez May 23, 2024
556cacb
Rename `LICENSES/GPL-2.0.txt` into `LICENSES/GPL-2.0-only.txt`
GuillaumeGomez Jul 16, 2024
fba51bd
Correctly generate stamp for gcc
GuillaumeGomez Jul 16, 2024
d17484e
Remove `src/gcc` from `rustfmt` checks
GuillaumeGomez Jul 16, 2024
e368c20
Update GCC version
GuillaumeGomez Jul 22, 2024
9b4f6aa
Update code comments to mention GCC and not LLVM
GuillaumeGomez Jul 22, 2024
58ebe79
Update to new bootstrap API
GuillaumeGomez Aug 8, 2024
f72cf8c
Move HashStamp to helpers
GuillaumeGomez Aug 12, 2024
1a426aa
Clean code and move check for GCC backend build in `dist.rs` directly
GuillaumeGomez Aug 12, 2024
ee8f4ed
Add `gcc` to the `build` commands list
GuillaumeGomez Aug 14, 2024
a377002
Update declared licenses in `REUSE.toml`
GuillaumeGomez Aug 14, 2024
18b68cd
Make gcc submodule shallow
GuillaumeGomez Aug 14, 2024
8cc2ca7
Make gcc `root` absolute
GuillaumeGomez Aug 14, 2024
9759d5a
Update to new `Builder` API
GuillaumeGomez Sep 4, 2024
47fc710
Fix licensing information in REUSE.toml
Kobzol Sep 4, 2024
7660235
Check if the `libgccjit.so.0` file exists before creating a symlink t…
GuillaumeGomez Sep 5, 2024
32d73be
Run `download_prerequisites` before running gcc `configure`
GuillaumeGomez Sep 5, 2024
3b52a49
Remove gcc changes for dist build
GuillaumeGomez Sep 13, 2024
c2f6c91
bootstrap: Print more debug info when `find_initial_libdir` fails
Zalathar Sep 9, 2024
5b3cd8a
Don't call closure_by_move_body_def_id on FnOnce async closures in MI…
compiler-errors Sep 10, 2024
5c2e3cd
add llvm-bitcode-linker and llvm-tools bins to ci-rustc's sysroot
onur-ozkan Sep 6, 2024
2a23ab1
avoid updating LLVM submodule during bootstrap unit tests
onur-ozkan Sep 13, 2024
371b28e
ProjectionElem and UnOp/BinOp dont need to be PartialOrd/Ord
compiler-errors Sep 13, 2024
6a5c70f
Add a machine-applicable suggestion to "unreachable pattern"
Nadrieril Aug 19, 2024
02e559a
fix doc comments for Peekable::next_if(_eq)
micahrj Sep 7, 2024
8ab312a
small_data_threshold.rs: Adapt to LLVM head changes
TimNN Sep 12, 2024
0a356e4
(fix) conflicting negative impl marker and add tests
heiseish Sep 13, 2024
2596e21
Fix SDKROOT ignore on macOS
madsmtm Sep 14, 2024
f11f526
Simplify the canonical clone method to copy
dianqk Aug 21, 2024
15893fe
Update try_question_mark_nop.rs test
dianqk Sep 3, 2024
ab37d0b
coverage: Extract `executor::block_on` from several async coverage tests
Zalathar Sep 6, 2024
9b113e9
simd_shuffle: require index argument to be a vector
RalfJung Sep 12, 2024
8d7ad48
Stabilize entry_insert
passcod Sep 12, 2024
9a71c22
Remove unnecessary lifetime from `UnsafeInferVarsVisitor`.
nnethercote Sep 6, 2024
a9340da
Remove unnecessary lifetime from `FeaturePreviouslyDeclared`.
nnethercote Sep 10, 2024
5c22d36
Remove unnecessary lifetime from `BuiltinTypeAliasBounds`.
nnethercote Sep 11, 2024
13f0609
Remove unnecessary lifetime from `CheckLoopVisitor`.
nnethercote Sep 12, 2024
db0c4f5
Remove unnecessary lifetimes from `Arena`.
nnethercote Sep 11, 2024
1468341
Remove unnecessary lifetimes from `rustc_expand`.
nnethercote Sep 12, 2024
494dab4
Remove unnecessary lifetime from `RunCompiler`.
nnethercote Sep 12, 2024
163fe6a
Rename some lifetimes.
nnethercote Sep 10, 2024
659bfa4
Rename and reorder lots of lifetimes.
nnethercote Sep 11, 2024
0d79203
Remove `sess` from `CheckLoopVisitor`.
nnethercote Sep 13, 2024
ac15381
docs: Enable required feature for 'closure_returning_async_block' lint
Fayti1703 Sep 14, 2024
8256f18
Add `ErrorGuaranteed` to `DestructuredFloat::Error`
ShE3py Sep 14, 2024
4c07d91
Fix `Parser::break_up_float`'s right span
ShE3py Sep 14, 2024
c0dec00
Refactor `Parser::break_up_float`
ShE3py Sep 14, 2024
901aa18
bootstrap: add `std_features` config
shrirambalaji Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@
path = src/tools/enzyme
url = https://github.com/EnzymeAD/Enzyme.git
shallow = true
[submodule "src/gcc"]
path = src/gcc
url = https://github.com/rust-lang/gcc.git
shallow = true
30 changes: 30 additions & 0 deletions LICENSES/GCC-exception-3.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
GCC RUNTIME LIBRARY EXCEPTION

Version 3.1, 31 March 2009

Copyright © 2009 Free Software Foundation, Inc. <https://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

This GCC Runtime Library Exception ("Exception") is an additional permission under section 7 of the GNU General Public License, version 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that bears a notice placed by the copyright holder of the file stating that the file is governed by GPLv3 along with this Exception.

When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception.
0. Definitions.

A file is an "Independent Module" if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library.

"GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF.

"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC.

"Target Code" refers to output from any compiler for a real or virtual target processor architecture, in executable form or suitable for input to an assembler, loader, linker and/or execution phase. Notwithstanding that, Target Code does not include data in any format that is used as a compiler intermediate representation, or used for producing a compiler intermediate representation.

The "Compilation Process" transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors.

A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process.
1. Grant of Additional Permission.

You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules.
2. No Weakening of GCC Copyleft.

The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC.
133 changes: 133 additions & 0 deletions LICENSES/GPL-2.0-only.txt

Large diffs are not rendered by default.

202 changes: 202 additions & 0 deletions LICENSES/GPL-3.0-or-later.txt

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions LICENSES/ISC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ISC License

<copyright notice>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
34 changes: 34 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,37 @@ SPDX-FileCopyrightText = [
"2003-2019 University of Illinois at Urbana-Champaign.",
]
SPDX-License-Identifier = "NCSA AND Apache-2.0 WITH LLVM-exception"

[[annotations]]
path = "src/gcc/**"
precedence = "override"
SPDX-FileCopyrightText = [
"Copyright (C) 1997-2024 Free Software Foundation, Inc.",
]
SPDX-License-Identifier = "GPL-3.0-or-later"

[[annotations]]
path = "src/gcc/gcc/testsuite/**"
precedence = "override"
SPDX-FileCopyrightText = [
"Copyright (C) 2000-2024 Free Software Foundation, Inc.",
]
SPDX-License-Identifier = "GPL-2.0-only"

[[annotations]]
path = "src/gcc/gcc/testsuite/c-c++-common/analyzer/*.c"
precedence = "override"
SPDX-FileCopyrightText = [
"Copyright (c) 2007-2011 Atheros Communications Inc.",
"Copyright (c) 2011-2012,2017 Qualcomm Atheros, Inc.",
"Copyright (c) 2016-2017 Erik Stromdahl <erik.stromdahl@gmail.com>",
]
SPDX-License-Identifier = "ISC"

[[annotations]]
path = "src/gcc/libstdc++-v3/config/os/aix/os_defines.h"
precedence = "override"
SPDX-FileCopyrightText = [
"Copyright (C) 2000-2024 Free Software Foundation, Inc.",
]
SPDX-License-Identifier = "GCC-exception-3.1"
28 changes: 14 additions & 14 deletions compiler/rustc_arena/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,34 +614,34 @@ pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {

pub trait ArenaAllocatable<'tcx, C = rustc_arena::IsNotCopy>: Sized {
#[allow(clippy::mut_from_ref)]
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self;
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self;
#[allow(clippy::mut_from_ref)]
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
fn allocate_from_iter(
arena: &'tcx Arena<'tcx>,
iter: impl ::std::iter::IntoIterator<Item = Self>,
) -> &'a mut [Self];
) -> &'tcx mut [Self];
}

// Any type that impls `Copy` can be arena-allocated in the `DroplessArena`.
impl<'tcx, T: Copy> ArenaAllocatable<'tcx, rustc_arena::IsCopy> for T {
#[inline]
#[allow(clippy::mut_from_ref)]
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self {
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self {
arena.dropless.alloc(self)
}
#[inline]
#[allow(clippy::mut_from_ref)]
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
fn allocate_from_iter(
arena: &'tcx Arena<'tcx>,
iter: impl ::std::iter::IntoIterator<Item = Self>,
) -> &'a mut [Self] {
) -> &'tcx mut [Self] {
arena.dropless.alloc_from_iter(iter)
}
}
$(
impl<'tcx> ArenaAllocatable<'tcx, rustc_arena::IsNotCopy> for $ty {
#[inline]
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut Self {
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self {
if !::std::mem::needs_drop::<Self>() {
arena.dropless.alloc(self)
} else {
Expand All @@ -651,10 +651,10 @@ pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {

#[inline]
#[allow(clippy::mut_from_ref)]
fn allocate_from_iter<'a>(
arena: &'a Arena<'tcx>,
fn allocate_from_iter(
arena: &'tcx Arena<'tcx>,
iter: impl ::std::iter::IntoIterator<Item = Self>,
) -> &'a mut [Self] {
) -> &'tcx mut [Self] {
if !::std::mem::needs_drop::<Self>() {
arena.dropless.alloc_from_iter(iter)
} else {
Expand All @@ -667,7 +667,7 @@ pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {
impl<'tcx> Arena<'tcx> {
#[inline]
#[allow(clippy::mut_from_ref)]
pub fn alloc<T: ArenaAllocatable<'tcx, C>, C>(&self, value: T) -> &mut T {
pub fn alloc<T: ArenaAllocatable<'tcx, C>, C>(&'tcx self, value: T) -> &mut T {
value.allocate_on(self)
}

Expand All @@ -691,7 +691,7 @@ pub macro declare_arena([$($a:tt $name:ident: $ty:ty,)*]) {

#[allow(clippy::mut_from_ref)]
pub fn alloc_from_iter<T: ArenaAllocatable<'tcx, C>, C>(
&self,
&'tcx self,
iter: impl ::std::iter::IntoIterator<Item = T>,
) -> &mut [T] {
T::allocate_from_iter(self, iter)
Expand Down
49 changes: 31 additions & 18 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,14 +1188,7 @@ impl Expr {
///
/// Does not ensure that the path resolves to a const param, the caller should check this.
pub fn is_potential_trivial_const_arg(&self) -> bool {
let this = if let ExprKind::Block(block, None) = &self.kind
&& let [stmt] = block.stmts.as_slice()
&& let StmtKind::Expr(expr) = &stmt.kind
{
expr
} else {
self
};
let this = self.maybe_unwrap_block();

if let ExprKind::Path(None, path) = &this.kind
&& path.is_potential_trivial_const_arg()
Expand All @@ -1206,6 +1199,17 @@ impl Expr {
}
}

pub fn maybe_unwrap_block(&self) -> &Expr {
if let ExprKind::Block(block, None) = &self.kind
&& let [stmt] = block.stmts.as_slice()
&& let StmtKind::Expr(expr) = &stmt.kind
{
expr
} else {
self
}
}

pub fn to_bound(&self) -> Option<GenericBound> {
match &self.kind {
ExprKind::Path(None, path) => Some(GenericBound::Trait(
Expand Down Expand Up @@ -2418,11 +2422,22 @@ impl InlineAsmOperand {
}
}

#[derive(Clone, Copy, Encodable, Decodable, Debug, HashStable_Generic)]
pub enum AsmMacro {
/// The `asm!` macro
Asm,
/// The `global_asm!` macro
GlobalAsm,
/// The `naked_asm!` macro
NakedAsm,
}

/// Inline assembly.
///
/// E.g., `asm!("NOP");`.
#[derive(Clone, Encodable, Decodable, Debug)]
pub struct InlineAsm {
pub asm_macro: AsmMacro,
pub template: Vec<InlineAsmTemplatePiece>,
pub template_strs: Box<[(Symbol, Option<Symbol>, Span)]>,
pub operands: Vec<(InlineAsmOperand, Span)>,
Expand Down Expand Up @@ -2591,12 +2606,12 @@ impl CoroutineKind {
}
}

pub fn is_async(self) -> bool {
matches!(self, CoroutineKind::Async { .. })
}

pub fn is_gen(self) -> bool {
matches!(self, CoroutineKind::Gen { .. })
pub fn as_str(self) -> &'static str {
match self {
CoroutineKind::Async { .. } => "async",
CoroutineKind::Gen { .. } => "gen",
CoroutineKind::AsyncGen { .. } => "async gen",
}
}

pub fn closure_id(self) -> NodeId {
Expand Down Expand Up @@ -3475,7 +3490,7 @@ impl From<ForeignItemKind> for ItemKind {
fn from(foreign_item_kind: ForeignItemKind) -> ItemKind {
match foreign_item_kind {
ForeignItemKind::Static(box static_foreign_item) => {
ItemKind::Static(Box::new(static_foreign_item.into()))
ItemKind::Static(Box::new(static_foreign_item))
}
ForeignItemKind::Fn(fn_kind) => ItemKind::Fn(fn_kind),
ForeignItemKind::TyAlias(ty_alias_kind) => ItemKind::TyAlias(ty_alias_kind),
Expand All @@ -3489,9 +3504,7 @@ impl TryFrom<ItemKind> for ForeignItemKind {

fn try_from(item_kind: ItemKind) -> Result<ForeignItemKind, ItemKind> {
Ok(match item_kind {
ItemKind::Static(box static_item) => {
ForeignItemKind::Static(Box::new(static_item.into()))
}
ItemKind::Static(box static_item) => ForeignItemKind::Static(Box::new(static_item)),
ItemKind::Fn(fn_kind) => ForeignItemKind::Fn(fn_kind),
ItemKind::TyAlias(ty_alias_kind) => ForeignItemKind::TyAlias(ty_alias_kind),
ItemKind::MacCall(a) => ForeignItemKind::MacCall(a),
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast/src/ast_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl HasTokens for StmtKind {
StmtKind::Let(local) => local.tokens.as_ref(),
StmtKind::Item(item) => item.tokens(),
StmtKind::Expr(expr) | StmtKind::Semi(expr) => expr.tokens(),
StmtKind::Empty => return None,
StmtKind::Empty => None,
StmtKind::MacCall(mac) => mac.tokens.as_ref(),
}
}
Expand All @@ -162,7 +162,7 @@ impl HasTokens for StmtKind {
StmtKind::Let(local) => Some(&mut local.tokens),
StmtKind::Item(item) => item.tokens_mut(),
StmtKind::Expr(expr) | StmtKind::Semi(expr) => expr.tokens_mut(),
StmtKind::Empty => return None,
StmtKind::Empty => None,
StmtKind::MacCall(mac) => Some(&mut mac.tokens),
}
}
Expand Down
20 changes: 9 additions & 11 deletions compiler/rustc_ast/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,16 @@ pub fn entry_point_type(
EntryPointType::Start
} else if attr::contains_name(attrs, sym::rustc_main) {
EntryPointType::RustcMainAttr
} else {
if let Some(name) = name
&& name == sym::main
{
if at_root {
// This is a top-level function so it can be `main`.
EntryPointType::MainNamed
} else {
EntryPointType::OtherMain
}
} else if let Some(name) = name
&& name == sym::main
{
if at_root {
// This is a top-level function so it can be `main`.
EntryPointType::MainNamed
} else {
EntryPointType::None
EntryPointType::OtherMain
}
} else {
EntryPointType::None
}
}
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/mut_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@ fn walk_anon_const<T: MutVisitor>(vis: &mut T, AnonConst { id, value }: &mut Ano
fn walk_inline_asm<T: MutVisitor>(vis: &mut T, asm: &mut InlineAsm) {
// FIXME: Visit spans inside all this currently ignored stuff.
let InlineAsm {
asm_macro: _,
template: _,
template_strs: _,
operands,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ pub fn walk_anon_const<'a, V: Visitor<'a>>(visitor: &mut V, constant: &'a AnonCo

pub fn walk_inline_asm<'a, V: Visitor<'a>>(visitor: &mut V, asm: &'a InlineAsm) -> V::Result {
let InlineAsm {
asm_macro: _,
template: _,
template_strs: _,
operands,
Expand Down
14 changes: 9 additions & 5 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
let parent_def_id = self.current_def_id_parent;
let node_id = self.next_node_id();
// HACK(min_generic_const_args): see lower_anon_const
if !self.tcx.features().const_arg_path
|| !expr.is_potential_trivial_const_arg()
{
if !expr.is_potential_trivial_const_arg() {
self.create_def(
parent_def_id,
node_id,
Expand Down Expand Up @@ -474,8 +472,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
);
let line_spans =
self.arena.alloc_from_iter(asm.line_spans.iter().map(|span| self.lower_span(*span)));
let hir_asm =
hir::InlineAsm { template, template_strs, operands, options: asm.options, line_spans };
let hir_asm = hir::InlineAsm {
asm_macro: asm.asm_macro,
template,
template_strs,
operands,
options: asm.options,
line_spans,
};
self.arena.alloc(hir_asm)
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let node_id = self.next_node_id();

// HACK(min_generic_const_args): see lower_anon_const
if !self.tcx.features().const_arg_path || !arg.is_potential_trivial_const_arg() {
if !arg.is_potential_trivial_const_arg() {
// Add a definition for the in-band const def.
self.create_def(parent_def_id, node_id, kw::Empty, DefKind::AnonConst, f.span);
}
Expand Down Expand Up @@ -1837,7 +1837,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
Safety::Default,
sym::allow,
sym::unreachable_code,
self.lower_span(span),
try_span,
);
let attrs: AttrVec = thin_vec![attr];

Expand Down
Loading