Pre-compiled object code repository determination method and apparatus, storage medium

By generating target compilation configuration files through mapping relationships, the problem of generating source compilation configuration files corresponding to target code is solved, enabling fast and accurate generation of pre-compiled target code repositories and improving development efficiency and adaptability.

CN115756484BActive Publication Date: 2026-11-06SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211435753.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2026-11-06
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

In existing technologies, generating source compilation configuration files corresponding to target code is difficult, resulting in low development efficiency.

Method used

By obtaining the source code repository and its compilation configuration file, the target compilation configuration file is generated using the mapping relationship, and the pre-compiled target code repository is integrated to realize the mapping and attribute conversion from source module to target module.

Benefits of technology

Quickly and accurately generate pre-compiled target code repositories, improve development efficiency, adapt to compilation configurations for multiple application environments, and simplify the release process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756484B_ABST
    Figure CN115756484B_ABST
Patent Text Reader

Abstract

The application provides a precompiled target code warehouse determination method and device, and a storage medium. The method comprises the following steps: obtaining a plurality of source code warehouses and target codes; obtaining a to-be-converted source module by using source compilation configuration file analysis; obtaining a conversion target module corresponding to the to-be-converted source module according to a first mapping relationship between each source module and each target module; obtaining a target attribute of the conversion target module according to a source attribute of the to-be-converted source module and a second mapping relationship between each source attribute and each target attribute, so as to obtain a target compilation configuration file; and adding the target compilation configuration file and the target code into a precompiled target code warehouse. The technical scheme can conveniently generate the precompiled target code warehouse containing the source compilation configuration file corresponding to the target code, and can assist the developer in improving the development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, and storage medium for determining a pre-compiled target code repository. Background Technology

[0002] In the current Android system development process, product releases typically involve releasing different content based on users' different usage environments and needs. For example, if users need to perform secondary development on the product, the source code repository must be released along with it; otherwise, only the target code repository can be released.

[0003] In existing technologies, source code is compiled using a build configuration file to generate target code. The target code is then deployed to the specified location required by the product, typically configured within the build configuration file of the source code repository. If it's necessary to extract the source code and retain only the target code, a separate build configuration file is also required; this file differs from the one used during the source code compilation.

[0004] How to generate the source compilation configuration file corresponding to the target code is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a method and apparatus for determining a pre-compiled target code repository, which can conveniently generate a pre-compiled target code repository containing source compilation configuration files corresponding to the target code, thereby helping developers improve development efficiency.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] Firstly, a method for determining a pre-compiled target code repository is provided. This method includes: acquiring multiple source code repositories and target code; the source code repositories include source code and its corresponding source compilation configuration files, each source compilation configuration file including multiple source modules, each source module having source attributes; parsing the source compilation configuration files to obtain a source module to be converted; obtaining a conversion target module corresponding to the source module to be converted based on a first mapping relationship between each source module and each target module; obtaining the target attributes of the conversion target module based on the source attributes of the source module to be converted and a second mapping relationship between each source attribute and each target attribute, to obtain a target compilation configuration file; and adding the target compilation configuration file and the target code to the pre-compiled target code repository.

[0008] Optionally, before obtaining the source module to be converted by parsing the source compilation configuration file, the method further includes: filtering the source modules according to the first mapping relationship between the source modules and the target modules to obtain valid source modules, wherein the valid source modules are used to determine the source module to be converted.

[0009] Optionally, the target code is the compilation result of the source code in one or more application environments, and obtaining multiple source code repositories and target code further includes obtaining the compilation variant content of each target code.

[0010] Optionally, after obtaining the conversion target module corresponding to the source module to be converted based on the first mapping relationship between the source module and the target module, the method further includes: determining whether the conversion target module exists in the pre-compiled target code repository; if the conversion target module exists in the pre-compiled target code repository, then adding the compiled variant content of the target code to the target attribute of the conversion target module.

[0011] Optionally, the method further includes: if the target module to be converted does not exist in the pre-compiled target code repository, then obtaining the target attributes of the target module to be converted based on the source attributes of the source module to be converted and the second mapping relationship between the source attributes and the target attributes.

[0012] Optionally, the pre-compiled target code repository includes target compilation configuration files and target code for the multiple application environments.

[0013] Optionally, the method further includes: obtaining a software bill of materials list, the software bill of materials list recording the index of each warehouse; searching in the warehouse information to determine the usage status of each warehouse in the software bill of materials list, the usage status of the warehouse indicating whether the code in the warehouse has been modified; and selecting a source code warehouse or a pre-compiled target code warehouse to generate a warehouse list based on the usage status of each warehouse in the software bill of materials list.

[0014] Optionally, the step of selecting a source code repository or a pre-compiled target code repository to generate a repository list based on the usage status of each repository in the software bill of materials includes: if the usage status of a repository in the software bill of materials is either unmodified binary or modified binary, then the pre-compiled target code repository is selected to generate a repository list; if the usage status of a repository in the software bill of materials is either unmodified source code or modified source code, then the source code repository is selected to generate a repository list.

[0015] Optionally, the method further includes: exporting the repository list and the code repositories in the repository list.

[0016] Secondly, this application also discloses a pre-compiled target code repository export device, which includes: an acquisition module for acquiring multiple source code repositories and target code, wherein the source code repositories include source code and its corresponding source compilation configuration file, and the source compilation configuration file includes multiple source modules, each source module having source attributes; a parsing module for parsing the source compilation configuration file to obtain a source module to be converted; a module conversion module for obtaining a conversion target module corresponding to the source module to be converted according to a first mapping relationship between each source module and each target module; an attribute conversion module for obtaining the target attributes of the conversion target module according to the source attributes of the source module to be converted and a second mapping relationship between each source attribute and each target attribute, so as to obtain a target compilation configuration file; and a determination module for adding the target compilation configuration file and the target code to the pre-compiled target code repository.

[0017] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, the computer program being executed by a processor to perform any of the methods provided in the first aspect.

[0018] Fourthly, a computer program product is provided, on which a computer program is stored, the computer program being executed by a processor to perform any of the methods provided in the first aspect.

[0019] Fifthly, embodiments of this application also provide a chip that stores a computer program, which, when executed by the chip, implements the steps of the above-described method.

[0020] Compared with the prior art, the technical solution of this application embodiment has the following beneficial effects:

[0021] In this technical solution, since the compilation configuration file in the source code repository records the compilation rules for each source module, the source module to be converted in the source code repository can be obtained by parsing the compilation configuration file. There is a first mapping relationship between the source module and the target module; based on this mapping relationship, the corresponding conversion target module can be determined. Furthermore, there is a second mapping relationship between attributes and target attributes; based on this second mapping relationship, the target attributes of the conversion target module can be obtained. The target compilation configuration file includes these target attributes. By adding the target compilation configuration file and target code to the pre-compiled target code repository, a pre-compiled target code repository can be obtained for subsequent release. By directly mapping the source module and its source attributes, the source code repository project can be integrated, thereby quickly and accurately obtaining the pre-compiled target code repository. When the pre-compiled target code repository needs to be released later, it can be directly released, assisting developers in improving development efficiency.

[0022] Furthermore, the target code is the compilation result of the source code in one or more application environments, and the pre-compiled target code repository includes target compilation configuration files and target code for multiple application environments. The technical solution of this application enables the storage of target compilation configuration files and target code for multiple application environments in the same repository, allowing a single pre-compiled target code repository to adapt to various compilation configurations, further improving development efficiency. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating a method for determining a pre-compiled target code repository, as provided in an embodiment of this application.

[0024] Figure 2 This is a schematic diagram illustrating a specific application scenario provided in an embodiment of this application;

[0025] Figure 3 This is a schematic diagram of another specific application scenario provided by the embodiments of this application;

[0026] Figure 4 This is a schematic diagram illustrating another specific application scenario provided in the embodiments of this application;

[0027] Figure 5 This is a schematic diagram of a pre-compiled target code repository determination device provided in an embodiment of this application. Detailed Implementation

[0028] As described in the background section, how to generate the source compilation configuration file corresponding to the target code is a technical problem that urgently needs to be solved.

[0029] In this technical solution, since the compilation configuration file in the source code repository records the compilation rules for each source module, the source module to be converted in the source code repository can be obtained by parsing the compilation configuration file. There is a first mapping relationship between the source module and the target module; based on this mapping relationship, the corresponding conversion target module can be determined. Furthermore, there is a second mapping relationship between attributes and target attributes; based on this second mapping relationship, the target attributes of the conversion target module can be obtained. The target compilation configuration file includes these target attributes. By adding the target compilation configuration file and target code to the pre-compiled target code repository, a pre-compiled target code repository can be obtained for subsequent release. By directly mapping the source module and its source attributes, the source code repository project can be integrated, thereby quickly and accurately obtaining the pre-compiled target code repository. When the pre-compiled target code repository needs to be released later, it can be directly released, assisting developers in improving development efficiency.

[0030] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, specific embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0031] See Figure 1 The methods provided in this application include:

[0032] Step 101: Obtain multiple source code repositories and target code. The source code repository includes source code and its corresponding source compilation configuration file. The source compilation configuration file includes multiple source modules, and the source modules have source attributes.

[0033] Step 102: Use the source compilation configuration file to parse and obtain the source module to be converted;

[0034] Step 103: Obtain the conversion target module corresponding to the source module to be converted according to the first mapping relationship between each source module and each target module;

[0035] Step 104: Based on the source attributes of the source module to be converted and the second mapping relationship between each source attribute and each target attribute, obtain the target attributes of the target module to be converted, so as to obtain the target compilation configuration file;

[0036] Step 105: Add the target compilation configuration file and the target code to the pre-compiled target code repository.

[0037] It should be noted that the sequence number of each step in this embodiment does not represent a limitation on the execution order of each step.

[0038] It is understood that, in specific implementations, the method for determining the pre-compiled target code repository can be implemented using software programs, which run on a processor integrated within the chip or chip module. This method can also be implemented using a combination of software and hardware; this application does not impose any restrictions.

[0039] In this embodiment, the source code repository includes source code and its corresponding source compilation configuration files (such as makefiles or android.bp files). The source compilation configuration files record how to compile the source code and configuration actions, such as the installation location of the target code and additional actions after installation. Specifically, the source compilation configuration files include multiple source modules, and each source module has source attributes.

[0040] In this embodiment of the invention, a source module refers to the smallest unit with independent functionality, or an independent compilation target. In this embodiment of the invention, a source attribute refers to the attribute of a source module, which may specifically be the value of a field, property, or variable in the source compilation configuration file.

[0041] The pre-compiled target code repository to be obtained in this embodiment of the invention includes target code, but does not include source code. Accordingly, the target compilation configuration file in the pre-compiled target code repository records configuration actions related to the target code, and the target compilation configuration file differs from the source compilation configuration file. The target compilation configuration file can be obtained through the above steps 101-105, thereby obtaining the pre-compiled target code repository.

[0042] In the specific implementation of step 102, the source module to be converted is obtained by parsing the source compilation configuration file. The source module to be converted is selected from the source modules contained in the source compilation configuration file. That is to say, the target compilation configuration file is obtained by mapping the source module to be converted and its source attributes in the source compilation configuration file.

[0043] Specifically, the source build configuration files used for parsing are in a file format suitable for the current processor architecture. For example, if the source build configuration files in the source code repository are in mk format, they can be converted to Blueprint (bp) format to be suitable for the Android platform, and then the source modules to be converted can be obtained by parsing the bp format source build configuration files.

[0044] Since there is a first mapping relationship between each source module and each target module, in the specific implementation of step 103, the conversion target module corresponding to the source module to be converted can be obtained by using the above first mapping relationship.

[0045] Since there is a second mapping relationship between each source attribute and each target attribute, in the specific implementation of step 104, the target attributes corresponding to the source attributes of the source module to be converted can be obtained using the above-mentioned second mapping relationship, that is, the target attributes of the target module to be converted can be obtained. At this point, the target compilation configuration file can be obtained, which includes the target module to be converted and its target attributes.

[0046] It should be noted that the first and second mapping relationships can be pre-configured, and this application does not impose any restrictions on this.

[0047] In the specific implementation of step 105, the target compilation configuration file and target code are added to the pre-compiled target code repository, which is the target code repository used for release.

[0048] In one specific implementation, the pre-compiled target code repository can be an empty repository before the target compilation configuration file and target code are added.

[0049] In another specific implementation, before the target compilation configuration file and target code are added, the pre-compiled target code repository may store other target code and their corresponding target compilation configuration files. These other target code and the target code may be compilation results of the same source code in different application environments. For example, one set of target code may be target code for a 32-bit armv7 processor, while the target code may be target code for a 64-bit arm64 processor.

[0050] This invention enables the integration of source code repository projects by directly mapping source modules and their source attributes, thereby quickly and accurately obtaining pre-compiled target code repositories. When it is necessary to release the pre-compiled target code repository in the future, it can be released directly, helping developers improve development efficiency.

[0051] In a non-limiting embodiment, the target code obtained in this invention can be the compilation result of source code in an application environment, or it can be referred to as a single set of target code. The following is in conjunction with... Figure 2 Please provide a detailed explanation.

[0052] The source code repository 201 and the first mapping relationship 203 serve as input to the module analyzer 202. The module analyzer 202 can execute... Figure 1 As shown in steps 102 and 103, the target module corresponding to the source module to be converted is output.

[0053] The second mapping relationship 205 serves as the input to the module converter 204. The module converter 204 can then perform... Figure 1 The steps shown in step 104 output the target attributes of the conversion target module.

[0054] Specifically, the module analyzer 202 can map the source modules to be converted one by one, and correspondingly, the module converter 204 can map the source attributes of the source modules to be converted one by one until the mapping of all source modules to be converted and their source attributes is completed.

[0055] Since the module analyzer 202 outputs multiple transformation target modules and the module converter 204 outputs multiple target attributes, the compilation configuration file generator 206 can concatenate multiple transformation target modules and their target attributes to output a target compilation configuration file.

[0056] The target compilation configuration file and target code 208 serve as input to the precompiled target code repository generator 207. The precompiled target code repository generator 207 generates and outputs a precompiled target code repository 209 based on these inputs. Specifically, the precompiled target code repository generator 207 places the target compilation configuration file and target code 208 into an empty repository, generating a precompiled target code repository 209. The precompiled target code repository 209 includes target code 208 and its corresponding target compilation configuration file.

[0057] In another non-limiting embodiment, the target code obtained in this embodiment of the invention can be the compilation result of source code in multiple application environments, or multiple sets of target code. The following is in conjunction with... Figure 3 Please provide a detailed explanation.

[0058] The source code repository 301 and the first mapping relationship 303 serve as inputs to the module filter 302. The module filter 302 can filter source modules in the source compilation configuration file according to the first mapping relationship 303 to obtain valid source modules. Valid source modules can be used to determine the source modules to be converted. A valid source module refers to a source module that has a corresponding target module in the first mapping relationship 303.

[0059] By filtering out valid modules using module filter 302, it is possible to avoid converting source modules that cannot be converted into target modules, thus avoiding unnecessary operations and improving efficiency.

[0060] In this embodiment of the invention, the module analyzer 304 can first obtain the source module to be converted based on the valid modules, and then determine whether the target module to be converted exists in the pre-compiled target code repository.

[0061] If the target module for conversion does not exist in the pre-compiled target code repository, the module converter 306 can output the target attributes of the target module for conversion based on the source attributes of the source module to be converted and the second mapping relationship 305.

[0062] If a transformation target module exists in the precompiled target code repository, the module analyzer 304 adds the compiled variant content of the target code to the target attributes of the transformation target module. Specifically, the compiled variant content of the target code can indicate the application environment of the target code, such as processor type, platform type, etc.

[0063] The compilation configuration file generator 307 can concatenate multiple conversion target modules and their target attributes to output a target compilation configuration file. In this file, the conversion target modules and their target attributes corresponding to each compilation variant are grouped into the same category. This allows the adapted conversion target modules and their target attributes to be output and installed after the application environment information is configured using external compilation configuration information.

[0064] The target compilation configuration file and target code 308 serve as input to the precompiled target code repository generator 309. The precompiled target code repository generator 309 generates and outputs a precompiled target code repository 310 based on these inputs. Specifically, the precompiled target code repository generator 207 places the target compilation configuration file and target code 208 into an empty repository or overwrites and updates an existing target compilation configuration file to generate the precompiled target code repository 310. The precompiled target code repository 310 includes target code 308 corresponding to various compilation variants and target compilation configuration files.

[0065] For example, the pre-compiled target code repository 310 includes target code 1 for compiling variant content 1, target code 2 for compiling variant content 2, ..., target code X for compiling variant content X. The target build configuration file in the pre-compiled target code repository 310 includes the target attribute Build variant1 for compiling variant content 1, the target attribute Build variant2 for compiling variant content 2, ..., the target attribute Build variantX for compiling variant content X.

[0066] In this embodiment, the target code is the compilation result of source code in one or more application environments. The pre-compiled target code repository includes target compilation configuration files and target code for multiple application environments. This technical solution enables the storage of target compilation configuration files and target code for multiple application environments in the same repository, allowing a single pre-compiled target code repository to adapt to various compilation configurations, further improving development efficiency.

[0067] In a non-limiting embodiment of the present invention, after obtaining the pre-compiled target code repository, the list of repositories to be output and the corresponding repositories can be determined according to the actual scenario. See details for further information. Figure 4 .

[0068] The Software Bill of Materials (SBoM) 401 and the Warehouse Registry 402 serve as inputs to the warehouse parser 403. The SBoM 401 records the indexes of each warehouse, and the Warehouse Registry 402 records the usage information of each warehouse. Warehouse usage information indicates whether the warehouse has been modified.

[0069] The warehouse parser 403 searches the warehouse information in the warehouse registration management database 402 based on the warehouse index in the software bill of materials 401 to determine the usage status of each warehouse in the software bill of materials 401. The warehouse parser 403 outputs the usage status of each warehouse.

[0070] The repository list printer 404 selects source code repositories or pre-compiled target code repositories based on the usage of each repository to generate a repository list 405.

[0071] Specifically, if the repository is used as an unmodified binary (UB) or a modified binary (MB), then the precompiled target code repository is selected to generate repository list 405, that is, repository list 405 includes the identifier of the precompiled target code repository.

[0072] If the usage of the repository is either Unmodified Source (US) or Modified Source (MS), then the source code repository is selected to generate repository list 405, which means that repository list 405 includes the identifier of the source code repository.

[0073] Repository list printer 404 outputs repository list 405 and the code repository indicated by the repository identifier in repository list 405. If repository list 405 includes source code repository 406, then source code repository 406 is output. If repository list 405 includes precompiled object code 407, then precompiled object code 407 is output.

[0074] For more specific implementations of the embodiments of this application, please refer to the foregoing embodiments, which will not be repeated here.

[0075] Please refer to Figure 5 , Figure 5 A precompiled object code repository export device 50 is shown, which may include:

[0076] The acquisition module 501 is used to acquire multiple source code repositories and target code. The source code repository includes source code and its corresponding source compilation configuration file. The source compilation configuration file includes multiple source modules, and the source modules have source attributes.

[0077] Parsing module 502 is used to parse the source compilation configuration file to obtain the source module to be converted;

[0078] The module conversion module 503 is used to obtain the conversion target module corresponding to the source module to be converted according to the first mapping relationship between each source module and each target module;

[0079] The attribute conversion module 504 is used to obtain the target attributes of the target module to be converted based on the source attributes of the source module to be converted and the second mapping relationship between each source attribute and each target attribute, so as to obtain the target compilation configuration file;

[0080] The determination module 505 is used to add the target compilation configuration file and the target code to the pre-compiled target code repository.

[0081] In specific implementation, the aforementioned pre-compiled target code repository export device 50 may correspond to a chip in a terminal device that has the function of exporting pre-compiled target code repositories, such as a system-on-a-chip (SOC), a baseband chip, etc.; or correspond to a chip module in a terminal device that includes the function of exporting pre-compiled target code repositories; or correspond to a chip module with a data processing chip; or correspond to a terminal device.

[0082] Specifically, the parsing module 502 and the module conversion module 503 are equivalent to the module analyzer in the aforementioned embodiments, and the attribute conversion module 504 is equivalent to the module converter in the aforementioned embodiments.

[0083] Furthermore, the precompiled object code repository export device 50 may also include:

[0084] The warehouse list acquisition module is used to acquire the software material list, which records the index of each warehouse.

[0085] The warehouse parsing module is used to search and determine the usage status of each warehouse in the software's material list, where the usage status indicates whether the code in that warehouse has been modified.

[0086] The warehouse list generation module is used to select source code warehouses or pre-compiled target code warehouses to generate a warehouse list based on the usage of each warehouse in the software bill of materials list.

[0087] The warehouse parsing module in this embodiment of the invention is equivalent to Figure 4 The warehouse parser 403 shown is equivalent to the warehouse list generation module. Figure 4 The warehouse list printer shown is 404.

[0088] Other relevant descriptions of the pre-compiled target code repository export device 50 can be found in the descriptions in the foregoing embodiments, and will not be repeated here.

[0089] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs running on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on a processor integrated within the chip module. The remaining modules / units (if any) can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into terminal equipment, each of their modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules / units can be implemented using a software program that runs on a processor integrated within the terminal equipment, while the remaining modules / units (if any) can be implemented using hardware methods such as circuits.

[0090] This application also discloses a storage medium, which is a computer-readable storage medium storing a computer program thereon. The computer program can be executed when it runs. Figures 1 to 3 The steps of the method shown are illustrated. The storage medium may include read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc. The storage medium may also include non-volatile memory or non-transitory memory, etc.

[0091] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article indicates that the preceding and following related objects have an "or" relationship.

[0092] In the embodiments of this application, "multiple" refers to two or more.

[0093] The descriptions of "first," "second," etc., appearing in the embodiments of this application are for illustrative purposes and to distinguish the objects being described. They have no order and do not indicate any special limitation on the number of devices in the embodiments of this application, nor do they constitute any limitation on the embodiments of this application.

[0094] In this application, the term "connection" refers to various connection methods, such as direct connection or indirect connection, to achieve communication between devices. This application does not impose any limitations on this.

[0095] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means.

[0096] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0097] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, and systems can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0098] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0099] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can be physically included separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0100] The integrated unit implemented as a software functional unit described above can be stored in a computer-readable storage medium. This software functional unit, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute some steps of the methods described in the various embodiments of this application.

[0101] While this application discloses the above information, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of this application; therefore, the scope of protection of this application shall be determined by the scope defined in the claims.

Claims

1. A precompiled object code repository determination method, characterized by, include: The system acquires multiple source code repositories and target code. The source code repositories include source code and its corresponding source compilation configuration files. The source compilation configuration files include multiple source modules, and each source module has a source attribute. The target code is the compilation result of the source code in one or more application environments. The source module to be converted is obtained by parsing the source compilation configuration file. The conversion target module corresponding to the source module to be converted is obtained according to the first mapping relationship between each source module and each target module; Based on the source attributes of the source module to be converted and the second mapping relationship between each source attribute and each target attribute, the target attributes of the target module to be converted are obtained to obtain the target compilation configuration file; the target compilation configuration file records the configuration actions related to the target code and is different from the original compilation configuration file; Add the target compilation configuration file and the target code to the pre-compiled target code repository; Before obtaining the source module to be converted by parsing the source compilation configuration file, the method further includes: filtering the source modules according to the first mapping relationship between the source module and the target module to obtain valid source modules, wherein the valid source modules are used to determine the source module to be converted; the valid source module refers to the source module that has a corresponding target module in the first mapping relationship.

2. The precompiled object code repository determination method of claim 1, wherein, The acquisition of multiple source code repositories and target code also includes: Obtain the compiled variant content for each target code.

3. The precompiled object code repository determination method of claim 2, wherein, After obtaining the conversion target module corresponding to the source module to be converted based on the first mapping relationship between the source module and the target module, the process further includes: Determine whether the target module for conversion exists in the pre-compiled target code repository; If the transformation target module exists in the pre-compiled target code repository, then the compiled variant of the target code is added to the target attributes of the transformation target module.

4. The method for determining the pre-compiled target code repository according to claim 3, characterized in that, Also includes: If the target module to be converted does not exist in the pre-compiled target code repository, the target attributes of the target module to be converted are obtained according to the source attributes of the source module to be converted and the second mapping relationship between the source attributes and the target attributes.

5. The method for determining the pre-compiled target code repository according to claim 2, characterized in that, The pre-compiled target code repository includes target compilation configuration files and target code for the multiple application environments.

6. The method for determining the pre-compiled target code repository according to claim 1, characterized in that, Also includes: Obtain the software material list, which records the indexes of each warehouse; The usage status of each warehouse in the software material list is determined by searching the warehouse information. The usage status of a warehouse indicates whether the code in that warehouse has been modified. Based on the usage of each repository in the software bill of materials, a repository list is generated by selecting either the source code repository or the pre-compiled target code repository.

7. The method for determining the pre-compiled target code repository according to claim 6, characterized in that, The step of selecting source code repositories or pre-compiled target code repositories based on the usage of each repository in the software bill of materials includes: If the usage status of the warehouse in the software bill of materials is either unmodified binary or modified binary, then the pre-compiled target code warehouse is selected to generate the warehouse list; If the usage status of the warehouse in the software bill of materials is either "unmodified source code" or "modified source code", then select the source code warehouse to generate the warehouse list.

8. The method for determining the pre-compiled target code repository according to claim 6, characterized in that, Also includes: Export the list of repositories and the code repositories in the list of repositories.

9. A pre-compiled object code repository export device, characterized in that, include: The acquisition module is used to acquire multiple source code repositories and target code. The source code repository includes source code and its corresponding source compilation configuration file. The source compilation configuration file includes multiple source modules, and the source modules have source attributes. The target code is the compilation result of the source code in one or more application environments. The parsing module is used to parse the source compilation configuration file to obtain the source module to be converted; The module conversion module is used to obtain the conversion target module corresponding to the source module to be converted according to the first mapping relationship between each source module and each target module; The attribute conversion module is used to obtain the target attributes of the target module to be converted based on the source attributes of the source module to be converted and the second mapping relationship between each source attribute and each target attribute, so as to obtain the target compilation configuration file; the target compilation configuration file records the configuration actions related to the target code and is different from the original compilation configuration file; The determination module is used to add the target compilation configuration file and the target code to the pre-compiled target code repository; The pre-compiled target code repository export device is further configured to filter the source modules according to the first mapping relationship between the source modules and the target modules to obtain valid source modules, wherein the valid source modules are used to determine the source modules to be converted.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when run by a processor, performs the steps of the pre-compiled target code repository determination method according to any one of claims 1 to 8.

11. A terminal device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor runs the computer program, it performs the steps of the pre-compiled target code repository determination method according to any one of claims 1 to 8.