about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-10-08linker: Remove `-Zgcc-ld` optionVadim Petrochenkov-10/+13
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
2023-10-06Rename `flag` to `arg`Jakub Beránek-4/+4
2023-10-06remove the use of `fn update_submodule` on rust-analyzeronur-ozkan-2/+0
We don't need to run `fn update_submodule` on rust-analyzer as it's no longer a submodule. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-05Pass host flags to `rustc` shim using prefixed env. varsJakub Beránek-18/+42
2023-10-05Remove unused `RUSTDOC_FUSE_LD_LLD` flagJakub Beránek-4/+0
2023-10-04vendor distribution on the tarball sourcesonur-ozkan-5/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-03bootstrap: make copying linker binaries conditionalJoseph Ryan-5/+7
2023-10-02ensure the parent path's existence on `x install`onur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-02Auto merge of #116276 - lqd:lld-sysroot, r=onur-ozkanbors-0/+17
bootstrap: copy self-contained linking components to `stage0-sysroot` I hit this issue while trying to bootstrap using a rustc where `rust-lld` is used by default: this was the cause of the failure to profile rustc-perf's bootstrap benchmark in https://github.com/rust-lang/rust/pull/113382. `stage0-sysroot` currently only has libs and self-contained objects, not the other self-contained linking components yet. Most notably, it does not contain the linker and wrappers that we build, and that rustup distributes. If you try to bootstrap using the bootstrap compiler's `rust-lld`, it will fail to link std at stage0 because `rust-lld` and the `gcc-ld` wrappers, will not be found in `stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/bin`. This PR copies the `bin` directory next to the `lib` directory when `rust.lld` is enabled in the config (though maybe it could be done unconditionally, the fact that we need it to link does not necessarily mean that we'd want to build and provide it at stage1). cc `@Kobzol` who also encountered this issue while using lld during bootstrap.
2023-10-02Auto merge of #115898 - onur-ozkan:config-change-tracking, r=Mark-Simulacrumbors-102/+86
bootstrap major change detection implementation The use of `changelog-seen` and `bootstrap/CHANGELOG.md` has not been functional in any way for many years. We often do major/breaking changes but never update the changelog file or the `changelog-seen`. This is an alternative method for tracking major or breaking changes and informing developers when such changes occur. Example output when bootstrap detects a major change: ![image](https://github.com/rust-lang/rust/assets/39852038/ee802dfa-a02b-488b-a433-f853ce079b8a)
2023-10-01add Changelog topic to bootstrap/README.mdonur-ozkan-5/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-01implement major change tracking for the bootstrap configurationonur-ozkan-97/+77
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-01bootstrap: copy self-contained linking components to stage0-sysrootRémy Rakic-0/+17
otherwise bootstrap will fail to link the stdlib on a target using the self-contained linker: rust-lld will not be found since it's currently not in the stage0-sysroot.
2023-10-01Rollup merge of #116292 - onur-ozkan:warn-wrong-sources, r=clubby789Matthias Krüger-0/+6
warn if source is not either a git clone or a dist tarball When the repository is downloaded directly via HTTP(as in #115041), builds may fail due to missing submodules. This PR adds a check that warns people in such cases.
2023-10-01Auto merge of #116108 - onur-ozkan:support-make-jobs-flag, r=Mark-Simulacrumbors-0/+7
Pass `-jN` from Make to `BOOTSTRAP_ARGS` Enables the same functionality as `x -jN` in Make by passing the `-jN` arg from Make to the `BOOTSTRAP_ARGS` if it is specified.
2023-09-30Auto merge of #116127 - onur-ozkan:sanity-checks-on-install, r=Mark-Simulacrumbors-0/+31
add sanity checks for user write access on `x install` Resolves #113580
2023-09-30warn if source is not either a git clone or a dist tarballonur-ozkan-0/+6
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-29Rollup merge of #116133 - pouriya:refactor-bootstrap.py, r=albertlarsan68Matthias Krüger-49/+41
ref(bootstrap.py): add `eprint` function Implemented a 3-line function called `eprint` which is just like `print` but for `stderr`. So each `print(..., file=sys.stderr)` becomes `eprint(...)`. <br/> Testing `eprint` function: ```sh $ cat eprint.py ``` ```python import sys def eprint(*args, **kwargs): kwargs['file'] = sys.stderr print(*args, **kwargs) eval('eprint({})'.format(sys.argv[1])) ``` ```sh $ python3 eprint.py '"hello"' hello $ ``` ```sh $ python3 eprint.py '"hello"' 2>/dev/null $ ``` ```sh $ python3 eprint.py '"hello", "world", flush=True, file=sys.stdout' hello world $ ``` ```sh $ python3 eprint.py '"hello", "world", flush=True, file=sys.stdout' 2>/dev/null $ ```
2023-09-25Split out the stable part of smir into its own crate to prevent accidental ↵Oli Scherer-1/+4
usage of forever unstable things
2023-09-25ref(bootstrap.py): add `eprint` functionPouriya Jahanbakhsh-49/+41
just like `print` but for `stderr`
2023-09-25add sanity checks for user write access on `x install`onur-ozkan-0/+31
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-24Auto merge of #105861 - Ayush1325:uefi-std-minimial, r=workingjubileebors-5/+1
Add Minimal Std implementation for UEFI # Implemented modules: 1. alloc 2. os_str 3. env 4. math # Related Links Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 # Additional Information This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from `@dvdhrm,` I have extracted a minimal std implementation to this PR. The example in `src/doc/rustc/src/platform-support/unknown-uefi.md` has been tested for `x86_64-unknown-uefi` and `i686-unknown-uefi` in OVMF. It would be great if someone more familiar with AARCH64 can help with testing for that target. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-24Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkovbors-8/+1
Raise minimum supported Apple OS versions This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (https://github.com/rust-lang/compiler-team/issues/556). As of this PR, rustc and the stdlib now support these versions as the baseline: - macOS: 10.12 Sierra - iOS: 10 - tvOS: 10 - watchOS: 5 (Unchanged) In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing. [Per comment](https://github.com/rust-lang/compiler-team/issues/556#issuecomment-1297175073), this requires a FCP to merge. cc `@wesleywiser.`
2023-09-23Raise minimum supported iOS version to 10.0BlackHoleFox-8/+1
Drop the armv7-apple-ios target too because its no longer supported with the hardware iOS 10 requires.
2023-09-23Pass `-jN` from Make to `BOOTSTRAP_ARGS`onur-ozkan-0/+7
Enables the same functionality as `x -jN` in Make by passing the `-jN` arg from Make to the `BOOTSTRAP_ARGS` args if it is specified. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-22Add Minimal Std implementation for UEFIAyush Singh-5/+1
Implemented modules: 1. alloc 2. os_str 3. env 4. math Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from @dvdhrm, I have extracted a minimal std implementation to this PR. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-21Auto merge of #115230 - Vtewari2311:mod-hurd-latest, r=b-naberbors-2/+6
added support for GNU/Hurd adding support for i686-unknown-hurd-gnu
2023-09-21added support for GNU/HurdSamuel Thibault-2/+6
2023-09-19Rollup merge of #115957 - cuishuang:master, r=GuillaumeGomezGuillaume Gomez-1/+1
fix mismatched symbols
2023-09-19fix mismatched symbolscui fliter-1/+1
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-19Auto merge of #104101 - betrusted-io:xous-libstd-initial, r=bjorn3bors-1/+4
Add initial libstd support for Xous This patchset adds some minimal support to the tier-3 target `riscv32imac-unknown-xous-elf`. The following features are supported: * alloc * thread creation and joining * thread sleeping * thread_local * panic_abort * mutex * condvar * stdout Additionally, internal support for the various Xous primitives surrounding IPC have been added as part of the Xous FFI. These may be exposed as part of `std::os::xous::ffi` in the future, however for now they are not public. This represents the minimum viable product. A future patchset will add support for networking and filesystem support.
2023-09-19Auto merge of #115644 - danakj:catalyst-asan, r=cjgillot,thomccbors-0/+5
Enable ASAN/LSAN/TSAN for *-apple-ios-macabi The -macabi targets are iOS running on MacOS, and they use the runtime libraries for MacOS, thus they have the same sanitizers available as the *-apple-darwin targets. This is based on the work of https://github.com/rust-lang/rust/commit/aacf3213b142f074999429eab767ef7b53c3a1a5. Closes #113935.
2023-09-18Document that the macabi sanitizers are shared with darwindanakj-2/+3
Do not rename and resign the darwin sanitizers a second time for macabi.
2023-09-18Enable ASAN/LSAN/TSAN for *-apple-ios-macabidanakj-0/+4
The -macabi targets are iOS running on MacOS, and they use the runtime libraries for MacOS, thus they have the same sanitizers available as the *-apple-darwin targets.
2023-09-18Rollup merge of #115811 - bzEq:make-aix-known, r=Mark-SimulacrumMatthias Krüger-0/+8
Make AIX known by bootstrap Use `x.py` to build rustc on AIX directly is failing ``` unknown OS type: AIX Build completed unsuccessfully in 0:00:00 ``` If kernel is `AIX`, we should return default triple `powerpc64-ibm-aix` for current rustc.
2023-09-17Auto merge of #115514 - onur-ozkan:bootstrap-codebase-improvements, ↵bors-105/+97
r=albertlarsan68 optimize and cleanup bootstrap source I suggest reviewing this commit by commit.
2023-09-17micro-level optimizations for bootstraponur-ozkan-77/+60
Overall optimizations for bootstrap on conditions, assertions, trait implementations, etc. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-17update the beginning part of `bootstrap/README.md`onur-ozkan-3/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-16Rollup merge of #115836 - RalfJung:rust_analyzer_settings.json, ↵Matthias Krüger-0/+1
r=compiler-errors update rust_analyzer_settings.json This works around https://github.com/rust-lang/rust-analyzer/issues/15595, and avoids relying on the unspecified working directory of this command.
2023-09-16create helper module to be embedded for the bootstrap binariesonur-ozkan-25/+35
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-09-15rustdoc: merge theme css into rustdoc.cssMichael Howell-1/+1
Based on https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119 Having them in separate files used to make more sense, before the migration to CSS variables made the theme files as small as they are nowadays. This is already how docs.rs and mdBook do it.
2023-09-14update SETTINGS_HASHESRalf Jung-0/+1
2023-09-13Adjust commentKai Luo-2/+2
2023-09-13Adjust commentKai Luo-2/+2
2023-09-13Add comment to elaborateKai Luo-0/+6
2023-09-13Make AIX known by bootstrapKai Luo-0/+2
2023-09-11Rollup merge of #115440 - RalfJung:bootstrap-fmt, r=Mark-SimulacrumMatthias Krüger-4/+0
bootstrap/format: remove unnecessary paths.push Cc https://github.com/rust-lang/rust/pull/106415#pullrequestreview-1606367042 I verified that this still formats all fileds when `get_modified_rs_files` is made to return an error. r? ``@Nilstrieb``
2023-09-10Allow testing cg_clif using ./x.py testbjorn3-0/+127
2023-09-08Rollup merge of #115088 - LuuuXXX:issue-112009, r=albertlarsan68Guillaume Gomez-4/+6
Fix Step Skipping Caused by Using the `--exclude` Option The original code was overreacting to the `--exclude` option, https://github.com/rust-lang/rust/blob/eadf69a6c6edfe220fc5b1b659e46e271d75a3a1/src/bootstrap/builder.rs#L257-L260 For example: When `x test --exclude alloc` or `x test --exclude library/alloc` is passed, the entire libraray test is skipped. Related issues: https://github.com/rust-lang/rust/issues/112009
2023-09-08Fix Issue 112009LuuuX-4/+6
modify fuction clond() -> cloned() optimize the code Handle the problem that the pathset is empty and modify the judgment of the builder::tests::test_exclude_kind Delete unnecessary judegment conditions skip test for library/std duo to OOM in benches as library/alloc Add FIXME for WASM32