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

Splits Android NDK path configuration. #27173

Merged
merged 1 commit into from Jul 28, 2015

Conversation

Projects
None yet
8 participants
@mark-buer
Copy link
Contributor

mark-buer commented Jul 20, 2015

Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jul 20, 2015

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@tamird

This comment has been minimized.

Copy link
Contributor

tamird commented Jul 21, 2015

next level bash in here. 👍

@sanxiyn

This comment has been minimized.

Copy link
Member

sanxiyn commented Jul 21, 2015

Can you keep --android-cross-path option for a while so that it sets both CFG_*_NDK variables? The option is used in automation so supporting it will help with transition.

mk/tests.mk Outdated
@@ -650,7 +650,8 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
--python $$(CFG_PYTHON) \
--gdb-version="$(CFG_GDB_VERSION)" \
--lldb-version="$(CFG_LLDB_VERSION)" \
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
--aarch64-linux-android-ndk=$(CFG_AARCH64_LINUX_ANDROID_NDK) \
--arm-linux-androideabi-ndk=$(CFG_ARM_LINUX_ANDROIDEABI_NDK) \

This comment has been minimized.

@alexcrichton

alexcrichton Jul 21, 2015

Member

I think this will also have to update compiletest as these options aren't currently recognized by compiletest.

This comment has been minimized.

@brson

brson Jul 21, 2015

Contributor

This can probably be left as --android-cross path and these lines unchanged. compiletest is never going to be used to test against two android ndks simultaneously.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 21, 2015

cc @brson

configure Outdated
fi
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar ]
*android*)
upperSnakeTarget=$(echo $i | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')

This comment has been minimized.

@alexcrichton

alexcrichton Jul 21, 2015

Member

Stylistically our configure script tends to use underscores instead of camel case, e.g. upper_snake_target

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jul 21, 2015

I begrudgingly accept the reality that this is the best way to do this presently, but I hope it doesn't become a pattern of encoding very specific toolchain dependencies into our configure flags.

@mark-buer

This comment has been minimized.

Copy link
Contributor Author

mark-buer commented Jul 23, 2015

hope it doesn't become a pattern of encoding very specific toolchain dependencies into our configure flags

I agree, this approach isn't ideal. If there is a preferred solution for making Rust able to build multi-Android-targets, please let me know as I'm willing to contribute effort towards it.

The approach within this PR allows additional android targets to be added with minimal configure changes. The --${TARGET_TRIPLE}-ndk options are uniform, as is the NDK sanity testing.

This PR fixes an existing issue where the aarch64-linux-android NDK tools are not tested for within the configure sanity check step.

If Rust does not wish to support the building of multi-Android-target compilers (outright or via this solution), the PR could be modified to test the targets for this multi-Android-target scenario and explicitly fail with an informative error message. Thus, at the least this PR (once modified) can fix the aarch64-linux-android NDK tool test omission and maybe improve the UX of configuring Rust.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 23, 2015

bors added a commit that referenced this pull request Jul 23, 2015

Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 23, 2015

⌛️ Testing commit 393c969 with merge 94ea13d...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 23, 2015

💔 Test failed - auto-win-gnu-64-opt

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 23, 2015

@bors: retry

On Thu, Jul 23, 2015 at 4:32 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-64-opt
http://buildbot.rust-lang.org/builders/auto-win-gnu-64-opt/builds/792


Reply to this email directly or view it on GitHub
#27173 (comment).

bors added a commit that referenced this pull request Jul 23, 2015

Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 23, 2015

⌛️ Testing commit 393c969 with merge b450e90...

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 23, 2015

💔 Test failed - auto-win-gnu-64-nopt-t

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 23, 2015

@bors: retry

On Thu, Jul 23, 2015 at 4:38 PM, bors notifications@github.com wrote:

[image: 💔] Test failed - auto-win-gnu-64-nopt-t
http://buildbot.rust-lang.org/builders/auto-win-gnu-64-nopt-t/builds/791


Reply to this email directly or view it on GitHub
#27173 (comment).

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 24, 2015

⌛️ Testing commit 393c969 with merge 32f26ac...

bors added a commit that referenced this pull request Jul 24, 2015

Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 24, 2015

💔 Test failed - auto-linux-64-x-android-t

@sanxiyn

This comment has been minimized.

Copy link
Member

sanxiyn commented Jul 24, 2015

Build failure is genuine.

@mark-buer

This comment has been minimized.

Copy link
Contributor Author

mark-buer commented Jul 24, 2015

Stdout is saying:

make: /bin/arm-linux-androideabi-gcc: Command not found

/bin/arm-linux-androideabi-gcc looks like the result of an empty variable expansion?

Perhaps something on the build server uses the result of the putvar CFG_ANDROID_CROSS_PATH which I removed from the configure file. I'll try re-adding that line.

@tamird

This comment has been minimized.

Copy link
Contributor

tamird commented Jul 28, 2015

@alexcrichton this needs another r+

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 28, 2015

Ah yes, thanks! Feel free to ping a PR whenever you force-push it as unfortunately github doesn't send out notifications otherwise. While we're at it, though, can you squash this as well?

@mark-buer mark-buer force-pushed the mark-buer:split-android-ndks branch from cdad540 to 5dca876 Jul 28, 2015

@mark-buer

This comment has been minimized.

Copy link
Contributor Author

mark-buer commented Jul 28, 2015

@alexcrichton Now squashed.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 28, 2015

@bors: r+ 5dca876

Thanks!

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 28, 2015

⌛️ Testing commit 5dca876 with merge ec70397...

bors added a commit that referenced this pull request Jul 28, 2015

Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 28, 2015

💔 Test failed - auto-linux-64-x-android-t

@mark-buer mark-buer force-pushed the mark-buer:split-android-ndks branch from 5dca876 to 33a7e67 Jul 28, 2015

@mark-buer

This comment has been minimized.

Copy link
Contributor Author

mark-buer commented Jul 28, 2015

PR updated to fix my brain fart that caused auto-linux-64-x-android-t test failures.

Should be good now. (sorry)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jul 28, 2015

@bors: r+ 33a7e67

No worries!

bors added a commit that referenced this pull request Jul 28, 2015

Auto merge of #27173 - mark-buer:split-android-ndks, r=alexcrichton
Allows a multi-Android-target Rust compiler to be built.
Without these (or similar) changes, only a single-Android-target Rust compiler is possible.
Please see https://internals.rust-lang.org/t/dual-target-android-rust-compiler/2382/3 for additional context.
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 28, 2015

⌛️ Testing commit 33a7e67 with merge aa6efd9...

@bors bors merged commit 33a7e67 into rust-lang:master Jul 28, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@mark-buer mark-buer deleted the mark-buer:split-android-ndks branch Jul 28, 2015

@bors bors referenced this pull request Jul 28, 2015

Closed

Cleanup configure nits #27331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.