@@ -1143,28 +1143,27 @@ if os.path.exists(static_libswiftCore_path):
1143
1143
# Set up testing with the standard libraries coming from the OS / just-built libraries
1144
1144
# default Swift tests to use the just-built libraries
1145
1145
target_stdlib_path = platform_module_dir
1146
- if not kIsWindows :
1147
- if 'use_os_stdlib' not in lit_config .params :
1148
- lit_config .note ('Testing with the just-built libraries at ' + target_stdlib_path )
1149
- config .target_run = (
1150
- "/usr/bin/env "
1151
- "DYLD_LIBRARY_PATH='{0}' " # Apple option
1152
- "LD_LIBRARY_PATH='{0}' " # Linux option
1153
- "SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1154
- .format (target_stdlib_path )) + config .target_run
1155
- else :
1156
- os_stdlib_path = ''
1157
- if run_vendor == 'apple' :
1158
- #If we get swift-in-the-OS for non-Apple platforms, add a condition here
1159
- os_stdlib_path = "/usr/lib/swift"
1160
- all_stdlib_path = os .path .pathsep .join ((os_stdlib_path , target_stdlib_path ))
1161
- lit_config .note ('Testing with the standard libraries coming from the OS ' + all_stdlib_path )
1162
- config .target_run = (
1163
- "/usr/bin/env "
1164
- "DYLD_LIBRARY_PATH='{0}' " # Apple option
1165
- "LD_LIBRARY_PATH='{0}' " # Linux option
1166
- "SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1167
- .format (all_stdlib_path )) + config .target_run
1146
+ if 'use_os_stdlib' not in lit_config .params :
1147
+ lit_config .note ('Testing with the just-built libraries at ' + target_stdlib_path )
1148
+ config .target_run = (
1149
+ "/usr/bin/env "
1150
+ "DYLD_LIBRARY_PATH='{0}' " # Apple option
1151
+ "LD_LIBRARY_PATH='{0}' " # Linux option
1152
+ "SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1153
+ .format (target_stdlib_path )) + config .target_run
1154
+ else :
1155
+ os_stdlib_path = ''
1156
+ if run_vendor == 'apple' :
1157
+ #If we get swift-in-the-OS for non-Apple platforms, add a condition here
1158
+ os_stdlib_path = "/usr/lib/swift"
1159
+ all_stdlib_path = os .path .pathsep .join ((os_stdlib_path , target_stdlib_path ))
1160
+ lit_config .note ('Testing with the standard libraries coming from the OS ' + all_stdlib_path )
1161
+ config .target_run = (
1162
+ "/usr/bin/env "
1163
+ "DYLD_LIBRARY_PATH='{0}' " # Apple option
1164
+ "LD_LIBRARY_PATH='{0}' " # Linux option
1165
+ "SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option
1166
+ .format (all_stdlib_path )) + config .target_run
1168
1167
1169
1168
if not getattr (config , 'target_run_simple_swift' , None ):
1170
1169
config .target_run_simple_swift_parameterized = \
@@ -1180,6 +1179,18 @@ if not getattr(config, 'target_run_simple_swift', None):
1180
1179
'%s %%t/a.out &&'
1181
1180
'%s %%t/a.out'
1182
1181
% (config .target_build_swift , mcp_opt , config .target_codesign , config .target_run ))
1182
+ config .target_run_simple_opt_O_swift = (
1183
+ '%%empty-directory(%%t) && '
1184
+ '%s %s -O %%s -o %%t/a.out -module-name main && '
1185
+ '%s %%t/a.out &&'
1186
+ '%s %%t/a.out'
1187
+ % (config .target_build_swift , mcp_opt , config .target_codesign , config .target_run ))
1188
+ config .target_run_simple_opt_Osize_swift = (
1189
+ '%%empty-directory(%%t) && '
1190
+ '%s %s -Osize %%s -o %%t/a.out -module-name main && '
1191
+ '%s %%t/a.out &&'
1192
+ '%s %%t/a.out'
1193
+ % (config .target_build_swift , mcp_opt , config .target_codesign , config .target_run ))
1183
1194
config .target_run_stdlib_swift = (
1184
1195
'%%empty-directory(%%t) && '
1185
1196
'%s %s %%s -o %%t/a.out -module-name main '
0 commit comments