@@ -50,10 +50,13 @@ def is_swiftpm_unified_build_product(cls):
50
50
return True
51
51
52
52
def run_swiftsyntax_build_script (self , target , command , additional_params = []):
53
- script_path = os .path .join (self .source_dir , 'build-script.py ' )
53
+ script_path = os .path .join (self .source_dir , 'SwiftSyntaxDevUtils ' )
54
54
55
55
build_cmd = [
56
- script_path ,
56
+ os .path .join (self .install_toolchain_path (target ), "bin" , "swift" ),
57
+ 'run' ,
58
+ '--package-path' , script_path ,
59
+ 'swift-syntax-dev-utils' ,
57
60
command ,
58
61
'--build-dir' , self .build_dir ,
59
62
'--multiroot-data-file' , MULTIROOT_DATA_FILE_PATH ,
@@ -74,21 +77,33 @@ def run_swiftsyntax_build_script(self, target, command, additional_params=[]):
74
77
75
78
build_cmd .extend (additional_params )
76
79
77
- shell .call (build_cmd )
80
+ env = dict (os .environ )
81
+ env ["SWIFTCI_USE_LOCAL_DEPS" ] = "1"
82
+
83
+ shell .call (build_cmd , env = env )
78
84
79
85
def should_build (self , host_target ):
80
86
return True
81
87
82
88
def build (self , host_target ):
83
89
if self .args .swiftsyntax_verify_generated_files :
90
+ script_path = os .path .join (self .source_dir , 'SwiftSyntaxDevUtils' )
91
+
84
92
build_cmd = [
85
- os .path .join (self .source_dir , 'build-script.py' ),
93
+ os .path .join (self .install_toolchain_path (host_target ), "bin" , "swift" ),
94
+ 'run' ,
95
+ '--package-path' , script_path ,
96
+ 'swift-syntax-dev-utils' ,
86
97
'verify-source-code' ,
87
98
'--toolchain' , self .install_toolchain_path (host_target )
88
99
]
89
100
if self .args .verbose_build :
90
101
build_cmd .append ('--verbose' )
91
- shell .call (build_cmd )
102
+
103
+ env = dict (os .environ )
104
+ env ["SWIFTCI_USE_LOCAL_DEPS" ] = "1"
105
+
106
+ shell .call (build_cmd , env = env )
92
107
93
108
self .run_swiftsyntax_build_script (target = host_target ,
94
109
command = 'build' )
0 commit comments