@@ -88,10 +88,16 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
88
88
'-msoft-float' : (0 , ArgumentListFilter .compileUnaryCallback ),
89
89
'-m3dnow' : (0 , ArgumentListFilter .compileUnaryCallback ),
90
90
'-mno-3dnow' : (0 , ArgumentListFilter .compileUnaryCallback ),
91
+ '-m16' : (0 , ArgumentListFilter .compileUnaryCallback ),
91
92
'-m32' : (0 , ArgumentListFilter .compileUnaryCallback ),
93
+ '-mx32' : (0 , ArgumentListFilter .compileUnaryCallback ),
92
94
'-m64' : (0 , ArgumentListFilter .compileUnaryCallback ),
95
+ '-miamcu' : (0 , ArgumentListFilter .compileUnaryCallback ),
93
96
'-mstackrealign' : (0 , ArgumentListFilter .compileUnaryCallback ),
94
-
97
+ '-mretpoline-external-thunk' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
98
+ '-mno-fp-ret-in-387' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
99
+ '-mskip-rax-setup' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
100
+ '-mindirect-branch-register' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
95
101
# Preprocessor assertion
96
102
'-A' : (1 , ArgumentListFilter .compileBinaryCallback ),
97
103
'-D' : (1 , ArgumentListFilter .compileBinaryCallback ),
@@ -194,6 +200,11 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
194
200
'-coverage' : (0 , ArgumentListFilter .compileLinkUnaryCallback ),
195
201
'--coverage' : (0 , ArgumentListFilter .compileLinkUnaryCallback ),
196
202
203
+ # ian's additions while building the linux kernel
204
+ '/dev/null' : (0 , ArgumentListFilter .inputFileCallback ),
205
+ '-mno-80387' : (0 , ArgumentListFilter .compileUnaryCallback ), #gcc Don't generate output containing 80387 instructions for floating point.
206
+
207
+
197
208
#
198
209
# BD: need to warn the darwin user that these flags will rain on their parade
199
210
# (the Darwin ld is a bit single minded)
@@ -209,6 +220,8 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
209
220
# calling ld -r.
210
221
#
211
222
'-Wl,-dead_strip' : (0 , ArgumentListFilter .darwinWarningLinkUnaryCallback ),
223
+ '-Oz' : (0 , ArgumentListFilter .compileUnaryCallback ), #did not find this in the GCC options.
224
+ '-mno-global-merge' : (0 , ArgumentListFilter .compileUnaryCallback ), #clang (do not merge globals)
212
225
213
226
}
214
227
@@ -242,6 +255,18 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
242
255
r'^-std=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
243
256
r'^-stdlib=.+$' : (0 , ArgumentListFilter .compileLinkUnaryCallback ),
244
257
r'^-mtune=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
258
+ r'^-mstack-alignment=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
259
+ r'^-mcmodel=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
260
+ r'^-mpreferred-stack-boundary=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
261
+ r'^-mindirect-branch=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
262
+ r'^-mregparm=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
263
+ r'^-march=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
264
+ r'^--param=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ), #iam: linux kernel stuff
265
+
266
+
267
+ #iam: mac stuff...
268
+ r'-mmacosx-version-min=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
269
+
245
270
r'^--sysroot=.+$' : (0 , ArgumentListFilter .compileUnaryCallback ),
246
271
r'^-print-prog-name=.*$' : (0 , ArgumentListFilter .compileUnaryCallback ),
247
272
r'^-print-file-name=.*$' : (0 , ArgumentListFilter .compileUnaryCallback ),
@@ -284,7 +309,7 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
284
309
self .isPreprocessOnly )):
285
310
# Get the next argument
286
311
currentItem = self ._inputArgs .popleft ()
287
- _logger .debug ('Trying to match item ' + currentItem )
312
+ _logger .debug ('Trying to match item %s' , currentItem )
288
313
# First, see if this exact flag has a handler in the table.
289
314
# This is a cheap test. Otherwise, see if the input matches
290
315
# some pattern with a handler that we recognize
@@ -311,13 +336,22 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
311
336
312
337
313
338
def skipBitcodeGeneration (self ):
339
+ retval = (False , "" )
314
340
if os .environ .get ('WLLVM_CONFIGURE_ONLY' , False ):
315
- return True
316
- if not self .inputFiles or self .isEmitLLVM or self .isAssembly or self .isAssembleOnly :
317
- return True
318
- if self .isPreprocessOnly or self .isStandardIn or (self .isDependencyOnly and not self .isCompileOnly ):
319
- return True
320
- return False
341
+ retval = (True , "CFG Only" )
342
+ elif not self .inputFiles :
343
+ retval = (True , "No input files" )
344
+ elif self .isEmitLLVM :
345
+ retval = (True , "Emit LLVM" )
346
+ elif self .isAssembly or self .isAssembleOnly :
347
+ retval = (True , "Assembly" )
348
+ elif self .isPreprocessOnly :
349
+ retval = (True , "Preprocess Only" )
350
+ elif self .isStandardIn :
351
+ retval = (True , "Standard In" )
352
+ elif (self .isDependencyOnly and not self .isCompileOnly ):
353
+ retval = (True , "Dependency Only" )
354
+ return retval
321
355
322
356
def _shiftArgs (self , nargs ):
323
357
ret = []
0 commit comments