Skip to content

Remove build_sysroot folder #2

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

Merged
merged 7 commits into from
Mar 22, 2024

Conversation

GuillaumeGomez
Copy link
Collaborator

With this, the top-level directory is finally clean.

@GuillaumeGomez GuillaumeGomez force-pushed the rm-build_sysroot-folder branch from 97cb210 to f191ca0 Compare March 20, 2024 15:02
@@ -116,17 +89,11 @@ fn prepare_libcore(
patches.sort();
for file_path in patches {
println!("[GIT] apply `{}`", file_path.display());
let path = Path::new("../..").join(file_path);
let path = Path::new("../../..").join(file_path);
Copy link
Owner

Choose a reason for hiding this comment

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

Would it be clearer to use an absolute path?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hard to say...

]
.iter()
.any(|check| line.contains(check))
if ["//@ error-pattern:", "//@ build-fail", "//@ run-fail", "-Cllvm-args", "//~", "thread"]
Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer to keep the original formatting, so please use #[rustfmt::skip] or whatever.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good to me.

@antoyo
Copy link
Owner

antoyo commented Mar 21, 2024

The CI failed, possible because you would need to adjust the --sysroot argument that we send to rustc.

@GuillaumeGomez GuillaumeGomez force-pushed the rm-build_sysroot-folder branch 6 times, most recently from b191cc7 to bfed583 Compare March 21, 2024 19:37
@@ -63,7 +63,7 @@ jobs:
git config --global user.name "User"
./y.sh prepare
# FIXME(antoyo): we cannot enable LTO for stdarch tests currently because of some failing LTO tests using proc-macros.
echo -n 'lto = "fat"' >> build_sysroot/Cargo.toml
echo -n 'lto = "fat"' >> build/build_sysroot/Cargo.toml
Copy link
Owner

Choose a reason for hiding this comment

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

Could the CI failure due to the fact that this change is overwritten by the fact that you now copy this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hum indeed.

@GuillaumeGomez GuillaumeGomez force-pushed the rm-build_sysroot-folder branch 2 times, most recently from d8156a6 to f863069 Compare March 22, 2024 16:26
cd build_sysroot/sysroot_src/library/stdarch/
CHANNEL=release TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ../../../../y.sh cargo test
cd build/build_sysroot/sysroot_src/library/stdarch/
CHANNEL=release TARGET=x86_64-unknown-linux-gnu CG_RUSTFLAGS="-Ainternal_features" ../../../../../y.sh cargo test
Copy link
Owner

Choose a reason for hiding this comment

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

This is starting to have many ../. Would it work to use --manifest-path instead (without changing directory)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's worth a try.

x if runners.contains_key(x) => {
test_arg.runners.insert(x.into());
x if runners.contains_key(x)
&& !test_arg.runners.iter().any(|runner| runner == x) =>
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
&& !test_arg.runners.iter().any(|runner| runner == x) =>
&& !test_arg.runners.contains(x) =>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's what I did first, but:

error[E0308]: mismatched types
    --> src/test.rs:131:51
     |
131  |                     && !test_arg.runners.contains(x) =>
     |                                          -------- ^ expected `&String`, found `&str`
     |                                          |
     |                                          arguments to this method are incorrect
     |
     = note: expected reference `&std::string::String`
                found reference `&str`

@GuillaumeGomez GuillaumeGomez force-pushed the rm-build_sysroot-folder branch 2 times, most recently from f8d21b2 to 07e9497 Compare March 22, 2024 19:35
@GuillaumeGomez GuillaumeGomez force-pushed the rm-build_sysroot-folder branch from 07e9497 to da070d3 Compare March 22, 2024 19:37
@antoyo antoyo merged commit eea2f89 into antoyo:master Mar 22, 2024
@antoyo
Copy link
Owner

antoyo commented Mar 22, 2024

Thanks for your contribution.

@GuillaumeGomez GuillaumeGomez deleted the rm-build_sysroot-folder branch March 22, 2024 20:37
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.

2 participants