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 @@ -1556,9 +1556,17 @@ if hasattr(config, 'target_cc_options'):
1556
1556
else :
1557
1557
config .substitutions .append (('%target-cc-options' , '' ))
1558
1558
1559
- config .substitutions .append (
1560
- (r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)' ,
1561
- SubstituteCaptures (r'ln \1 \2 || cp \1 \2' )))
1559
+ # WORKAROUND(rdar://53507844): On some macOS versions, we see flaky failures in
1560
+ # tests which create a hard link to an executable and immediately invoke it.
1561
+ # Work around this by always copying on Darwin.
1562
+ if platform .system () == 'Darwin' :
1563
+ config .substitutions .append (
1564
+ (r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)' ,
1565
+ SubstituteCaptures (r'cp \1 \2' )))
1566
+ else :
1567
+ config .substitutions .append (
1568
+ (r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)' ,
1569
+ SubstituteCaptures (r'ln \1 \2 || cp \1 \2' )))
1562
1570
1563
1571
config .substitutions .append (('%utils' , config .swift_utils ))
1564
1572
config .substitutions .append (('%line-directive' , '%r %s' % (sys .executable , config .line_directive )))
You can’t perform that action at this time.
0 commit comments