Back to results
US 8,510,342 B1Granted
Automatic conversion of build processes to use streaming input
AssigneeGoogle Inc.
InventorDon Hsi-Yun Yang
Life of this patent
Estimating the term…
Abstract
Systems and methods are provided wherein executable files are prepared from source code without generating intermediate files. For example, rather than using a compiler to prepare an intermediate file that is then used by a linker, the compiler may stream its output directly to the linker, thus enabling the linker to perform its functions in parallel with the compiler. The system may also use a data streaming facility, such as a pipe, to stream data between the compilation and linking processes.
Claims29
A method for building a target, the method comprising:
- generating, using a processor, a graph from software build dependencies, wherein the graph has a starting node that corresponds to software that is being build and a plurality of other nodes corresponding to intermediate object files that are used in building the software;
- identifying, using a processor, a first node that is connected to a second node in the graph;
- identifying a first command that is needed to build the first node and a second command that is needed to build the second node, both commands comprising software build commands;
- receiving a determination of whether the first and second commands are capable of working with data streams based on whether the first and second commands can interface with at least on pipe;
- transforming the first command to output a data stream when it is determined that both the first command and second command are capable of working with data streams;
- failing to modify the second command to accept the data stream from the first command as input when it is determined that one of the first and second commands is incapable of working with data streams;
- and
- wherein the first node is a prerequisite for the second node, and the command is transformed only when the first node is a prerequisite for a node in the graph.
5 more elements
An apparatus comprising:
- a memory;
- and
- a processor, coupled to the memory, that:
- executes a first command for building software as a first process;
- executes, concurrently with the first process, a second command for building the software, wherein the second command is executed as a second process;
- streams object code that is used as an input by the second command directly from the first process to the second process;
- converts the software build dependencies for building the software into a graph, the graph having a starting node that corresponds to the software that is being built and a plurality of other nodes corresponding to intermediate files that are used in building the software
- identifies a first node that is connected to a second node in the graph, wherein the first command is needed to build the first node and the second command is needed to build the second node;
- receives a determination of whether the first and second commands are capable of working with data streams based on whether the first and second commands can interface with at least on pipe;
- transforms the first command to output a data stream when it is determined that both the first command and second command are capable of working with data streams;
- fails to modify the second command to accept the data stream from the first command as input when it is determined that one of the first and second commands is incapable of working with data streams;
- and
- wherein the first node is a prerequisite for the second node, and
- the command is transformed only when the first node is a prerequisite for a node in the graph.
11 more elements
An apparatus comprising:
- a memory;
- and
- a processor, coupled to the memory, that:
- receives a dependency specification for building software, wherein the dependency specification includes an indication of a file;
- replaces the indication of the file with an indication of a data stream to produce an improved dependency specification;
- executes the improved dependency specification to build the software;
- replaces the indication of the file with an indication of a data stream only when the file is a prerequisite for no more than one dependency rule identified in the dependency specification;
- fails to replace the indication of the file with the indication of the data stream when a software build command, that is set to receive the file as input by the dependency specification for building the software, is incapable of working with pipes;
- and
- wherein the indication of the file is a prerequisite for a second dependency rule, and
- the indication of the file is replaced only when the file is a prerequisite for a dependency rule in the dependency specification.
8 more elements
Dependencies are inferred from the claim text.