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 74
74
++ lib . optionals hostPlatform . isAarch32 ( map ( opt : "--gcc-option=" + opt ) [ "-fno-pic" "-fno-plt" ] )
75
75
# Also for GHC #15275
76
76
++ 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
77
84
qemuTestWrapper = writeShellScriptBin "test-wrapper" ''
78
85
set -euo pipefail
79
86
${ 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" ) ;
82
94
83
95
enableShared = lib . mkDefault ( ! isLinuxCross ) ;
84
96
You can’t perform that action at this time.
0 commit comments