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

Fixed iOS build after oibit #19729

Merged
merged 1 commit into from
Dec 17, 2014
Merged

Fixed iOS build after oibit #19729

merged 1 commit into from
Dec 17, 2014

Conversation

vhbit
Copy link
Contributor

@vhbit vhbit commented Dec 11, 2014

No description provided.

brson added a commit to brson/rust that referenced this pull request Dec 12, 2014
bors added a commit that referenced this pull request Dec 14, 2014
Fixed iOS build after oibit

Reviewed-by: alexcrichton
bors referenced this pull request Dec 16, 2014
This creates an enormous amount of spew.
bors added a commit that referenced this pull request Dec 16, 2014
Fixed iOS build after oibit

Reviewed-by: alexcrichton
bors referenced this pull request Dec 16, 2014
Using a type alias for iterator implementations is fragile since this
exposes the implementation to users of the iterator, and any changes
could break existing code.

This commit changes the iterators of `VecMap` to use
proper new types, rather than type aliases.  However, since it is
fair-game to treat a type-alias as the aliased type, this is a:

[breaking-change].
bors added a commit that referenced this pull request Dec 16, 2014
Fixed iOS build after oibit

Reviewed-by: alexcrichton
@@ -21,6 +21,7 @@ pub use self::_Unwind_Action::*;
pub use self::_Unwind_State::*;
pub use self::_Unwind_Reason_Code::*;

use core::kinds::Copy;
Copy link
Contributor

Choose a reason for hiding this comment

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

This line caused the build to fail (unused import), so you may remove the line and use an absolute path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's weird as I had no problems building it (OS X and iOS)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure, but maybe the warning level is different? The buildbot considers any warnings to be critical.

You can see the detailed error in here: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2691/steps/compile/logs/stdio

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, now I see. The build fails only on Android. Your #[cfg] states "Not ARM or iOS", so it builds correctly on non-ARM targets. However it fails on ARM-based non-iOS (say, Android) targets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. The fun thing is that I can't use absolute path - in order to do that I have to use core which will fail with the same reason. Got a pretty weird workaround with a module, will check how it builds now.

@@ -33,6 +33,13 @@ pub enum _Unwind_Action {
_UA_END_OF_STACK = 16,
}

#[cfg(any(not(target_arch = "arm"), target_os = "ios"))]
mod copy_hack {
use core::kinds::Copy;
Copy link
Contributor

Choose a reason for hiding this comment

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

😄 This looks a bit funny. Is it because we are currently forcing use directives at the top of a block? I remember having seen a suggestion to relieve this restriction, but that's another story...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've finally come with another way to express it, although to be honest, I can't say I like any of available options too much.

@alexcrichton
Copy link
Member

I think this may be able to avoid the weird inner module with #[deriving(Copy)] (also more idiomatic)

@vhbit
Copy link
Contributor Author

vhbit commented Dec 16, 2014

@alexcrichton #[deriving(Copy)] expands into std::kinds::Copy which isn't available in rustrt

@alexcrichton
Copy link
Member

You'll just need to add pub use core::kinds; to the mod std at the root of the crate.

@vhbit
Copy link
Contributor Author

vhbit commented Dec 16, 2014

Hmm, I've never thought about such module hacks.
Indeed, now it looks like it should.

@vhbit
Copy link
Contributor Author

vhbit commented Dec 16, 2014

Does Android build run tests on device or it just builds like iOS?

@alexcrichton
Copy link
Member

It runs tests in the standard emulator (does both)

brson added a commit to brson/rust that referenced this pull request Dec 16, 2014
bors added a commit that referenced this pull request Dec 17, 2014
Fixed iOS build after oibit

Reviewed-by: alexcrichton
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 17, 2014
@bors bors merged commit b7ba69d into rust-lang:master Dec 17, 2014
@vhbit vhbit deleted the ios-oibit-fix branch December 18, 2014 08:10
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.

4 participants