-
Notifications
You must be signed in to change notification settings - Fork 535
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 build with Cross Compilation for BLAS and OpenCL back-ends #848
Closed
Closed
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c954e33
Android build
lealgo 6afb880
Move lzma link argument after opencl detection
lealgo c9039f3
Initial support for cross-compilation
lealgo 75eb1ba
Remove unneeded -ldl from Android cross-files, remove /usr/include/ f…
lealgo f0b1c16
Add cross-file for Cortex-A57
lealgo 1430507
Target lower Android API levels for wider device support
lealgo 4173b92
Merge branch 'master' into android-build, getting the new eigen support
lealgo c933b1a
Add alternate paths for the tuning file on Android
lealgo 68281b4
Build armv7a with NDK r14b
lealgo 3d55004
Revert "Add alternate paths for the tuning file on Android"
lealgo 241ed4a
Revert to master's tuning file location
lealgo 090e68c
add link to zlib issue with older NDK's
lealgo 5535d75
v0.23.0-dev -> v0.23.0-rc1
mooskagh 12bc3f0
Merge remote-tracking branch 'origin/master' into release/0.23
mooskagh 65e13d8
v0.23.0-rc2
mooskagh e4d50c4
Merge remote-tracking branch 'upstream/release/0.23' into android-build
lealgo b966995
Fix meson opencl vars messed up after merge
lealgo 89a9ec3
make eigen the last blas option (#1025)
borg323 02fc8e0
v0.23.0-rc2 -> v0.23.0
mooskagh 2498564
Merge remote-tracking branch 'upstream/release/0.23' into android-build
lealgo 120566e
Add PIE switches to armv7 cross-file
lealgo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
[host_machine] | ||
system = 'android' | ||
cpu_family = 'arm' | ||
cpu = 'aarch64' | ||
endian = 'little' | ||
|
||
[properties] | ||
needs_exe_wrapper = true | ||
cpp_args = ['-Dandroid'] | ||
cpp_link_args = ['-ldl', '-llog', '-static-libstdc++'] | ||
|
||
[paths] | ||
|
||
[binaries] | ||
c = 'aarch64-linux-android28-clang' | ||
cpp = 'aarch64-linux-android28-clang++' | ||
ar = 'aarch64-linux-android-ar' | ||
strip = 'aarch64-linux-android-strip' | ||
ld = 'aarch64-linux-android-ld' | ||
ranlib = 'aarch64-linux-android-ranlib' | ||
as = 'aarch64-linux-android-as' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
[host_machine] | ||
system = 'android' | ||
cpu_family = 'arm' | ||
cpu = 'armv7a' | ||
endian = 'little' | ||
|
||
[properties] | ||
needs_exe_wrapper = true | ||
cpp_args = ['-Dandroid'] | ||
cpp_link_args = ['-ldl', '-llog', '-static-libstdc++'] | ||
|
||
[paths] | ||
|
||
[binaries] | ||
c = 'armv7a-linux-androideabi28-clang' | ||
cpp = 'armv7a-linux-androideabi28-clang++' | ||
ar = 'arm-linux-androideabi-ar' | ||
strip = 'arm-linux-androideabi-strip' | ||
ld = 'arm-linux-androideabi-ld' | ||
ranlib = 'arm-linux-androideabi-ranlib' | ||
as = 'arm-linux-androideabi-as' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'arm' | ||
cpu = 'armv7' | ||
endian = 'little' | ||
|
||
[properties] | ||
needs_exe_wrapper = true | ||
cpp_args = [] | ||
cpp_link_args = ['-ldl', '-latomic'] | ||
c_link_args = ['-ldl', '-lpthread'] | ||
|
||
[paths] | ||
|
||
[binaries] | ||
c = 'arm-linux-gnueabi-gcc' | ||
cpp = 'arm-linux-gnueabi-g++' | ||
ar = 'arm-linux-gnueabi-ar' | ||
strip = 'arm-linux-gnueabi-strip' | ||
ld = 'arm-linux-gnueabi-ld' | ||
ranlib = 'arm-linux-gnueabi-ranlib' | ||
as = 'arm-linux-gnueabi-as' | ||
pkgconfig = 'arm-linux-gnueabi-pkg-config' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# Cross compilation for Android, Linux ARM, etc. | ||
|
||
## Pre-requisites | ||
|
||
You'll need a toolchain like NDK or GNU ARM. A set of cross-files is provided, you can choose one of them or create your own. These are the platforms currently tested: | ||
|
||
* Android aarch64 | ||
* Android armv7-a | ||
* Linux ARM | ||
|
||
## Build | ||
|
||
Once the toolchain is installed and a Meson cross file is chosen, to build simply run: | ||
|
||
`CC=clang CXX=clang++ ./build.sh --cross-file cross-files/arm-linux-androideabi` | ||
|
||
You might have to remove the build/ directory if it exists. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[wrap-git] | ||
directory = opencl | ||
url = https://github.com/borg323/OpenCL-ICD-Loader.git | ||
revision = meson |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to comment this path as it seems to confuse the Android NDK, it mixes the headers and fail compilation. The GNU toolchain doesn't have that problem. Any idea on how to solve this?