Skip to content

Splits Android NDK path configuration. #27173

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 1 commit into from
Jul 28, 2015

Conversation

mark-buer
Copy link
Contributor

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

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

tamird commented Jul 21, 2015

next level bash in here. 👍

@sanxiyn
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.

@@ -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) \
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Member

cc @brson

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

Choose a reason for hiding this comment

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

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

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

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
Copy link
Member

@bors: r+ 393c9695dd15eb55bafca70650ec1d1b14875c53

@bors
Copy link
Collaborator

bors commented Jul 23, 2015

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

@bors
Copy link
Collaborator

bors commented Jul 23, 2015

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

@alexcrichton
Copy link
Member

@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
Copy link
Collaborator

bors commented Jul 23, 2015

⌛ Testing commit 393c969 with merge b450e90...

@bors
Copy link
Collaborator

bors commented Jul 23, 2015

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

@alexcrichton
Copy link
Member

@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
Copy link
Collaborator

bors commented Jul 24, 2015

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

@bors
Copy link
Collaborator

bors commented Jul 24, 2015

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

@sanxiyn
Copy link
Member

sanxiyn commented Jul 24, 2015

Build failure is genuine.

@mark-buer
Copy link
Contributor Author

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

tamird commented Jul 28, 2015

@alexcrichton this needs another r+

@alexcrichton
Copy link
Member

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 split-android-ndks branch from cdad540 to 5dca876 Compare July 28, 2015 01:32
@mark-buer
Copy link
Contributor Author

@alexcrichton Now squashed.

@alexcrichton
Copy link
Member

@bors: r+ 5dca8764145721a18698cfba76da3d2472a841af

Thanks!

@bors
Copy link
Collaborator

bors commented Jul 28, 2015

⌛ Testing commit 5dca876 with merge ec70397...

@bors
Copy link
Collaborator

bors commented Jul 28, 2015

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

@mark-buer mark-buer force-pushed the split-android-ndks branch from 5dca876 to 33a7e67 Compare July 28, 2015 07:22
@mark-buer
Copy link
Contributor Author

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

Should be good now. (sorry)

@alexcrichton
Copy link
Member

@bors: r+ 33a7e67

No worries!

bors added a commit that referenced this pull request Jul 28, 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.
@bors
Copy link
Collaborator

bors commented Jul 28, 2015

⌛ Testing commit 33a7e67 with merge aa6efd9...

@bors bors merged commit 33a7e67 into rust-lang:master Jul 28, 2015
@mark-buer mark-buer deleted the split-android-ndks branch July 28, 2015 19:37
@bors bors mentioned this pull request Jul 28, 2015
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.

8 participants