Skip to content
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

Fix test caching on Windows/GNU #39892

Merged
merged 1 commit into from
Feb 24, 2017
Merged

Fix test caching on Windows/GNU #39892

merged 1 commit into from
Feb 24, 2017

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Feb 16, 2017

Addresses #36385 (comment)

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @petrochenkov!

@@ -294,9 +298,7 @@ fn compiler_file(compiler: &Path, file: &str) -> PathBuf {
}

pub fn create_sysroot(build: &Build, compiler: &Compiler) {
let sysroot = build.sysroot(compiler);
let _ = fs::remove_dir_all(&sysroot);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a somewhat crucial step as it cleans out any old artifacts to make sure we don't preserve anything by accident. Could the *.o files above be generated into something like build/$target/rtstartup/foo.o and then copied from there to the sysroot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it looks like all the remaining sysroot components are already built somewhere else and then copied to sysroot directory.

@petrochenkov
Copy link
Contributor Author

Updated with suggestion from #39892 (comment)
rsbegin.o/rsend.o are built in the native directrory (because they are shared between stages and because I didn't want to add another top-level directory) and then copied into sysroot directories.

@alexcrichton
Copy link
Member

@bors: r+

Looks great!

@bors
Copy link
Contributor

bors commented Feb 21, 2017

📌 Commit 0c4c6fd has been approved by alexcrichton

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 22, 2017
Fix test caching on Windows/GNU

Addresses rust-lang#36385 (comment)

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now the sysroot directory is reused and mingw startup objects are rebuilt only when necessary, so test caching works.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 23, 2017
Fix test caching on Windows/GNU

Addresses rust-lang#36385 (comment)

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now the sysroot directory is reused and mingw startup objects are rebuilt only when necessary, so test caching works.
bors added a commit that referenced this pull request Feb 23, 2017
Rollup of 11 pull requests

- Successful merges: #39859, #39886, #39892, #39903, #39914, #39918, #39988, #40010, #40027, #40030, #40035
- Failed merges:
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 23, 2017
Fix test caching on Windows/GNU

Addresses rust-lang#36385 (comment)

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now the sysroot directory is reused and mingw startup objects are rebuilt only when necessary, so test caching works.
@bors
Copy link
Contributor

bors commented Feb 24, 2017

⌛ Testing commit 0c4c6fd with merge 0823077...

bors added a commit that referenced this pull request Feb 24, 2017
Fix test caching on Windows/GNU

Addresses #36385 (comment)

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 24, 2017
Fix test caching on Windows/GNU

Addresses rust-lang#36385 (comment)

Previously the sysroot directory was purged on every build and mingw startup objects were rebuilt unconditionally and always triggered test reruns.
Now mingw startup objects are built in the native directory and then copied into the sysroot directory. They are also rebuilt only when necessary, so test caching works.
@bors
Copy link
Contributor

bors commented Feb 24, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 0823077 to master...

bors added a commit that referenced this pull request Feb 24, 2017
Rollup of 17 pull requests

- Successful merges: #39777, #39815, #39845, #39886, #39892, #39903, #39905, #39914, #39927, #39940, #40010, #40030, #40048, #40050, #40052, #40060, #40071
- Failed merges:
@bors bors merged commit 0c4c6fd into rust-lang:master Feb 24, 2017
@petrochenkov petrochenkov deleted the rt branch March 16, 2017 19:43
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.

5 participants