Build system

Process

Accept the input compilation task; generate the task name according to the compilation task; parse and obtain the source code corresponding to the task name; compile the source code, and output the Compile the processing status information of the task. In the above technical solution, the compilation task is received through the interface platform, and the compilation request is initiated by the interface platform in the form of the task name to perform the compilation, which simplifies the compilation input operation; the processing status information is provided to the client in real time through the interface platform, which simplifies the compilation monitoring operation , Which greatly saves human resources.

MTK Distributed Compilation System

As we all know, the MTK platform uses ARM ADS to compile. There are more than one thousand source files. It takes 40 to 50 minutes for a single machine to complete. If the machine is turned on, antivirus Software, the speed will be slower. In order to increase the compilation speed, the anti-virus software can be temporarily stopped, but the effect will not be too obvious. The fundamental way to solve the problem is to use idle machines in the network to build a distributed system, and multiple machines can compile at the same time, which can achieve obvious results.

This system consists of a registration server, a compiling server and a client. Start one registration server and multiple compilation servers in the network. On the MTK6223 platform, a stand-alone new project takes 50 minutes at a time, and 10 compilation servers are used to compile at the same time, and a new project takes 13 minutes. Before the module is compiled, it takes 9 minutes to work on the client. In order to achieve distributed compilation, it takes 2 minutes to compress the source code and 2 minutes to download the file to the compilation server.

From the compilation of the first module to the last link, 10 machines completed the compilation of 1200 c files in only 4 minutes. The last link is performed on this machine, and it takes tens of seconds.

I have tried compiling on 18 machines at the same time. The compilation of 1200 c files is completed in less than 2 minutes. Of course, the download time takes 3 minutes. For developers, new is no longer a nightmare.

Of course, you can’t increase the compilation server without limit, and you must consider the time it takes to transfer files. There are many files on the MTK platform, which need to be distributed from the client to the server. Generally, a client and ten servers can be combined to compile to achieve the desired effect.

DM2 precompilation system

The precompilation system is an important part of the DM2 system. It supports the embedded use of SQL language in C programs, gives full play to the advantages of language data types, convenient and flexible processing, and uses SQL language to make up for the lack of high-level language to describe database operations, and provides users with the establishment of large-scale management information systems and complex processing. The working environment required by the firm.

The pre-compiled system also supports interactive interface DM2-ISQL, application development tool set DM2-FORM, DM2-GRAPH, DM2-REPORT and other working environments.

Compilation system CMake

CMake is like the make we use on uni, it is used to manage how to compile a project. Its advantages are:

1) Across multiple operating system platforms, including the most widely used windows, unix (including Mac OS X).

2) BSD style The protocol is open source. According to my personal reading of the agreement document, I didn't find any difference between the agreement and the two-sentence BSD agreement.

3) It can support the compilation of programs with very complex paths and library dependencies. For example, it supports compiling a program: it depends on many libraries and some other code files, and each library has many subdirectories.

4) Like many Makes, it will cache the files that have been compiled once to speed up future compilation.

When using this build system, you need to create a file named CMakeLists.txt for each directory/subdirectory.

This project has a long history, starting in 2000.

The project currently using this compilation system: llvm/clang.

I found it from the source code of clang. Someone on the mailing list recommended cmake instead of msvc's .sln file

decompilation system

High-level language source programs are compiled into executable files, and decompilation is the reverse process.

But usually, executable files cannot be turned into high-level language source code, only assembler.

Computer software reverse engineering (Reversepengineering), also known as computer software restoration engineering, refers to the work of "reverse analysis and research" on the target program (executable program) of other people’s software to derive other people’s Design elements such as ideas, principles, structures, algorithms, processing procedures, and operating methods used in the software products of the company are used as references when developing software or directly used in their own software products.

Decompilation is a complicated process, so the more high-level language, the more difficult it is to decompile, but there are still many decompilation software:

VB: VBExplorer; only Can decompile the interface image, it seems that the code cannot be completely decompiled

JAVA: JAD; java decompilation is more common, so the decompilation is more complete C++: eXeScope

Symbian compilation system

h2>

The so-called compilation means that the compiler reads the source program (character stream), analyzes the lexical and grammar, converts high-level language instructions into functionally equivalent assembly code, and then converts the assembler into a machine Language, and link to generate executable programs in accordance with the operating system's requirements for the executable file format.

The C compilation system under the UNIX environment also follows such a general process. It is worth noting that this process is not completed by a program independently, but by a combination of multiple programs that complete a certain aspect of the work. This design idea is consistent with the unique feature of the UNIX system software that we mentioned at the beginning.

To sum up, the working process of the C compilation system in the UNIX environment can be summarized as follows:

C source program header file--> pre-compiled processing (cpp)--> The compiler itself -> Optimizer -> Assembler -> Linker -> Executable file

Generally, we use the cc command to compile the source program. This cc command is not a binary executable program, but a shell command file. Its job is to sequentially call each of the specific programs we listed above to complete a certain part of the work, and convert the specified c source program into executable code.

In the UNIX system, the tool that realizes the conversion process from C source program to executable file is cc. In most systems, cc is actually a shell command file. The C compiler in some systems may not be called cc but something else, such as gcc commonly used on Sun workstations. But these are irrelevant. The usage of C compilation commands in most systems is basically similar. What we introduce here will be based on the C compilation system on SVR4.

Among them, we also need to know that the compilation system is also a system software, not an application software.

Related Articles
TOP