[PATCH] D64427: LLVM Test-Suite: Support Cross-Compilation and Cross-execution targeting arm64-linux-android

Ziang Wan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 13:21:58 PDT 2019


ziangwan marked 15 inline comments as done.
ziangwan added inline comments.


================
Comment at: External/SPEC/CINT2006/462.libquantum/CMakeLists.txt:11
   #  somehow copy+fix the reference outputs?)
-  llvm_test_verify(RUN_TYPE ${run_type} WORKDIR ${CMAKE_CURRENT_BINARY_DIR}
-    diff --strip-trailing-cr
-    data/${run_type}/output/${run_type}.out
-    ${run_type}.out
-  )
+  # diff in Android doesn't have --strip-trailing-cr, use -w instead
+  if(NOT TARGET_OS STREQUAL "Android")
----------------
danalbert wrote:
> Have you filed a bug? That sounds trivial to add to toybox.
I've filed a bug.


================
Comment at: cmake/caches/target-arm64-android-template.sh:8
+# REQUIRED: path to android ndk that contains necessary header files and libraries
+ANDROID_NDK_LOCATION="/data/local/tmp/docspace/android-ndk-r20"
+# REQUIRED: path to llvm build bin
----------------
danalbert wrote:
> (why is this "doc" space?)
> 
> Should probably keep everything under a common subdirectory to avoid any collisions. `/data/local/tmp/llvm-test-suite/...`
> 
> Is it actually necessary to push the NDK to the device? None of the toolchains are built to run on Android. I can't even think of what use the sysroot would be.
"docspace" is an arbitrary name I use for myself. You don't have to use "docspace".

Yes, you can use `/data/local/tmp/llvm-test-suite/..` as your path. This shell script is just a template.

I am not pushing the whole NDK to the device. It is only used during compilation.


================
Comment at: cmake/caches/target-arm64-android-template.sh:10
+# REQUIRED: path to llvm build bin
+COMPILER_BIN="/data/local/tmp/docspace/llvm-build/bin"
+# OPTIONAL: path to SPEC CPU2006 folder
----------------
danalbert wrote:
> Same. Why are we running the compiler on the device?
We are not running compilers on the device. This path is specified if you have a custom build of clang. In my case, I do.


================
Comment at: litsupport/modules/android.py:1
+"""Test module to execute a benchmark through adb on a connected Android
+device. This assumes all relevant directories and files are present on the remote
----------------
danalbert wrote:
> Nit: docstring convention is:
> 
> 
> ```
> """Short summary sentence.
> 
> Additional description if needed.
> """
> ```
> 
> (also, is LLVM Python 3 yet?)
This file can be executed using python2.


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64427/new/

https://reviews.llvm.org/D64427





More information about the llvm-commits mailing list