[PATCH] D64427: LLVM Test-Suite: Support Cross-Compilation and Cross-execution targeting arm64-linux-android
Kristof Beyls via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 05:45:42 PDT 2019
kristof.beyls added a comment.
Thank you very much Ziang for sharing this work!
I'd love to more easily benchmark on Android devices - and this seems to be a good step in the right direction.
Please find some of my immediate thoughts on the patch below.
================
Comment at: MultiSource/Benchmarks/CMakeLists.txt:32
if(NOT "${ARCH}" STREQUAL "XCore")
- add_subdirectory(7zip)
+ if(NOT TEST_SUITE_REMOTE_CLIENT STREQUAL "adb")
+ add_subdirectory(7zip)
----------------
I'm wondering if (NOT "${TARGET_OS}" STREQUAL "Android") wouldn't be a better test?
Isn't the reason many of these programs fail to build that some header file isn't provided on the Android platform?
Also, that would make the test more similar to other tests already in here that remove specific benchmarks for specific architectures or OSs.
================
Comment at: cmake/caches/target-arm64-android-template.sh:1-47
+#!/bin/bash
+rm -r CMakeCache.txt
+
+
+# path to the test-suite source file
+TEST_SUITE_LOCATION="/data/local/tmp/devspace/test-suite"
+# path to android ndk that contains necessary header files and libraries
----------------
I wonder if you're also aiming to use LNT as an extra layer on top of this test-suite?
I tend to use LNT to build/run tests/benchmarks. I wonder if support was added in LNT, would there still be a lot of value in having this custom shell script?
I would love to avoid having to go through different benchmarking flows depending on which OS I'm running benchmarks on.
================
Comment at: cmake/caches/target-arm64-android-template.sh:31
+cmake \
+ -D CMAKE_C_FLAGS="$COMPILE_FLAGS -D BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD -D SPEC_CPU_LINUX" \
+ -D CMAKE_CXX_FLAGS="$COMPILE_FLAGS" \
----------------
Shouldn't the SPEC_CPU_LINUX define get added somehow as part of the External/SPEC cmake files rather than added here on the command line?
================
Comment at: lit.site.cfg.in:10
config.strip_tool = "@CMAKE_STRIP@"
-config.profile_generate = @TEST_SUITE_PROFILE_GENERATE@
+config.profile_generate = "@TEST_SUITE_PROFILE_GENERATE@"
config.llvm_profdata = "@TEST_SUITE_LLVM_PROFDATA@"
----------------
My understanding is that adding quotes here will make the profile_generate feature break in some circumstances.
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