Method, device, equipment and storage medium for constructing isolated compilation environment

By creating an isolated environment on the Linux kernel namespace and mounting the host tool set, the problem of large and complex resource consumption and use of compilation environment construction in the existing technology is solved, and a fast, resource-saving and user-friendly compilation environment construction is achieved.

CN114047925BActive Publication Date: 2025-06-06BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111406684.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-24
Publication Date
2025-06-06
Estimated Expiration
2041-11-24

AI Technical Summary

Technical Problem

When building a compilation environment, the existing technology requires installing docker software and container images, occupying system resources, and the compilation speed is affected. At the same time, there are technical requirements for users and they need to be familiar with the use of docker and image maintenance.

Method used

By creating an isolated environment based on the Linux kernel namespace, mounting the host tool set that compiles the target source code, and forming a Linux system directory structure in the isolated environment, the source code compilation process does not rely on the host's file directory to reduce resource consumption.

Benefits of technology

It realizes an isolated compilation environment with fast construction speed, no impact on compilation time and small resources, and the user has no perception and simple operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114047925B_ABST
    Figure CN114047925B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for constructing an isolated compilation environment, wherein the method for constructing an isolated compilation environment includes: creating an isolated environment based on the Linux kernel namespace, wherein the isolated environment is isolated from the file system mount point of the host; mounting the host tool set for compiling the target source code in the isolated environment and forming a Linux system directory structure in the isolated environment, wherein the Linux system directory structure in the isolated environment is the same as the directory structure of the host tool set in the host; mounting the top-level directory of the target source code in the host in the isolated environment, wherein the absolute path of the top-level directory of the target source code in the isolated environment is the same as the absolute path of the top-level directory of the target source code in the host, etc. The present application has the advantages of simple operation, no dependence on the file directory of the host, fast construction speed, no influence on the compilation time, small resource occupation, and no user perception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for constructing an isolated compilation environment. Background Art

[0002] At present, the compilation and development environment of many development software runs directly in the system directory. When compiling an application, the compilation tool in the system directory is found by setting the environment variable. When the compilation environment needs to be migrated, the compilation tool needs to be reinstalled in the new system, and it needs to be consistent with the previous host tool version, which is time-consuming and labor-intensive. The prior art has used docker container technology as a carrier to build a compilation environment, so that the compilation environment is separated from the host system directory, and the coupling with the host system is untied, so that the compilation environment can be migrated in various Linux systems more conveniently. However, using docker container technology, it is necessary to install docker software and container images on the target Linux system, which occupies certain system resources. It also takes time to pull up the image, and the overall compilation speed will be affected. At the same time, there are also technical requirements for users, who need to be familiar with the use of docker, image maintenance, etc. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, device, equipment and storage medium for constructing an isolated compilation environment, so as to compile source code, and realize that the compilation process of source code does not rely on the file directory of the host, thereby reducing the resource consumption of the host by the compilation process.

[0004] To this end, the first aspect of the present application discloses a method for constructing an isolated compilation environment, the method comprising:

[0005] Based on the Linux kernel namespace, an isolation environment is created, wherein the isolation environment is isolated from the file system mount point of the host;

[0006] Mounting a host tool set for compiling the target source code in the isolated environment and forming a Linux system directory structure in the isolated environment, wherein the Linux system directory structure in the isolated environment is the same as the directory structure of the host tool set in the host;

[0007] The top-level directory of the target source code in the host is mounted in the isolation environment, wherein the absolute path of the top-level directory of the target source code in the isolation environment is the same as the absolute path of the top-level directory of the target source code in the host.

[0008] In the first aspect of the present application, as an optional implementation,

[0009] After mounting the top-level directory of the target source code in the host in the isolation environment, the method further includes:

[0010] In response to a user's compilation request for the target source code, a root directory modification command is called to modify the compilation command process root directory to the environment directory of the isolation environment;

[0011] Invoking the host toolset based on the Linux system directory structure in the isolated environment;

[0012] Reading the target source code based on the absolute path of the top-level directory in the isolation environment;

[0013] The target source code is compiled based on the host tool set.

[0014] In the first aspect of the present application, as an optional implementation, the host tool set for compiling the target source code is mounted in an isolated environment and a Linux system directory structure is formed in the isolated environment, including:

[0015] The host toolset for compiling the target source code is mounted in the isolated environment through a mount command of the host.

[0016] In the first aspect of the present application, as an optional implementation, mounting the top-level directory of the target source code in the host in the isolation environment includes:

[0017] The top-level directory of the target source code in the host is mounted in the isolation environment through the mount command of the host.

[0018] In the first aspect of the present application, as an optional implementation, before responding to a user's compilation request for the target source code and compiling the target source code based on the isolation environment, the method further includes:

[0019] A virtual file system is mounted in the isolated environment, wherein the virtual file system includes a proc file system, a dev file system, and a tmp file system.

[0020] A second aspect of the present application discloses a device for constructing an isolated compilation environment, the device comprising:

[0021] A creation module is used to create an isolation environment based on a Linux kernel namespace, wherein the isolation environment is isolated from a file system mount point of the host;

[0022] A mounting module is used to mount a host tool set for compiling a target source code in the isolated environment and form a Linux system directory structure in the isolated environment, wherein the Linux system directory structure in the isolated environment is the same as the directory structure of the host tool set in the host; the mounting module is also used to mount the top-level directory of the target source code in the host in the isolated environment, wherein the absolute path of the top-level directory of the target source code in the isolated environment is the same as the absolute path of the top-level directory of the target source code in the host.

[0023] In the second aspect of the present application, as an optional implementation, the device further includes:

[0024] A directory modification module, used to respond to a user's compilation request for the target source code and call a root directory modification command to modify the compilation command process root directory to the environment directory of the isolation environment;

[0025] A compiling module, used for calling the host tool set based on the Linux system directory structure in the isolated environment;

[0026] The compiling module is further used to read the target source code based on the absolute path of the top-level directory in the isolation environment;

[0027] The compiling module is further used to compile the target source code based on the host tool set.

[0028] In the second aspect of the present application, as an optional manner, the mounting module includes:

[0029] The first mounting submodule is used to mount the host tool set for compiling the target source code in the isolated environment through the mount command of the host and form a Linux system directory structure in the isolated environment.

[0030] The third aspect of the present application discloses a device for constructing an isolated compilation environment, wherein the device for constructing the isolated compilation environment includes:

[0031] A memory storing executable program code;

[0032] a processor coupled to the memory;

[0033] The processor calls the executable program code stored in the memory to execute the method for constructing an isolated compilation environment disclosed in the first aspect of the present application.

[0034] The fourth aspect of the present application discloses a storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the method for constructing an isolated compilation environment of the first aspect of the present application.

[0035] The beneficial effects of the embodiments of the present application are as follows: the present application can construct an isolated environment for compiling the target source code, and compared with the prior art method of constructing a compilation environment through docker container technology, the present application does not need to install other running dependent software, and can avoid problems such as large resource consumption caused by installing dependent software, and thus has the advantages of fast construction speed, no effect on compilation time, and small resource occupation. On the other hand, the user has no perception of the isolation environment construction process implemented by the present application. For example, when compiling, the user redirects the make command through environment variables, and the isolation environment can be automatically constructed when running make without user perception. On the other hand, compared with the prior art method of constructing a compilation environment through docker container technology, the isolation environment of the present application is consistent with the use of Makefile, and there is no need to learn additional technical knowledge, so it has the advantage of simple operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 It is a flowchart of a method for constructing an isolated compilation environment disclosed in an embodiment of the present application;

[0038] Figure 2 It is a schematic diagram of the architecture of an isolation environment disclosed in an embodiment of the present application;

[0039] Figure 3 It is a schematic diagram of the effect of step 102 disclosed in an embodiment of the present application;

[0040] Figure 4 It is a structural schematic diagram of a device for constructing an isolated compilation environment disclosed in an embodiment of the present application;

[0041] Figure 5 It is a structural diagram of a device for constructing an isolated compilation environment disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0042] Embodiment 1

[0043] See also Figure 1 , Figure 1 1 is a flow chart of a method for constructing an isolated compilation environment disclosed in an embodiment of the present application. Figure 1 As shown, the method of the embodiment of the present application includes the following steps:

[0044] 101. Create an isolated environment based on the Linux kernel namespace, where the isolated environment is isolated from the host's file system mount point;

[0045] 102. Mounting a host tool set for compiling the target source code in the isolated environment and forming a Linux system directory structure in the isolated environment, wherein the Linux system directory structure in the isolated environment is the same as the directory structure of the host tool set in the host;

[0046] 103. Mount the top-level directory of the target source code in the host in the isolation environment, wherein the absolute path of the top-level directory of the target source code in the isolation environment is the same as the absolute path of the top-level directory of the target source code in the host.

[0047] In the embodiments of the present application, please refer to the detailed description of the prior art for the Linux kernel namespace, which will not be described in detail in the embodiments of the present application. Figure 2 As shown, the isolated environment of the embodiment of the present application refers to a virtual system environment used to complete the compilation of the target source code, which shares the system resources of the host with the environment of the original system in the host, but the two are isolated from each other.

[0048] In an embodiment of the present application, the isolation of the isolation environment from the file system mount point of the host means that the root directory of the isolation environment is isolated from the root directory of the host.

[0049] In an embodiment of the present application, for step 101, since the isolation environment is isolated from the file system mount point of the host, compilation is performed in the isolation environment, so that the tools used for compilation can only be used and output files within the isolation environment, thereby achieving the effect of sandbox isolation.

[0050] In the embodiment of the present application, for step 102, mounting the host tool set for compiling the target source code in the isolated environment means mounting the host tool set for compiling the target source code in the root directory of the isolated environment. On the other hand, the path root directory of the host tool set for the target source code mounted in the isolated environment is different, but the file directory structure is the same, for example, Figure 3 As shown, the host tools are usually in the bin file directory, or the etc file directory and other file directories, wherein the bin file directory or the etc file directory forms the overall file directory structure. Correspondingly, after mounting, the isolated environment also has the bin file directory or the etc file directory and other file directories, that is, the root directory of the host toolset in the isolated environment is different from the root directory in the host, but the directory structure of the host toolset in the Linux system is the same as the directory structure of the host. In this way, the host directory structure can be simulated in the isolated environment without the need to re-modify the compiled directory structure, that is, there is no need to adapt the scripts and commands for controlling the compilation about the path.

[0051] In the embodiment of the present application, for step 103, the absolute path of the top-level directory of the target source code in the isolated environment is made the same as the absolute path of the top-level directory of the target source code in the host, so that after the isolated environment is built, the compilation command and script tool do not need to be changed, and the user is unaware of the use. Assume that the absolute path of the top-level directory of the target source code in the host is " / home / projA / ", which is mapped to " / environment directory / home / projA / " in the host after mounting. Correspondingly, after creating the isolated environment and calling the root directory modification command, the absolute path of the top-level directory of the target source code in the isolated environment is also " / home / projA / ". It can be seen from the above that the embodiment of the present application can build an isolated environment for compiling the target source code, and compared with the prior art of building a compilation environment through docker container technology, the embodiment of the present application does not need to install other running dependent software, and can avoid problems such as large resource consumption caused by installing dependent software, and thus has the advantages of fast construction speed without affecting compilation time and small resource occupation. On the other hand, the user is unaware of the isolation environment construction process implemented in this application. For example, when compiling, the user redirects the make command through environment variables, and the isolation environment can be automatically built when running make without the user's awareness. On the other hand, compared with the prior art method of building a compilation environment through docker container technology, the isolation environment of the embodiment of this application is consistent with the use of Makefile, and there is no need to learn additional technical knowledge, so it has the advantage of simple operation.

[0052] In the embodiment of the present application, as an optional implementation, after step 103: mounting the top-level directory of the target source code in the host in the isolation environment, the method of the embodiment of the present application further includes the following steps:

[0053] In response to a user's compilation request for a target source code, a root directory modification command is called to modify the compilation command process root directory to an environment directory of the isolated environment;

[0054] Call the host tool set based on the Linux system directory structure in the isolated environment;

[0055] Read the target source code based on the absolute path of the top-level directory in the isolated environment;

[0056] Compiles target source code based on the host toolset.

[0057] In this optional implementation, the root directory modification command refers to the "Chroot" command in the Linux system.

[0058] In the embodiment of the present application, as an optional implementation, step 102: mounting the host tool set for compiling the target source code in the isolated environment and forming a Linux system directory structure in the isolated environment includes:

[0059] The host tool set for compiling the target source code is mounted in the isolated environment through the host's mount command and a Linux system directory structure is formed in the isolated environment.

[0060] In this optional implementation, the host's mount command refers to the "mount bind" command of the Linux system.

[0061] In the embodiment of the present application, as an optional implementation, step 103: mounting the top-level directory of the target source code in the host in the isolated environment includes the following sub-steps:

[0062] Use the host's mount command to mount the top-level directory of the target source code in the host in the isolated environment.

[0063] In the embodiment of the present application, as an optional implementation, before step 105: responding to the user's compilation request for the target source code and compiling the target source code based on the isolation environment, the method of the embodiment of the present application further includes the steps of:

[0064] A virtual file system is mounted in the isolated environment, and the virtual file system includes a proc file system, a dev file system, and a tmp file system. In this optional implementation, by mounting the virtual file system, system information and necessary support can be provided for the isolated environment.

[0065] In the embodiment of the present application, as an optional implementation, step 105: responding to the user's compilation request for the target source code and compiling the target source code based on the isolation environment includes the following sub-steps:

[0066] The compilation tool in the isolation environment is called through the compilation tool calling path in the host to compile the target source code, wherein the compilation tool calling path is stored in the environment variable of the host.

[0067] Embodiment 2

[0068] See also Figure 4 , Figure 4 Schematic diagram of a structure of a device for constructing an isolated compilation environment disclosed in an embodiment of the present application. Figure 4 As shown, the device of the embodiment of the present application includes the following functional modules:

[0069] A creation module 201 is used to create an isolation environment based on a Linux kernel namespace, wherein the isolation environment is isolated from a file system mount point of the host;

[0070] The mounting module 202 is used to mount the host tool set for compiling the target source code in the isolation environment and form a Linux system directory structure in the isolation environment, wherein the Linux system directory structure in the isolation environment is the same as the directory structure of the host tool set in the host;

[0071] The mounting module 202 is also used to mount the top-level directory of the target source code in the host in the isolation environment, wherein the absolute path of the top-level directory of the target source code in the isolation environment is the same as the absolute path of the top-level directory of the target source code in the host.

[0072] In the embodiment of the present application, as an optional implementation, the device of the embodiment of the present application further includes the following functional modules:

[0073] The directory modification module 203 is used to respond to the user's compilation request for the target source code and call the root directory modification command to modify the compilation command process root directory to the environment directory of the isolation environment;

[0074] A compiling module 204, used to call a host tool set based on a Linux system directory structure in the isolation environment;

[0075] The compiling module 204 is further used to read the target source code based on the absolute path of the top-level directory in the isolation environment and compile the target source code based on the host tool set.

[0076] In the embodiment of the present application, as an optional manner, the mounting module 202 includes:

[0077] The first mounting submodule is used to mount the host tool set for compiling the target source code in the isolated environment through the host's mounting command.

[0078] In the embodiment of the present application, as an optional manner, the mounting module 202 in the embodiment of the present application further includes the following submodules:

[0079] The second mounting submodule is used to mount the top-level directory of the target source code in the host in the isolated environment through the mount command of the host.

[0080] By executing the construction method based on the Linux kernel namespace, the embodiment of the present application can build an isolated environment for compiling the target source code, and the embodiment of the present application is compared with the prior art in which the compilation environment is built through the docker container technology, and other running dependent software does not need to be installed, and the resource consumption caused by the installation of dependent software can be avoided. Such problems, and thus have the advantages of fast construction speed, not affecting the compilation time, and occupying small resources. On the other hand, the isolation environment construction process implemented by the present application is not perceived by the user. For example, when compiling, the user redirects the make command through the environment variable, and the isolation environment can be automatically constructed when running make to achieve user non-perception. On the other hand, compared with the prior art in which the compilation environment is built through the docker container technology, the isolation environment of the embodiment of the present application is consistent with the Makefile usage method, and there is no need to learn additional technical knowledge, so it has the advantage of simple operation.

[0081] It should be noted that for other descriptions of the embodiments of the present application, please refer to the relevant descriptions of Embodiment 1 of the present application, and the embodiments of the present application will not be elaborated on this.

[0082] Embodiment 3

[0083] See also Figure 5 , Figure 5 Schematic diagram of a structure of a device for building an isolated compilation environment disclosed in an embodiment of the present application. Figure 5 As shown, the construction device of the isolated compilation environment of the embodiment of the present application includes:

[0084] A memory 302 storing executable program code;

[0085] A processor 301 coupled to a memory;

[0086] The processor 301 calls the executable program code stored in the memory 302 to execute the method for constructing an isolated compilation environment disclosed in the first embodiment of the present application.

[0087] By executing the construction method based on the Linux kernel namespace, the embodiment of the present application can build an isolated environment for compiling the target source code, and the embodiment of the present application is compared with the prior art in which the compilation environment is built through the docker container technology, and other running dependent software does not need to be installed, and the resource consumption caused by the installation of dependent software can be avoided. Such problems, and thus have the advantages of fast construction speed, not affecting the compilation time, and occupying small resources. On the other hand, the isolation environment construction process implemented by the present application is not perceived by the user. For example, when compiling, the user redirects the make command through the environment variable, and the isolation environment can be automatically constructed when running make to achieve user non-perception. On the other hand, compared with the prior art in which the compilation environment is built through the docker container technology, the isolation environment of the embodiment of the present application is consistent with the Makefile usage method, and there is no need to learn additional technical knowledge, so it has the advantage of simple operation.

[0088] Embodiment 4

[0089] An embodiment of the present application discloses a storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the method for constructing an isolated compilation environment in the first embodiment of the present application.

[0090] By executing the construction method based on the Linux kernel namespace, the embodiment of the present application can build an isolated environment for compiling the target source code, and the embodiment of the present application is compared with the prior art in which the compilation environment is built through the docker container technology, and other running dependent software does not need to be installed, and the resource consumption caused by the installation of dependent software can be avoided. Such problems, and thus have the advantages of fast construction speed, not affecting the compilation time, and occupying small resources. On the other hand, the isolation environment construction process implemented by the present application is not perceived by the user. For example, when compiling, the user redirects the make command through the environment variable, and the isolation environment can be automatically constructed when running make to achieve user non-perception. On the other hand, compared with the prior art in which the compilation environment is built through the docker container technology, the isolation environment of the embodiment of the present application is consistent with the Makefile usage method, and there is no need to learn additional technical knowledge, so it has the advantage of simple operation.

[0091] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0092] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0093] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0094] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0095] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0096] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for building an isolated compilation environment, It is characterized in that The method comprises: Based on the Linux kernel namespace, an isolated environment is created, wherein the isolated environment is isolated from the file system mount point of the host, and the isolated environment refers to a virtual system environment for completing target source code compilation, which shares the system resources of the host with the original system environment in the host and is isolated from the original system environment in the host; Mounting a host tool set for compiling the target source code in the isolated environment and forming a Linux system directory structure in the isolated environment, wherein the Linux system directory structure in the isolated environment is the same as the directory structure of the host tool set in the host; The top-level directory of the target source code in the host is mounted in the isolation environment, wherein the absolute path of the top-level directory of the target source code in the isolation environment is the same as the absolute path of the top-level directory of the target source code in the host.

2. The method according to claim 1, It is characterized in that After mounting the top-level directory of the target source code in the host in the isolation environment, the method further includes: In response to a user's compilation request for the target source code, a root directory modification command is called to modify the compilation command process root directory to the environment directory of the isolation environment; Invoking the host toolset based on the Linux system directory structure in the isolated environment; Reading the target source code based on the absolute path of the top-level directory in the isolation environment; The target source code is compiled based on the host tool set.

3. The method according to claim 1, It is characterized in that The method of mounting a host tool set for compiling the target source code in an isolated environment and forming a Linux system directory structure in the isolated environment includes: The host tool set for compiling the target source code is mounted in the isolated environment through a mount command of the host and a Linux system directory structure is formed in the isolated environment.

4. The method according to claim 1, It is characterized in that Mounting the top-level directory of the target source code in the host in the isolated environment includes: The top-level directory of the target source code in the host is mounted in the isolation environment through the mount command of the host.

5. The method according to claim 1, It is characterized in that Before responding to a user's compilation request for the target source code and compiling the target source code based on the isolation environment, the method further includes: A virtual file system is mounted in the isolated environment, wherein the virtual file system includes a proc file system, a dev file system, and a tmp file system.

6. A construction device for isolating the compilation environment, It is characterized in that The device comprises: A creation module is used to create an isolated environment based on a Linux kernel namespace, wherein the isolated environment is isolated from the file system mount point of the host, and the isolated environment refers to a virtual system environment used to complete target source code compilation, which shares the system resources of the host with the original system environment in the host and is isolated from the original system environment in the host; A mounting module, used for mounting a host tool set for compiling a target source code in the isolated environment and forming a Linux system directory structure in the isolated environment, wherein the Linux system directory structure in the isolated environment is the same as the directory structure of the host tool set in the host; The mounting module is also used to mount the top-level directory of the target source code in the host in the isolation environment, wherein the absolute path of the top-level directory of the target source code in the isolation environment is the same as the absolute path of the top-level directory of the target source code in the host.

7. The device according to claim 6, It is characterized in that The device also includes: A directory modification module, used to respond to a user's compilation request for the target source code and call a root directory modification command to modify the compilation command process root directory to the environment directory of the isolation environment; A compiling module, used for calling the host tool set based on the Linux system directory structure in the isolated environment; The compiling module is further used to read the target source code based on the absolute path of the top-level directory in the isolation environment; The compiling module is further used to compile the target source code based on the host tool set.

8. The device according to claim 6, It is characterized in that The mounting module includes: The first mounting submodule is used to mount the host tool set for compiling the target source code in the isolated environment through the mount command of the host and form a Linux system directory structure in the isolated environment.

9. A build device that isolates the compilation environment, It is characterized in that The construction equipment of the isolated compilation environment includes: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for constructing an isolated compilation environment as described in any one of claims 1-5.

10. A storage medium, It is characterized in that The storage medium stores computer instructions, which, when called, are used to execute the method for constructing an isolated compilation environment as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Method and system for realizing Android compiling isolation

    CN106095523A

  • Compiling method and device of compiling system and terminal equipment

    CN107741851A