Changeset f9d0a86 in mainline for tools/jobfile.py


Ignore:
Timestamp:
2017-11-14T12:24:42Z (8 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6cad776
Parents:
887c9de (diff), d2d142a (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.
git-author:
Aearsis <Hlavaty.Ondrej@…> (2017-11-14 01:04:19)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2017-11-14 12:24:42)
Message:

Merge tag '0.7.1'

The merge wasn't clean, because of changes in build system. The most
significant change was partial revert of usbhc callback refactoring,
which now does not take usb transfer batch, but few named fields again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/jobfile.py

    r887c9de rf9d0a86  
    3838def usage(prname):
    3939        "Print usage syntax"
    40         print(prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]")
     40        print(prname + " <JOBFILE> <CC> <INPUT> -o <OUTPUT> [CC_ARGUMENTS ...]")
    4141
    4242def main():
     
    4646       
    4747        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:])
    5254        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"
    5467       
    5568        jobfile = open(jobfname, "a")
     
    5871        fcntl.lockf(jobfile, fcntl.LOCK_UN)
    5972        jobfile.close()
     73       
     74        # Run the compiler proper.
     75        os.execvp(ccname, sys.argv[2:])
    6076
    6177if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.