@@ -1083,8 +1083,10 @@ if 'swift_interpreter' in config.available_features:
1083
1083
"%s -interpret %s" %
1084
1084
(config .target_swift_frontend , sdk_overlay_link_path ))
1085
1085
1086
+ subst_target_repl_run_swift = ""
1086
1087
subst_target_repl_run_simple_swift = ""
1087
1088
if 'swift_repl' in config .available_features :
1089
+ subst_target_repl_run_swift = "%s -repl" % (config .target_swift_frontend )
1088
1090
subst_target_repl_run_simple_swift = (
1089
1091
"%s -repl %s < %%s 2>&1" %
1090
1092
(config .target_swift_frontend , sdk_overlay_link_path ))
@@ -1145,25 +1147,35 @@ if os.path.exists(static_libswiftCore_path):
1145
1147
target_stdlib_path = platform_module_dir
1146
1148
if 'use_os_stdlib' not in lit_config .params :
1147
1149
lit_config .note ('Testing with the just-built libraries at ' + target_stdlib_path )
1148
- config . target_run = (
1150
+ library_path_env = (
1149
1151
"/usr/bin/env "
1150
1152
"DYLD_LIBRARY_PATH='{0}' " # Apple option
1151
1153
"LD_LIBRARY_PATH='{0}' " # Linux option
1152
1154
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1153
- .format (target_stdlib_path )) + config .target_run
1155
+ .format (target_stdlib_path ))
1156
+ config .target_run = library_path_env + config .target_run
1157
+ subst_target_jit_run = library_path_env + subst_target_jit_run
1158
+ config .swift_remoteast_test = library_path_env + config .swift_remoteast_test
1159
+ subst_target_repl_run_simple_swift = library_path_env + subst_target_repl_run_simple_swift
1160
+ subst_target_repl_run_swift = library_path_env + subst_target_repl_run_swift
1154
1161
else :
1155
1162
os_stdlib_path = ''
1156
1163
if run_vendor == 'apple' :
1157
1164
#If we get swift-in-the-OS for non-Apple platforms, add a condition here
1158
1165
os_stdlib_path = "/usr/lib/swift"
1159
1166
all_stdlib_path = os .path .pathsep .join ((os_stdlib_path , target_stdlib_path ))
1160
1167
lit_config .note ('Testing with the standard libraries coming from the OS ' + all_stdlib_path )
1161
- config . target_run = (
1168
+ library_path_env = (
1162
1169
"/usr/bin/env "
1163
1170
"DYLD_LIBRARY_PATH='{0}' " # Apple option
1164
1171
"LD_LIBRARY_PATH='{0}' " # Linux option
1165
1172
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1166
- .format (all_stdlib_path )) + config .target_run
1173
+ .format (all_stdlib_path ))
1174
+ config .target_run = library_path_env + config .target_run
1175
+ subst_target_jit_run = library_path_env + subst_target_jit_run
1176
+ config .swift_remoteast_test = library_path_env + config .swift_remoteast_test
1177
+ subst_target_repl_run_simple_swift = library_path_env + subst_target_repl_run_simple_swift
1178
+ subst_target_repl_run_swift = library_path_env + subst_target_repl_run_swift
1167
1179
1168
1180
if not getattr (config , 'target_run_simple_swift' , None ):
1169
1181
config .target_run_simple_swift_parameterized = \
@@ -1246,6 +1258,7 @@ config.substitutions.append(('%target-run-simple-opt-O-swift', config.target_run
1246
1258
config .substitutions .append (('%target-run-simple-opt-Osize-swift' , config .target_run_simple_opt_Osize_swift ))
1247
1259
config .substitutions .append (('%target-run-stdlib-swiftgyb' , config .target_run_stdlib_swiftgyb ))
1248
1260
config .substitutions .append (('%target-run-stdlib-swift' , config .target_run_stdlib_swift ))
1261
+ config .substitutions .append (('%target-repl-run-swift' , subst_target_repl_run_swift ))
1249
1262
config .substitutions .append (('%target-repl-run-simple-swift' , subst_target_repl_run_simple_swift ))
1250
1263
config .substitutions .append (('%target-run' , config .target_run ))
1251
1264
config .substitutions .append (('%target-jit-run' , subst_target_jit_run ))
0 commit comments