-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
cross compilation improvements #5781
base: main
Are you sure you want to change the base?
Conversation
|
||
std::fs::write(tempfile.path(), HOST_UNIX)?; | ||
static TMP: OnceLock<std::io::Result<NamedTempFile>> = OnceLock::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should mean that the file is only created once per test run
// architecture: target_lexicon::Architecture::X86_64, | ||
// operating_system: target_lexicon::OperatingSystem::Linux, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in practice the "unix" host file is the file compiled for this host. That means that we need to be pretty vague in this pattern to not cause regressions. Eventually we should generate the builtins for more targets, and be more specific here.
} | ||
} else { | ||
false | ||
LinkType::Dylib => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linking the dev tests (using zig, today) into a dylib is slow. I think (and fear) that we need to go do this ourselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it's not so bad? it's just a fancy copy https://github.com/gimli-rs/object/blob/master/crates/examples/src/bin/pecopy.rs
fancy because we need to join two files, the test code and the builtins.
@bhansconnect would the changes in this PR be a better solution than what I did in this commit for the zig-11-llvm-16 branch? |
Thank you for your contribution! Sometimes PRs end up staying open for a long time without activity, which can make the list of open PRs get long and time-consuming to review. To keep things manageable for reviewers, this bot automatically closes PRs that haven’t had activity in 60 days. This PR hasn’t had activity in 30 days, so it will be automatically closed if there is no more activity in the next 30 days. Keep in mind that PRs marked |
some preparations that should make cross compilation (from _ to windows, specifically) easier.