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

cross compilation improvements #5781

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

cross compilation improvements #5781

wants to merge 3 commits into from

Conversation

folkertdev
Copy link
Contributor

some preparations that should make cross compilation (from _ to windows, specifically) easier.


std::fs::write(tempfile.path(), HOST_UNIX)?;
static TMP: OnceLock<std::io::Result<NamedTempFile>> = OnceLock::new();
Copy link
Contributor Author

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

Comment on lines +67 to +68
// architecture: target_lexicon::Architecture::X86_64,
// operating_system: target_lexicon::OperatingSystem::Linux,
Copy link
Contributor Author

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,
Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@lukewilliamboswell
Copy link
Collaborator

@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?

@github-actions
Copy link

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 Closed are not deleted, so no matter what, the PR will still be right here in the repo. You can always access it and reopen it anytime you like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants