Changes in tools/jobfile.py [28f4adb:7f881cd8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/jobfile.py
r28f4adb r7f881cd8 38 38 def usage(prname): 39 39 "Print usage syntax" 40 print(prname + " <JOBFILE> < SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]")40 print(prname + " <JOBFILE> <CC> <INPUT> -o <OUTPUT> [CC_ARGUMENTS ...]") 41 41 42 42 def main(): … … 46 46 47 47 jobfname = sys.argv[1] 48 srcfname = sys.argv[2] 49 tgtfname = sys.argv[3] 50 toolname = sys.argv[4] 51 category = sys.argv[5] 48 ccname = sys.argv[2] 49 srcfname = sys.argv[3] 50 assert(not srcfname.startswith("-")) 51 assert(sys.argv[4] == "-o") 52 tgtfname = sys.argv[5] 53 options = " ".join(sys.argv[6:]) 52 54 cwd = os.getcwd() 53 options = " ".join(sys.argv[6:]) 55 56 if srcfname.endswith(".c"): 57 toolname = "cc" 58 category = "core" 59 60 if srcfname.endswith(".s"): 61 toolname = "as" 62 category = "asm" 63 64 if srcfname.endswith(".S"): 65 toolname = "as" 66 category = "asm/preproc" 54 67 55 68 jobfile = open(jobfname, "a") … … 58 71 fcntl.lockf(jobfile, fcntl.LOCK_UN) 59 72 jobfile.close() 73 74 # Run the compiler proper. 75 os.execvp(ccname, sys.argv[2:]) 60 76 61 77 if __name__ == '__main__':
Note:
See TracChangeset
for help on using the changeset viewer.