File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1422,9 +1422,17 @@ if hasattr(config, 'target_cc_options'):
14221422else :
14231423 config .substitutions .append (('%target-cc-options' , '' ))
14241424
1425- config .substitutions .append (
1426- (r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)' ,
1427- SubstituteCaptures (r'ln \1 \2 || cp \1 \2' )))
1425+ # WORKAROUND(rdar://53507844): On some macOS versions, we see flaky failures in
1426+ # tests which create a hard link to an executable and immediately invoke it.
1427+ # Work around this by always copying on Darwin.
1428+ if platform .system () == 'Darwin' :
1429+ config .substitutions .append (
1430+ (r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)' ,
1431+ SubstituteCaptures (r'cp \1 \2' )))
1432+ else :
1433+ config .substitutions .append (
1434+ (r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)' ,
1435+ SubstituteCaptures (r'ln \1 \2 || cp \1 \2' )))
14281436
14291437config .substitutions .append (('%utils' , config .swift_utils ))
14301438config .substitutions .append (('%line-directive' , '%r %s' % (sys .executable , config .line_directive )))
You can’t perform that action at this time.
0 commit comments