@@ -785,6 +785,7 @@ def use_interpreter_for_simple_runs():
785
785
config .target_run_stdlib_swift = make_simple_target_run (stdlib = True )
786
786
config .target_run_simple_swift = make_simple_target_run ()
787
787
config .target_run_simple_swift_parameterized = make_simple_target_run (parameterized = True )
788
+ config .target_run_simple_swiftgyb_parameterized = make_simple_target_run (gyb = True , parameterized = True )
788
789
config .available_features .add ('interpret' )
789
790
790
791
target_specific_module_triple = config .variant_triple
@@ -1609,13 +1610,24 @@ if not kIsWindows:
1609
1610
.format (all_stdlib_path , libdispatch_path )) + config .target_run
1610
1611
1611
1612
if not getattr (config , 'target_run_simple_swift' , None ):
1612
- config .target_run_simple_swift_parameterized = \
1613
- (SubstituteCaptures ('%%empty-directory(%%t) && '
1614
- '%s %s %%s \\ 1 -o %%t/a.out -module-name main && '
1615
- '%s %%t/a.out && '
1616
- '%s %%t/a.out' % (config .target_build_swift ,
1617
- mcp_opt , config .target_codesign ,
1618
- config .target_run )))
1613
+ config .target_run_simple_swift_parameterized = SubstituteCaptures (
1614
+ "%%empty-directory(%%t) && "
1615
+ "%s %s %%s \\ 1 -o %%t/a.out -module-name main && "
1616
+ "%s %%t/a.out && "
1617
+ "%s %%t/a.out"
1618
+ % (config .target_build_swift , mcp_opt , config .target_codesign , config .target_run )
1619
+ )
1620
+ config .target_run_simple_swiftgyb_parameterized = SubstituteCaptures (
1621
+ "%%empty-directory(%%t) && "
1622
+ "%%gyb %%s -o %%t/main.swift && "
1623
+ "%%line-directive %%t/main.swift -- "
1624
+ "%s %s %%t/main.swift \\ 1 -o %%t/a.out -module-name main && "
1625
+ "%s %%t/a.out && "
1626
+ "%%line-directive %%t/main.swift -- "
1627
+ "%s %%t/a.out"
1628
+ % (config .target_build_swift , mcp_opt , config .target_codesign , config .target_run )
1629
+ )
1630
+
1619
1631
config .target_run_simple_swift = (
1620
1632
'%%empty-directory(%%t) && '
1621
1633
'%s %s %%s -o %%t/a.out -module-name main && '
@@ -1688,8 +1700,11 @@ config.substitutions.append(('%target-swift-frontend\(mock-sdk:([^)]+)\)',
1688
1700
config .substitutions .append (('%target-swift-frontend' , config .target_swift_frontend ))
1689
1701
1690
1702
1703
+ config .substitutions .append (('%target-run-simple-swiftgyb\(([^)]+)\)' ,
1704
+ config .target_run_simple_swiftgyb_parameterized ))
1691
1705
config .substitutions .append (('%target-run-simple-swiftgyb' , config .target_run_simple_swiftgyb ))
1692
- config .substitutions .append (('%target-run-simple-swift\(([^)]+)\)' , config .target_run_simple_swift_parameterized ))
1706
+ config .substitutions .append (('%target-run-simple-swift\(([^)]+)\)' ,
1707
+ config .target_run_simple_swift_parameterized ))
1693
1708
config .substitutions .append (('%target-run-simple-swift' , config .target_run_simple_swift ))
1694
1709
config .substitutions .append (('%target-run-stdlib-swiftgyb' , config .target_run_stdlib_swiftgyb ))
1695
1710
config .substitutions .append (('%target-run-stdlib-swift' , config .target_run_stdlib_swift ))
0 commit comments