21
21
import os
22
22
import platform
23
23
import re
24
+ import shlex
24
25
import shutil
25
26
import subprocess
26
27
import sys
@@ -950,10 +951,12 @@ if (not getattr(config, 'target_run', None) and
950
951
remote_run_host = lit_config .params ['remote_run_host' ]
951
952
remote_tmp_dir = lit_config .params ['remote_run_tmpdir' ]
952
953
remote_lib_dir = os .path .join (remote_tmp_dir , 'stdlib' )
954
+
955
+ remote_run_extra_args_param = lit_config .params .get ('remote_run_extra_args' )
956
+ remote_run_extra_args = shlex .split (remote_run_extra_args_param or '' )
953
957
if 'remote_run_identity' in lit_config .params :
954
- identity_args = ['-i' , lit_config .params ['remote_run_identity' ]]
955
- else :
956
- identity_args = []
958
+ remote_run_identity = lit_config .params ['remote_run_identity' ]
959
+ remote_run_extra_args += ['-i' , remote_run_identity ]
957
960
958
961
if 'remote_run_skip_upload_stdlib' not in lit_config .params :
959
962
lit_config .note (
@@ -969,19 +972,19 @@ if (not getattr(config, 'target_run', None) and
969
972
'--remote-dir' , remote_tmp_dir ,
970
973
'--input-prefix' , sdk_lib_dir ,
971
974
'--remote-input-prefix' , 'stdlib/'
972
- ] + identity_args + [
975
+ ] + remote_run_extra_args + [
973
976
remote_run_host ,
974
977
'--' ,
975
978
'true' # A dummy command that ignores its arguments.
976
979
] + libs )
977
980
978
981
config .target_run = (
979
982
"/usr/bin/env "
980
- "REMOTE_RUN_CHILD_DYLD_FALLBACK_LIBRARY_PATH ='{0}' " # Apple option
983
+ "REMOTE_RUN_CHILD_DYLD_LIBRARY_PATH ='{0}' " # Apple option
981
984
"REMOTE_RUN_CHILD_LD_LIBRARY_PATH='{0}' " # Linux option
982
985
"%utils/remote-run --input-prefix %S --output-prefix %t "
983
986
"--remote-dir '{1}'%t {2} {3}" .format (remote_lib_dir , remote_tmp_dir ,
984
- ' ' .join (identity_args ),
987
+ ' ' .join (remote_run_extra_args ),
985
988
remote_run_host ))
986
989
TARGET_ENV_PREFIX = 'REMOTE_RUN_CHILD_'
987
990
0 commit comments