Skip to content

Commit 2f4016e

Browse files
committed
Skip running tests for aarch64-android
1 parent 17f43a2 commit 2f4016e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

overlays/linux-cross.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,23 @@ let
7474
++ lib.optionals hostPlatform.isAarch32 (map (opt: "--gcc-option=" + opt) [ "-fno-pic" "-fno-plt" ])
7575
# Also for GHC #15275
7676
++ lib.optionals hostPlatform.isAarch64 ["--gcc-option=-fPIC"];
77+
78+
# Wrapper to output a warning for aarch64 Android
79+
qemuNotSupportedWarning = writeShellScriptBin "warning-wrapper" ''
80+
echo "Warning: Running aarch64 Android apps on Linux using qemu is not supported." >&2
81+
'';
82+
83+
# Wrapper for qemu testing
7784
qemuTestWrapper = writeShellScriptBin "test-wrapper" ''
7885
set -euo pipefail
7986
${qemu}/bin/qemu-${qemuSuffix} $@*
80-
'';
81-
testWrapper = lib.optional isLinuxCross "${qemuTestWrapper}/bin/test-wrapper";
87+
'';
88+
89+
# Choose the appropriate test wrapper
90+
testWrapper = lib.optional isLinuxCross
91+
(if hostPlatform.isAndroid && hostPlatform.isAarch64
92+
then "${qemuNotSupportedWarning}/bin/warning-wrapper"
93+
else "${qemuTestWrapper}/bin/test-wrapper");
8294

8395
enableShared = lib.mkDefault (!isLinuxCross);
8496

0 commit comments

Comments
 (0)