@@ -694,15 +694,22 @@ if run_vendor == 'apple':
694
694
config .swift_test_options ,
695
695
config .swift_driver_test_options ,
696
696
swift_execution_tests_extra_flags ))
697
+ target_run_stdlib = (
698
+ '%s -Xfrontend -disable-access-control' % (target_run_base ))
697
699
config .target_run_simple_swift = (
698
700
"%s %%s" % (target_run_base ))
699
- config .target_run_stdlib_swift = (
700
- "%s -Xfrontend -disable-access-control %%s" % (target_run_base ))
701
701
config .target_run_simple_swiftgyb = (
702
702
'rm -rf %%t && mkdir -p %%t && '
703
703
'%%gyb %%s -o %%t/main.swift && '
704
704
'%%line-directive %%t/main.swift -- %s %%t/main.swift'
705
705
% (target_run_base ))
706
+ config .target_run_stdlib_swift = (
707
+ "%s %%s" % (target_run_stdlib ))
708
+ config .target_run_stdlib_swiftgyb = (
709
+ 'rm -rf %%t && mkdir -p %%t && '
710
+ '%%gyb %%s -o %%t/main.swift && '
711
+ '%%line-directive %%t/main.swift -- %s %%t/main.swift'
712
+ % (target_run_stdlib ))
706
713
config .available_features .add ('interpret' )
707
714
config .environment ['SWIFT_INTERPRETER' ] = config .swift
708
715
@@ -804,15 +811,22 @@ elif run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'windows-cygnus', 'wi
804
811
mcp_opt , config .swift_test_options ,
805
812
config .swift_driver_test_options ,
806
813
swift_execution_tests_extra_flags ))
814
+ target_run_stdlib = (
815
+ '%s -Xfrontend -disable-access-control' % (target_run_base ))
807
816
config .target_run_simple_swift = (
808
817
'%s %%s' % (target_run_base ))
809
- config .target_run_stdlib_swift = (
810
- '%s -Xfrontend -disable-access-control %%s' % (target_run_base ))
811
818
config .target_run_simple_swiftgyb = (
812
819
'rm -rf %%t && mkdir -p %%t && '
813
820
'%%gyb %%s -o %%t/main.swift && '
814
821
'%%line-directive %%t/main.swift -- %s %%t/main.swift'
815
822
% (target_run_base ))
823
+ config .target_run_stdlib_swift = (
824
+ '%s %%s' % (target_run_stdlib ))
825
+ config .target_run_stdlib_swiftgyb = (
826
+ 'rm -rf %%t && mkdir -p %%t && '
827
+ '%%gyb %%s -o %%t/main.swift && '
828
+ '%%line-directive %%t/main.swift -- %s %%t/main.swift'
829
+ % (target_run_stdlib ))
816
830
config .available_features .add ('interpret' )
817
831
config .environment ['SWIFT_INTERPRETER' ] = config .swift
818
832
config .target_sil_opt = (
@@ -985,6 +999,15 @@ if not getattr(config, 'target_run_simple_swift', None):
985
999
'%%line-directive %%t/main.swift -- '
986
1000
'%s %%t/a.out'
987
1001
% (config .target_build_swift , mcp_opt , config .target_run ))
1002
+ config .target_run_stdlib_swiftgyb = (
1003
+ 'rm -rf %%t && mkdir -p %%t && '
1004
+ '%%gyb %%s -o %%t/main.swift && '
1005
+ '%%line-directive %%t/main.swift -- '
1006
+ '%s %s %%t/main.swift -o %%t/a.out -module-name main '
1007
+ '-Xfrontend -disable-access-control && '
1008
+ '%%line-directive %%t/main.swift -- '
1009
+ '%s %%t/a.out'
1010
+ % (config .target_build_swift , mcp_opt , config .target_run ))
988
1011
989
1012
subst_target_jit_run = ""
990
1013
if 'swift_interpreter' in config .available_features :
@@ -1042,6 +1065,7 @@ config.substitutions.append(('%target-swift-frontend', config.target_swift_front
1042
1065
1043
1066
config .substitutions .append (('%target-run-simple-swiftgyb' , config .target_run_simple_swiftgyb ))
1044
1067
config .substitutions .append (('%target-run-simple-swift' , config .target_run_simple_swift ))
1068
+ config .substitutions .append (('%target-run-stdlib-swiftgyb' , config .target_run_stdlib_swiftgyb ))
1045
1069
config .substitutions .append (('%target-run-stdlib-swift' , config .target_run_stdlib_swift ))
1046
1070
config .substitutions .append (('%target-repl-run-simple-swift' , subst_target_repl_run_simple_swift ))
1047
1071
config .substitutions .append (('%target-run' , config .target_run ))
0 commit comments