about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-10-14add unit test for Config::verifyonur-ozkan-1/+22
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-14optimize file read in Config::verifyonur-ozkan-10/+28
`Config::verify` refactored to improve the efficiency and memory usage of file hashing. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-14Rollup merge of #116603 - onur-ozkan:reorganize-cargo-file, r=Mark-SimulacrumMatthias Krüger-12/+12
Reorganize `bootstrap/Cargo.toml` The information here https://github.com/rust-lang/rust/blob/5b88d659f8c2428536589d4bd36b9099d53a6815/src/bootstrap/Cargo.toml#L55-L59 was wrong. This PR fixes that and sorts the dependencies in ascending order. Additionally, I moved the 'features' section above up to make it appear easier.
2023-10-14Auto merge of #116727 - matthiaskrgr:rollup-3qqdrny, r=matthiaskrgrbors-4/+0
Rollup of 5 pull requests Successful merges: - #116630 (Add ability to get lines/filename for Span in smir) - #116644 (remove outdated bootstrap FIXME) - #116695 (Fix a comment) - #116696 (Misc improvements) - #116704 (Fix AFIT lint message to mention pitfall) r? `@ghost` `@rustbot` modify labels: rollup
2023-10-14Rollup merge of #116577 - onur-ozkan:add-safety-block-on-unsafe, r=clubby789Matthias Krüger-0/+4
add `SAFETY` block on the usage of unsafe `getuid` We pointed out this unsafe usage in #109859, and as a result, we received a fix PR #116476. However, it's important to note that the `libc::getuid()` never actually fails. This PR aims to clarify its safety.
2023-10-14Rollup merge of #116644 - onur-ozkan:outdated-fixme, r=clubby789Matthias Krüger-4/+0
remove outdated bootstrap FIXME https://github.com/emscripten-core/emscripten/issues/9013 is fixed and this should be no longer needed.
2023-10-14Auto merge of #116407 - Mark-Simulacrum:bootstrap-bump, r=onur-ozkanbors-11/+2
Bump bootstrap compiler to just-released beta https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2023-10-11Auto merge of #116448 - Kobzol:bootstrap-host-flags, r=onur-ozkan,petrochenkovbors-37/+57
Pass rustc shim flags using environment variable This PR implements a generalized way of passing of host flags to the `rustc` shim in bootstrap, as proposed [here](https://github.com/rust-lang/rust/pull/116278#discussion_r1346979960). I tried to implement the bootstrap side using `OsString`, but then I realized that the shim code was using `env::var` before anyway, instead of `env::var_os`, so I just settled on a `String`. The shim side is still general and uses `env::vars_os` now. I'm not sure if we actually need to do something with the `rustdoc` shim. It *seems* to me that the env. vars passed to it (`RUSTDOC_LINKER`) and (`RUSTDOC_LLD_NO_THREADS`) could just be passed to cargo directly (or rather, the commands that they invoke in the shim could be passed directly). I'm not sure why are they set by the shim. r? `@onur-ozkan` CC `@petrochenkov`
2023-10-12remove outdated bootstrap FIXMEonur-ozkan-4/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-11Pass BOLT settings at the correct stepJakub Beránek-1/+1
2023-10-10move `features` above to appear before others sectionsonur-ozkan-3/+3
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-10sort/reorganize dependencies in bootstrap/Cargo.tomlonur-ozkan-9/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-09Add `--enable-bolt-settings` bootstrap flagJakub Beránek-1/+6
2023-10-09Enable relocations for BOLTJakub Beránek-0/+11
2023-10-09Pass more host flags using `RUSTC_HOST_FLAGS`Jakub Beránek-15/+15
2023-10-09add `SAFETY` block on usage of unsafe `getuid`onur-ozkan-0/+4
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-09Auto merge of #116532 - onur-ozkan:enable-rustflags-bootstrap-on-bootstrap, ↵bors-0/+7
r=albertlarsan68 Add RUSTFLAGS_BOOTSTRAP to RUSTFLAGS for bootstrap compilation Adds `RUSTFLAGS_BOOTSTRAP` to `RUSTFLAGS` for bootstrap compilation when `RUSTFLAGS_BOOTSTRAP` exists in the environment. With this PR, `RUSTFLAGS_BOOTSTRAP` will affect every build(as we already do for rustc and std) compiled with stage0 compiler. Resolves #94234
2023-10-08Bump to latest betaMark Rousskov-11/+2
2023-10-08Add RUSTFLAGS_BOOTSTRAP to RUSTFLAGS for bootstrap compilationonur-ozkan-0/+7
Note that RUSTFLAGS_BOOTSTRAP should always be added to the end of RUSTFLAGS to be actually effective (e.g., if we have `-Dwarnings` in RUSTFLAGS, passing `-Awarnings` from RUSTFLAGS_BOOTSTRAP should override it). Signed-off-by: onur-ozkan <work@onurozkan.dev>
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.