Skip to content

Test that targets without a shipping libcore / libstd build properly #1263

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 19 commits into from
Feb 20, 2019

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented Feb 18, 2019

This PR tests that libc builds on targets that currently don't ship a libcore/libstd by cross-compiling to them from Linux and MacOSX using Xargo.

This fixes the build on DragonflyBSD (superseeds #1237), Haiku, bitrig, and OpenBSD (superseeds #1259).

cc @asomers @strangelittlemonkey @semarie

@rust-highfive
Copy link

@gnzlbg: no appropriate reviewer found, use r? to override

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 18, 2019

r? @gnzlbg (would be nice if some other people could review this, i'm unsure whether the bitrig fix is ok)

Copy link
Contributor

@asomers asomers left a comment

Choose a reason for hiding this comment

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

So with this PR, Travis will cross compile OSes like Dragonfly from both Linux and OSX? Isn't that redundant? What coverage does libc gain by cross-compiling from two different hosts?

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 18, 2019

So with this PR, Travis will cross compile OSes like Dragonfly from both Linux and OSX? Isn't that redundant?

For the targets implemented in this PR, yes. I'm unsure if any of these tier2/tier3 targets can only be targeted by some toolchains, but AFAIK not all toolchains can cross-compile to all targets, e.g., the x86_64-apple-darwin can cross-compile to aarch64-apple-ios but the x86_64-unknown-linux-gnu toolchain cannot (I think, I haven't been able to cross-compile to that).

What coverage does libc gain by cross-compiling from two different hosts?

None I think, it was just easier CI wise to enable this, but I guess I should just enable this for Linux, and if we need something more in the future, then we'll enable it then.

@strangelittlemonkey
Copy link

While this builds, it still doesn't pass the tests that were failing in my PR. Would it not make sense to merge my PR and then rebase this on top of it?

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 19, 2019

Would it not make sense to merge my PR and then rebase this on top of it?

Yes, this only fix the "build" part of it, it does not run the libc-tests on DragonflyBSD.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 19, 2019

@asomers I've addresses the issues, thoughts?

@gnzlbg gnzlbg mentioned this pull request Feb 19, 2019
@asomers
Copy link
Contributor

asomers commented Feb 19, 2019

@asomers I've addresses the issues, thoughts?

Honestly, no. This is fairly far outside of my area of expertise.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 19, 2019

Honestly, no.

No thoughts? Or that some of the issues have not been addressed?

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 19, 2019

cc @alexcrichton could you review this ?

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 20, 2019

So i've removed the CMSG_ APIs from bitrig since they never compiled correctly, and one would need to add platform-specific code for the platform that must be manually verified.

I'll merge this as soon as CI is green, cc @Susurrus if you want to continue the work with the extra_traits feature, after this PR is merged it should be pretty safe to do so without causing libc to stop compiling in some of the supported platforms.

@gnzlbg gnzlbg force-pushed the no_core_build branch 3 times, most recently from 4893b20 to 16d7b32 Compare February 20, 2019 13:36
@alexcrichton
Copy link
Member

All looks reasonable to me!

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 20, 2019

There was some trouble with building the documentation of some of the targets that are built with xargo, but now that's all fixed. I initially used xargo to build the docs of all targets, but that made the documentation bot take over 50 min. The last commit uses cargo to build the docs, and if that fails, then it tries xargo, dialing the doc bot back to under 15 min.

That's a more general approach that we could use in the "build-only jobs", to avoid having to keep track of which targets can be built with cargo, and which one need cargo, but we can always do that later.

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 20, 2019

📌 Commit a25a42b has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Feb 20, 2019

⌛ Testing commit a25a42b with merge 0fa4388...

bors added a commit that referenced this pull request Feb 20, 2019
Test that targets without a shipping libcore / libstd build properly

This PR tests that `libc` builds on targets that currently don't ship a `libcore`/`libstd` by cross-compiling to them from Linux and MacOSX using `Xargo`.

This fixes the build on DragonflyBSD (superseeds #1237), Haiku, bitrig, and OpenBSD (superseeds #1259).

cc @asomers @strangelittlemonkey @semarie
@bors
Copy link
Contributor

bors commented Feb 20, 2019

💥 Test timed out

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 20, 2019

@bors: retry

@bors
Copy link
Contributor

bors commented Feb 20, 2019

⌛ Testing commit a25a42b with merge 173aace...

bors added a commit that referenced this pull request Feb 20, 2019
Test that targets without a shipping libcore / libstd build properly

This PR tests that `libc` builds on targets that currently don't ship a `libcore`/`libstd` by cross-compiling to them from Linux and MacOSX using `Xargo`.

This fixes the build on DragonflyBSD (superseeds #1237), Haiku, bitrig, and OpenBSD (superseeds #1259).

cc @asomers @strangelittlemonkey @semarie
@bors
Copy link
Contributor

bors commented Feb 20, 2019

💔 Test failed - checks-travis

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 20, 2019

@bors: retry

@bors
Copy link
Contributor

bors commented Feb 20, 2019

⌛ Testing commit a25a42b with merge 9b708a2...

bors added a commit that referenced this pull request Feb 20, 2019
Test that targets without a shipping libcore / libstd build properly

This PR tests that `libc` builds on targets that currently don't ship a `libcore`/`libstd` by cross-compiling to them from Linux and MacOSX using `Xargo`.

This fixes the build on DragonflyBSD (superseeds #1237), Haiku, bitrig, and OpenBSD (superseeds #1259).

cc @asomers @strangelittlemonkey @semarie
@bors
Copy link
Contributor

bors commented Feb 20, 2019

💔 Test failed - checks-travis

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Feb 20, 2019

@bors: retry

@bors
Copy link
Contributor

bors commented Feb 20, 2019

⌛ Testing commit a25a42b with merge 5cefa3a...

bors added a commit that referenced this pull request Feb 20, 2019
Test that targets without a shipping libcore / libstd build properly

This PR tests that `libc` builds on targets that currently don't ship a `libcore`/`libstd` by cross-compiling to them from Linux and MacOSX using `Xargo`.

This fixes the build on DragonflyBSD (superseeds #1237), Haiku, bitrig, and OpenBSD (superseeds #1259).

cc @asomers @strangelittlemonkey @semarie
@bors
Copy link
Contributor

bors commented Feb 20, 2019

💔 Test failed - checks-cirrus

@bors
Copy link
Contributor

bors commented Feb 20, 2019

☀️ Test successful - checks-cirrus, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing 5cefa3a to master...

@bors bors merged commit a25a42b into rust-lang:master Feb 20, 2019
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.

6 participants