bootstrap: open `llvm-config` as r+w by jieyouxu · Pull Request #127850 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

labels

Jul 17, 2024

ChrisDenton

@jieyouxu

This previously failed on Windows because the `llvm_config` file was
open as read-only.

onur-ozkan

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Jul 17, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 17, 2024
Rollup of 4 pull requests

Successful merges:

 - rust-lang#127763 (Make more Windows functions `#![deny(unsafe_op_in_unsafe_fn)]`)
 - rust-lang#127813 (Prevent double reference in generic futex)
 - rust-lang#127847 (Reviewer on vacation)
 - rust-lang#127850 (bootstrap: open `llvm-config` as r+w)

r? `@ghost`
`@rustbot` modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 17, 2024
Rollup of 4 pull requests

Successful merges:

 - rust-lang#127763 (Make more Windows functions `#![deny(unsafe_op_in_unsafe_fn)]`)
 - rust-lang#127813 (Prevent double reference in generic futex)
 - rust-lang#127847 (Reviewer on vacation)
 - rust-lang#127850 (bootstrap: open `llvm-config` as r+w)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jul 17, 2024
Rollup merge of rust-lang#127850 - jieyouxu:bootstrap-llvm-config, r=onur-ozkan

bootstrap: open `llvm-config` as r+w

This previously failed on Windows and prevented building on Windows for compiler stuff because the `llvm-config` file was open as read-only.

Tested locally on a Windows machine.

Fixes rust-lang#127849.

@jieyouxu jieyouxu deleted the bootstrap-llvm-config branch

July 17, 2024 16:30

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Aug 12, 2024
Only try to modify file times of a writable file

- First commit fixes a failure that I was running into locally trying to build a stage 1 `./x build library --stage 1` on windows due to trying to modify file times of a read-only file.
- Second commit introduces a `set_file_times` helper which opens a given path as a file in r+w mode and then sets file times. This should hopefully make setting file times less error prone, since trying to set file times on read-only file also happened in rust-lang#127850. (And apparently it only fails locally on Windows or something weird like that.)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Aug 12, 2024
Only try to modify file times of a writable file

- First commit fixes a failure that I was running into locally trying to build a stage 1 `./x build library --stage 1` on windows due to trying to modify file times of a read-only file.
- Second commit introduces a `set_file_times` helper which opens a given path as a file in r+w mode and then sets file times. This should hopefully make setting file times less error prone, since trying to set file times on read-only file also happened in rust-lang#127850. (And apparently it only fails locally on Windows or something weird like that.)

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 12, 2024
Only try to modify file times of a writable file

- First commit fixes a failure that I was running into locally trying to build a stage 1 `./x build library --stage 1` on windows due to trying to modify file times of a read-only file.
- Second commit introduces a `set_file_times` helper which opens a given path as a file in r+w mode and then sets file times. This should hopefully make setting file times less error prone, since trying to set file times on read-only file also happened in rust-lang#127850. (And apparently it only fails locally on Windows or something weird like that.)

try-job: dist-loongarch64-musl

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 12, 2024
Only try to modify file times of a writable file

- First commit fixes a failure that I was running into locally trying to build a stage 1 `./x build library --stage 1` on windows due to trying to modify file times of a read-only file.
- Second commit introduces a `set_file_times` helper which opens a given path as a file in r+w mode and then sets file times. This should hopefully make setting file times less error prone, since trying to set file times on read-only file also happened in rust-lang#127850. (And apparently it only fails locally on Windows or something weird like that.)

try-job: dist-loongarch64-musl
try-job: x86_64-msvc

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Aug 15, 2024
Only try to modify file times of a writable file on Windows

Introduces a `set_file_times` helper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.

This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in rust-lang#127850.

try-job: dist-loongarch64-musl
try-job: x86_64-msvc

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Aug 16, 2024
Only try to modify file times of a writable file on Windows

Introduces a `set_file_times` helper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.

This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in rust-lang#127850.

try-job: dist-loongarch64-musl
try-job: x86_64-msvc

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Aug 16, 2024
Only try to modify file times of a writable file on Windows

Introduces a `set_file_times` helper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.

This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in rust-lang#127850.

try-job: dist-loongarch64-musl
try-job: x86_64-msvc

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request

Aug 16, 2024
Only try to modify file times of a writable file on Windows

Introduces a `set_file_times` helper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.

This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in rust-lang#127850.

try-job: dist-loongarch64-musl
try-job: x86_64-msvc

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 16, 2024
Only try to modify file times of a writable file on Windows

Introduces a `set_file_times` helper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.

This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in rust-lang#127850.

try-job: dist-loongarch64-musl
try-job: x86_64-msvc