diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index f22ebb994c6befcff83af7095cef560d3048d60c..16489148564228ed026d58f9caea3bc6838e92ff 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -414,6 +414,10 @@ class TestOptions:
        # Command to run before the test
        self.pre_cmd = None
 
+       # Optional per test target wrapper that overrides the default
+       # one when testing a cross target
+       self.target_wrapper = None
+
        # Command wrapper: a function to apply to the command before running it
        self.cmd_wrapper = None
 
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index c183b656ac3b8ef51515b78288207da22c908af9..448672b91b7bd574439a000a33b157a4c3dcf0e4 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -2042,7 +2042,9 @@ async def simple_run(name: TestName, way: WayName, prog: str, extra_run_opts: st
 
     # Put extra_run_opts last: extra_run_opts('+RTS foo') should work.
     args = [prog, stats_args, my_rts_flags, extra_run_opts]
-    if config.target_wrapper is not None:
+    if opts.target_wrapper is not None:
+        args = [opts.target_wrapper] + args
+    elif config.target_wrapper is not None:
         args = [config.target_wrapper] + args
     cmd = ' '.join(args)