Changeset f56e897f in mainline for tools/checkers/vcc.py


Ignore:
Timestamp:
2010-06-29T17:43:38Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6473d41
Parents:
e4a4b44 (diff), 793cf029 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainlnie changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/checkers/vcc.py

    re4a4b44 rf56e897f  
    4545re_va_list = re.compile("__builtin_va_list")
    4646
     47specification = ""
     48
    4749def usage(prname):
    4850        "Print usage syntax"
     
    5759        "Preprocess source using GCC preprocessor and compatibility tweaks"
    5860       
     61        global specification
     62       
    5963        args = ['gcc', '-E']
    6064        args.extend(options.split())
     
    6973       
    7074        tmpf = file(tmpfname, "w")
    71        
    72         tmpf.write("__specification(const char * const \\declspec_atomic_inline;)\n\n");
    73        
    74         tmpf.write("#define __spec_attr(key, value) \\\n");
    75         tmpf.write("    __declspec(System.Diagnostics.Contracts.CodeContract.StringVccAttr, \\\n");
    76         tmpf.write("        key, value)\n\n");
     75        tmpf.write(specification)
    7776       
    7877        for line in preproc.splitlines():
     
    155154                # Run Vcc
    156155                print " -- %s --" % srcfname           
    157                 retval = subprocess.Popen([vcc_path, '/pointersize:32', cygpath(tmpfqname)]).wait()
     156                retval = subprocess.Popen([vcc_path, '/pointersize:32', '/newsyntax', cygpath(tmpfqname)]).wait()
    158157               
    159158                if (retval != 0):
     
    170169
    171170def main():
     171        global specification
     172       
    172173        if (len(sys.argv) < 2):
    173174                usage(sys.argv[0])
     
    192193                return
    193194       
     195        specpath = os.path.join(rootdir, "tools/checkers/vcc.h")
     196        if (not os.path.isfile(specpath)):
     197                print "%s not found." % config
     198                return
     199       
     200        specfile = file(specpath, "r")
     201        specification = specfile.read()
     202        specfile.close()
     203       
    194204        for job in jobs:
    195205                if (not vcc(vcc_path, rootdir, job)):
Note: See TracChangeset for help on using the changeset viewer.