File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments