@@ -104,6 +104,23 @@ def getCCSpec(compiler):
104
104
else :
105
105
return ""
106
106
107
+ def getDsymutilSpec ():
108
+ """
109
+ Helper function to return the key-value string to specify the dsymutil
110
+ used for the make system.
111
+ """
112
+ if "DSYMUTIL" in os .environ :
113
+ return "DSYMUTIL={}" .format (os .environ ["DSYMUTIL" ])
114
+ return "" ;
115
+
116
+ def getSDKRootSpec ():
117
+ """
118
+ Helper function to return the key-value string to specify the SDK root
119
+ used for the make system.
120
+ """
121
+ if "SDKROOT" in os .environ :
122
+ return "SDKROOT={}" .format (os .environ ["SDKROOT" ])
123
+ return "" ;
107
124
108
125
def getCmdLine (d ):
109
126
"""
@@ -145,8 +162,13 @@ def buildDefault(
145
162
testname = None ):
146
163
"""Build the binaries the default way."""
147
164
commands = []
148
- commands .append (getMake (testdir , testname ) + ["all" , getArchSpec (architecture ),
149
- getCCSpec (compiler ), getCmdLine (dictionary )])
165
+ commands .append (getMake (testdir , testname ) +
166
+ ["all" ,
167
+ getArchSpec (architecture ),
168
+ getCCSpec (compiler ),
169
+ getDsymutilSpec (),
170
+ getSDKRootSpec (),
171
+ getCmdLine (dictionary )])
150
172
151
173
runBuildCommands (commands , sender = sender )
152
174
@@ -164,8 +186,12 @@ def buildDwarf(
164
186
"""Build the binaries with dwarf debug info."""
165
187
commands = []
166
188
commands .append (getMake (testdir , testname ) +
167
- ["MAKE_DSYM=NO" , getArchSpec (architecture ),
168
- getCCSpec (compiler ), getCmdLine (dictionary )])
189
+ ["MAKE_DSYM=NO" ,
190
+ getArchSpec (architecture ),
191
+ getCCSpec (compiler ),
192
+ getDsymutilSpec (),
193
+ getSDKRootSpec (),
194
+ getCmdLine (dictionary )])
169
195
170
196
runBuildCommands (commands , sender = sender )
171
197
# True signifies that we can handle building dwarf.
@@ -182,9 +208,12 @@ def buildDwo(
182
208
"""Build the binaries with dwarf debug info."""
183
209
commands = []
184
210
commands .append (getMake (testdir , testname ) +
185
- ["MAKE_DSYM=NO" , "MAKE_DWO=YES" ,
211
+ ["MAKE_DSYM=NO" ,
212
+ "MAKE_DWO=YES" ,
186
213
getArchSpec (architecture ),
187
214
getCCSpec (compiler ),
215
+ getDsymutilSpec (),
216
+ getSDKRootSpec (),
188
217
getCmdLine (dictionary )])
189
218
190
219
runBuildCommands (commands , sender = sender )
@@ -206,6 +235,8 @@ def buildGModules(
206
235
"MAKE_GMODULES=YES" ,
207
236
getArchSpec (architecture ),
208
237
getCCSpec (compiler ),
238
+ getDsymutilSpec (),
239
+ getSDKRootSpec (),
209
240
getCmdLine (dictionary )])
210
241
211
242
lldbtest .system (commands , sender = sender )
0 commit comments