File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -310,6 +310,17 @@ def buildObject(builder):
310
310
def isLinkOption (arg ):
311
311
return arg == '-pthread' or arg .startswith ('-l' ) or arg .startswith ('-Wl,' )
312
312
313
+ def removeLinkOptions (args ):
314
+ filtered = []
315
+ prevarg = None
316
+ for arg in args :
317
+ if "-Xclang" == prevarg :
318
+ filtered += [arg ]
319
+ elif not isLinkOption (arg ):
320
+ filtered += [arg ]
321
+ prevarg = arg
322
+ return filtered
323
+
313
324
# This command does not have the executable with it
314
325
def buildAndAttachBitcode (builder ):
315
326
af = builder .getBitcodeArglistFilter ()
@@ -324,7 +335,7 @@ def buildAndAttachBitcode(builder):
324
335
# check to see if there was any output on stderr instead of the
325
336
# return code of commands, so warnings about unused link flags can
326
337
# cause spurious failures here.
327
- bcc = [ arg for arg in bcc if not isLinkOption ( arg )]
338
+ bcc = removeLinkOptions ( bcc )
328
339
proc = Popen (bcc )
329
340
rc = proc .wait ()
330
341
if rc == 0 :
You can’t perform that action at this time.
0 commit comments