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

Android support updates #438

Merged
merged 1 commit into from Aug 6, 2020
Merged

Conversation

aaron-bray
Copy link

Updated NDK revision
Specified ARCH ABI
Add linker flags to support users of the android os log utility

Updated NDK revision
Specified ARCH ABI
Add linker flags to support users of the android os log utility
@aaron-bray
Copy link
Author

I would like to consider changing the folder names from android-arm and android-arm64 to android-armv7a and android-armv8a respectively, this properly reflects the architecture abi.

@aaron-bray
Copy link
Author

Also, there are just a lot of extra configuring that users might want to do
I did it by manually modifying the Dockerfile (i.e. NDK_REVISION and NDK API)
I think we could support this only in the Toolchain file, generalizing the Dockerfile

  • We no longer need to use the make_standalone_toolchain script
  • We could use ENV variable to specify the toolchain compiler version to use

I actually did this by bypassing the provide cmake.sh script, and calling the /usr/bin/cmake executable directly with a -DCMAKE_TOOLCHAIN_FILE option that I created

There are a lot of specific compiler and linker options that one could use when compiling for specific android devices

  • ex. -mcpu=cortex-a57+crypto

This could also lead to 1 android container (with defaults to armv8a)
And a Readme that explains how to edit the provided Toolchain file, and provide it in your build
(so you can change the arch abi, target api, and provide some device specific compiler options)

Copy link
Collaborator

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

@aaron-bray thanks!

@thewtex
Copy link
Collaborator

thewtex commented Aug 6, 2020

I would like to consider changing the folder names from android-arm and android-arm64 to android-armv7a and android-armv8a respectively, this properly reflects the architecture abi.

👍 good idea, could be added in follow-up PRs.

@thewtex
Copy link
Collaborator

thewtex commented Aug 6, 2020

Also, there are just a lot of extra configuring that users might want to do
I did it by manually modifying the Dockerfile (i.e. NDK_REVISION and NDK API)
I think we could support this only in the Toolchain file, generalizing the Dockerfile

* We no longer need to use the make_standalone_toolchain script

* We could use ENV variable to specify the toolchain compiler version to use

I actually did this by bypassing the provide cmake.sh script, and calling the /usr/bin/cmake executable directly with a -DCMAKE_TOOLCHAIN_FILE option that I created

There are a lot of specific compiler and linker options that one could use when compiling for specific android devices

* ex. -`mcpu=cortex-a57+crypto`

This could also lead to 1 android container (with defaults to armv8a)
And a Readme that explains how to edit the provided Toolchain file, and provide it in your build
(so you can change the arch abi, target api, and provide some device specific compiler options)

We can also pass Docker environmental variables and CMake -D configuration values via the dockcross invocation script, so we may want a combination of supporting these options and how they are specified in the Dockerfile, the toolchain file, and having them well described in the documentation.

@thewtex thewtex merged commit 2b8f043 into dockcross:master Aug 6, 2020
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.

None yet

2 participants