@@ -694,14 +694,14 @@ if run_vendor == 'apple':
694
694
config .target_run_simple_swift = (
695
695
"%s %%s" % (target_run_base ))
696
696
config .target_run_simple_swiftgyb = (
697
- 'rm -rf %%t && mkdir -p %%t && '
697
+ '%%empty-directory( %%t) && '
698
698
'%%gyb %%s -o %%t/main.swift && '
699
699
'%%line-directive %%t/main.swift -- %s %%t/main.swift'
700
700
% (target_run_base ))
701
701
config .target_run_stdlib_swift = (
702
702
"%s %%s" % (target_run_stdlib ))
703
703
config .target_run_stdlib_swiftgyb = (
704
- 'rm -rf %%t && mkdir -p %%t && '
704
+ '%%empty-directory( %%t) && '
705
705
'%%gyb %%s -o %%t/main.swift && '
706
706
'%%line-directive %%t/main.swift -- %s %%t/main.swift'
707
707
% (target_run_stdlib ))
@@ -811,14 +811,14 @@ elif run_os in ['linux-gnu', 'linux-gnueabihf', 'freebsd', 'windows-cygnus', 'wi
811
811
config .target_run_simple_swift = (
812
812
'%s %%s' % (target_run_base ))
813
813
config .target_run_simple_swiftgyb = (
814
- 'rm -rf %%t && mkdir -p %%t && '
814
+ '%%empty-directory( %%t) && '
815
815
'%%gyb %%s -o %%t/main.swift && '
816
816
'%%line-directive %%t/main.swift -- %s %%t/main.swift'
817
817
% (target_run_base ))
818
818
config .target_run_stdlib_swift = (
819
819
'%s %%s' % (target_run_stdlib ))
820
820
config .target_run_stdlib_swiftgyb = (
821
- 'rm -rf %%t && mkdir -p %%t && '
821
+ '%%empty-directory( %%t) && '
822
822
'%%gyb %%s -o %%t/main.swift && '
823
823
'%%line-directive %%t/main.swift -- %s %%t/main.swift'
824
824
% (target_run_stdlib ))
@@ -967,26 +967,26 @@ check_runtime_libs(runtime_libs)
967
967
968
968
if not getattr (config , 'target_run_simple_swift' , None ):
969
969
config .target_run_simple_swift = (
970
- 'rm -rf %%t && mkdir -p %%t && '
970
+ '%%empty-directory( %%t) && '
971
971
'%s %s %%s -o %%t/a.out -module-name main && '
972
972
'%s %%t/a.out'
973
973
% (config .target_build_swift , mcp_opt , config .target_run ))
974
974
config .target_run_stdlib_swift = (
975
- 'rm -rf %%t && mkdir -p %%t && '
975
+ '%%empty-directory( %%t) && '
976
976
'%s %s %%s -o %%t/a.out -module-name main '
977
977
'-Xfrontend -disable-access-control && '
978
978
'%s %%t/a.out'
979
979
% (config .target_build_swift , mcp_opt , config .target_run ))
980
980
config .target_run_simple_swiftgyb = (
981
- 'rm -rf %%t && mkdir -p %%t && '
981
+ '%%empty-directory( %%t) && '
982
982
'%%gyb %%s -o %%t/main.swift && '
983
983
'%%line-directive %%t/main.swift -- '
984
984
'%s %s %%t/main.swift -o %%t/a.out -module-name main && '
985
985
'%%line-directive %%t/main.swift -- '
986
986
'%s %%t/a.out'
987
987
% (config .target_build_swift , mcp_opt , config .target_run ))
988
988
config .target_run_stdlib_swiftgyb = (
989
- 'rm -rf %%t && mkdir -p %%t && '
989
+ '%%empty-directory( %%t) && '
990
990
'%%gyb %%s -o %%t/main.swift && '
991
991
'%%line-directive %%t/main.swift -- '
992
992
'%s %s %%t/main.swift -o %%t/a.out -module-name main '
0 commit comments