Changeset 33c4f72 in mainline for tools/checkers/vcc.py
- Timestamp:
- 2010-06-25T13:38:30Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fc81981
- Parents:
- 09a0bd4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/checkers/vcc.py
r09a0bd4a r33c4f72 45 45 re_va_list = re.compile("__builtin_va_list") 46 46 47 specification = "" 48 47 49 def usage(prname): 48 50 "Print usage syntax" … … 57 59 "Preprocess source using GCC preprocessor and compatibility tweaks" 58 60 61 global specification 62 59 63 args = ['gcc', '-E'] 60 64 args.extend(options.split()) … … 69 73 70 74 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) 77 76 78 77 for line in preproc.splitlines(): … … 155 154 # Run Vcc 156 155 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() 158 157 159 158 if (retval != 0): … … 170 169 171 170 def main(): 171 global specification 172 172 173 if (len(sys.argv) < 2): 173 174 usage(sys.argv[0]) … … 192 193 return 193 194 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 194 204 for job in jobs: 195 205 if (not vcc(vcc_path, rootdir, job)):
Note:
See TracChangeset
for help on using the changeset viewer.