Skip to content

Commit

Permalink
i#7262: fix toolchain-android.cmake name (#7263)
Browse files Browse the repository at this point in the history
`ci-package` is failing in generating Android 32 bit package because
`toolchain-android.cmake` was renamed as `toolchain-android-gcc.cmake`.
This is blocking all package builds.

We also fix the name in the doc that explains how to cross-compile for
ARM Android.

Tested:

https://github.com/DynamoRIO/dynamorio/actions/runs/13212140385/job/36886983427

Fixes #7262
  • Loading branch information
edeiana authored Feb 8, 2025
1 parent e48f813 commit 40ed75f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/docs/building.dox
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ To build a client, again use the toolchain file, as well as pointing at a Dynamo

## Cross-Compiling for ARM Android

Install the Android NDK (Note: currently only version r10e can be used to build DynamoRIO, later versions do not work, see #1927, #2556)and configure it for the androideabi standalone toolchain. Something like this:
Install the Android NDK (Note: currently only version r10e can be used to build DynamoRIO, later versions do not work, see #1927, #2556) and configure it for the androideabi standalone toolchain. Something like this:

```
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
Expand All @@ -308,7 +308,7 @@ Now check out the sources as normal, and point at our toolchain CMake file. If
$ git clone --recurse-submodules -j4 https://github.com/DynamoRIO/dynamorio.git
$ mkdir build_android
$ cd build_android
$ cmake -DCMAKE_TOOLCHAIN_FILE=../dynamorio/make/toolchain-android.cmake -DANDROID_TOOLCHAIN=/mytooldir/android-ndk-21 -DDR_COPY_TO_DEVICE=ON ../dynamorio
$ cmake -DCMAKE_TOOLCHAIN_FILE=../dynamorio/make/toolchain-android-gcc.cmake -DANDROID_TOOLCHAIN=/mytooldir/android-ndk-21 -DDR_COPY_TO_DEVICE=ON ../dynamorio
$ make -j
```

Expand Down
2 changes: 1 addition & 1 deletion api/docs/new_release.dox
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ ctest -D CMAKE_SYSTEM_PROCESSOR=arm -V -S /dynamorio_package/make/package.cmake,
Android:
\verbatim
cd /work/dr/build_package/
/extsw/pkgs/cmake/exports-3.2.0/bin/ctest -D CMAKE_SYSTEM_PROCESSOR=arm -V -S /dynamorio_package/make/package.cmake,build=7\;version=6.2.0\;no64\;cacheappend=OLDEST_COMPATIBLE_VERSION:STRING=600\;cacheappend=CMAKE_TOOLCHAIN_FILE=/work/dr/git/src/make/toolchain-android.cmake\;cacheappend=ANDROID_TOOLCHAIN=/work/toolchain/android-ndk-21\;cpackappend=set\(CPACK_PACKAGE_FILE_NAME\ DynamoRIO-ARM-Android-EABI-6.2.0-2\)\;invoke=/drmemory_package/package.cmake\;drmem_only\;tool_build=2\;cacheappend=TOOL_VERSION_NUMBER:STRING=1.11.0\;cacheappend=DRMF_VERSION:STRING=1.0.0
/extsw/pkgs/cmake/exports-3.2.0/bin/ctest -D CMAKE_SYSTEM_PROCESSOR=arm -V -S /dynamorio_package/make/package.cmake,build=7\;version=6.2.0\;no64\;cacheappend=OLDEST_COMPATIBLE_VERSION:STRING=600\;cacheappend=CMAKE_TOOLCHAIN_FILE=/work/dr/git/src/make/toolchain-android-gcc.cmake\;cacheappend=ANDROID_TOOLCHAIN=/work/toolchain/android-ndk-21\;cpackappend=set\(CPACK_PACKAGE_FILE_NAME\ DynamoRIO-ARM-Android-EABI-6.2.0-2\)\;invoke=/drmemory_package/package.cmake\;drmem_only\;tool_build=2\;cacheappend=TOOL_VERSION_NUMBER:STRING=1.11.0\;cacheappend=DRMF_VERSION:STRING=1.0.0
\endverbatim


Expand Down
2 changes: 1 addition & 1 deletion make/package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if ($ENV{DYNAMORIO_CROSS_ANDROID_ONLY} MATCHES "yes")
set(arg_cacheappend "${arg_cacheappend}
PACKAGE_PLATFORM:STRING=ARM-
PACKAGE_SUBSYS:STRING=-EABI
CMAKE_TOOLCHAIN_FILE:PATH=${CTEST_SOURCE_DIRECTORY}/make/toolchain-android.cmake
CMAKE_TOOLCHAIN_FILE:PATH=${CTEST_SOURCE_DIRECTORY}/make/toolchain-android-gcc.cmake
ANDROID_TOOLCHAIN:PATH=$ENV{DYNAMORIO_ANDROID_TOOLCHAIN}")
else ()
message(FATAL_ERROR "Android is only supported as 32_only")
Expand Down

0 comments on commit 40ed75f

Please sign in to comment.