CN115756484A - Pre-compiled object code warehouse determination method and device and storage medium - Google Patents

Pre-compiled object code warehouse determination method and device and storage medium Download PDF

Info

Publication number
CN115756484A
CN115756484A CN202211435753.6A CN202211435753A CN115756484A CN 115756484 A CN115756484 A CN 115756484A CN 202211435753 A CN202211435753 A CN 202211435753A CN 115756484 A CN115756484 A CN 115756484A
Authority
CN
China
Prior art keywords
source
module
target
warehouse
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211435753.6A
Other languages
Chinese (zh)
Inventor
谢竑
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202211435753.6A priority Critical patent/CN115756484A/en
Publication of CN115756484A publication Critical patent/CN115756484A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application provides a method and a device for determining a pre-compiled object code warehouse and a storage medium, wherein the method comprises the following steps: acquiring a plurality of source code warehouses and target codes; analyzing by utilizing a source compiling configuration file to obtain a source module to be converted; obtaining a conversion target module corresponding to a source module to be converted according to a first mapping relation between each source module and each target module; obtaining the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between each source attribute and each target attribute so as to obtain a target compiling configuration file; and adding the object compiling configuration file and the object code into a pre-compiling object code warehouse. According to the technical scheme, the pre-compiled object code warehouse containing the source compiling configuration file corresponding to the object code can be generated conveniently, and developers are assisted in improving the development efficiency.

Description

Pre-compiled object code warehouse determination method and device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for determining a pre-compiled object code repository, and a storage medium.
Background
In the development process of the conventional android system, different contents are usually released according to different use environments and different use requirements of users when products are released. For example, when a user needs to develop a product for the second time, a source code warehouse needs to be released together; otherwise, only the object code repository may be published.
In the prior art, a source code is compiled by using a compiling configuration file, so that an object code can be generated. The object code is deployed to the specified location required for the product, and is typically configured in a compiled configuration file of a source code repository. If the source code needs to be stripped off, only the object code is reserved, and a compiling configuration file which is different from a compiling configuration file used in compiling the source code is also needed for configuration.
How to generate a source compiling configuration file corresponding to an object code is a technical problem to be solved urgently.
Disclosure of Invention
The application provides a method and a device for determining a precompiled object code warehouse, which can conveniently generate the precompiled object code warehouse containing a source compiling configuration file corresponding to an object code and assist developers in improving development efficiency.
In order to achieve the above object, the present application provides the following technical solutions:
in a first aspect, a method for determining a pre-compiled object code repository is provided, where the method for determining a pre-compiled object code repository includes: the method comprises the steps of obtaining a plurality of source code warehouses and object codes, wherein the source code warehouses comprise source codes and source compiling configuration files corresponding to the source codes, the source compiling configuration files comprise a plurality of source modules, and the source modules have source attributes; analyzing by utilizing the source compiling configuration file to obtain a source module to be converted; obtaining a conversion target module corresponding to the source module to be converted according to a first mapping relation between each source module and each target module; obtaining the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between each source attribute and each target attribute so as to obtain a target compiling configuration file; and adding the target compiling configuration file and the target code into a pre-compiling target code warehouse.
Optionally, before the analyzing and obtaining the source module to be converted by using the source compiling configuration file, the method further includes: and screening the source module according to a first mapping relation between the source module and the target module to obtain an effective source module, wherein the effective source module is used for determining the source module to be converted.
Optionally, the obtaining the multiple source code warehouses and the object code further includes: the contents of the compiled variants of each object code are obtained.
Optionally, after obtaining the conversion target module corresponding to the source module to be converted according to the first mapping relationship between the source module and the target module, the method further includes: judging whether the conversion target module exists in the precompiled target code warehouse or not; if the conversion target module exists in the pre-compiled target code warehouse, adding the compiled variety content of the target code into the target attribute of the conversion target module.
Optionally, the method further includes: and if the conversion target module does not exist in the precompiled target code warehouse, acquiring the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between the source attribute and the target attribute.
Optionally, the pre-compiled object code repository includes object compiled configuration files for the plurality of application environments and object code.
Optionally, the method further includes: acquiring a software material list, wherein the software material list records indexes of all warehouses; searching and determining the use condition of each warehouse in the software material table list in warehouse information, wherein the use condition of the warehouse indicates whether codes in the warehouse are modified or not; and selecting a source code warehouse or a precompiled object code warehouse to generate a warehouse list according to the use condition of each warehouse in the software bill of materials.
Optionally, the selecting a source code warehouse or a precompiled object code warehouse according to the use condition of each warehouse in the software bill of materials list to generate a warehouse list includes: if the service condition of the warehouse in the software bill of materials list is an unmodified binary system or a modified binary system, selecting the pre-compiled object code warehouse to generate a warehouse list; and if the using condition of the warehouse in the software bill of materials list is the unmodified source code or the modified source code, selecting the source code warehouse to generate a warehouse list.
Optionally, the method further includes: deriving the repository inventory and a code repository in the repository inventory.
In a second aspect, the present application further discloses a precompiled object code warehouse exporting apparatus, which includes: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of source code warehouses and object codes, the source code warehouses comprise source codes and source compiling configuration files corresponding to the source codes, the source compiling configuration files comprise a plurality of source modules, and the source modules have source attributes; the analysis module is used for analyzing the source compiling configuration file to obtain a source module to be converted; the module conversion module is used for obtaining a conversion target module corresponding to the source module to be converted according to a first mapping relation between each source module and each target module; the attribute conversion module is used for obtaining the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between each source attribute and each target attribute so as to obtain a target compiling configuration file; and the determining module is used for adding the object compiling configuration file and the object code into a pre-compiling object code warehouse.
In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored, the computer program being executable by a processor to perform any one of the methods provided in the first aspect.
In a fourth aspect, a computer program product is provided, having a computer program stored thereon, the computer program being executable by a processor to perform any of the methods provided in the first aspect.
In a fifth aspect, an embodiment of the present application further provides a chip, where a computer program is stored on the chip, and when the computer program is executed by the chip, the steps of the method are implemented.
Compared with the prior art, the technical scheme of the embodiment of the application has the following beneficial effects:
in the technical scheme of the application, since the compiling configuration file in the source code warehouse records the compiling rule of each source module, the source module to be converted in the source code warehouse, which needs to be converted, can be obtained through the parsing of the compiling configuration file. A first mapping relation exists between the source module and the target module, and a conversion target module corresponding to the source module to be converted can be determined based on the mapping relation; and a second mapping relationship exists between the attributes and the target attributes, then the target attributes of the conversion target module can be obtained based on the second mapping relationship, the target compiling configuration file includes the target attributes, and the target compiling configuration file and the target codes are added into the pre-compiling target code warehouse, so that the pre-compiling target code warehouse can be obtained for subsequent release. The source module and the source attribute thereof are directly mapped, so that the project of a source code warehouse can be integrated, the precompiled object code warehouse can be quickly and accurately obtained, the precompiled object code warehouse can be directly published when the precompiled object code warehouse needs to be published subsequently, and developers are assisted to improve the development efficiency.
Further, the object code is a compilation result of the source code in one or more application environments, and the pre-compiled object code repository includes object compilation configuration files for a plurality of application environments and the object code. According to the technical scheme, the target compiling configuration files and the target codes aiming at the application environments are stored in the same warehouse, so that one pre-compiling target code warehouse can adapt to various compiling configurations, and the development efficiency is further improved.
Drawings
FIG. 1 is a flowchart of a method for determining a pre-compiled object code repository according to an embodiment of the present application;
fig. 2 is a schematic diagram of a specific application scenario provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of another specific application scenario provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of another specific application scenario provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a pre-compiled object code repository determining apparatus according to an embodiment of the present application.
Detailed Description
As described in the background art, how to generate a source compilation configuration file corresponding to an object code is a technical problem to be solved.
In the technical scheme of the application, since the compiling configuration file in the source code warehouse records the compiling rule of each source module, the source module to be converted in the source code warehouse, which needs to be converted, can be obtained through parsing of the compiling configuration file. A first mapping relation exists between the source module and the target module, and a conversion target module corresponding to the source module to be converted can be determined based on the mapping relation; and a second mapping relationship exists between the attributes and the object attributes, then the object attributes of the conversion object module can be obtained based on the second mapping relationship, the object compilation configuration file comprises the object attributes, and the pre-compilation object code warehouse can be obtained for subsequent release by adding the object compilation configuration file and the object code into the pre-compilation object code warehouse. The source module and the source attribute thereof are directly mapped, so that the project of a source code warehouse can be integrated, the precompiled object code warehouse can be quickly and accurately obtained, the precompiled object code warehouse can be directly published when the precompiled object code warehouse needs to be published subsequently, and developers are assisted to improve the development efficiency.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the present application are described in detail below.
Referring to fig. 1, the method provided by the present application includes:
step 101: the method comprises the steps of obtaining a plurality of source code warehouses and object codes, wherein the source code warehouses comprise source codes and source compiling configuration files corresponding to the source codes, the source compiling configuration files comprise a plurality of source modules, and the source modules have source attributes;
step 102: analyzing by utilizing the source compiling configuration file to obtain a source module to be converted;
step 103: obtaining a conversion target module corresponding to the source module to be converted according to a first mapping relation between each source module and each target module;
step 104: obtaining the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between each source attribute and each target attribute so as to obtain a target compiling configuration file;
step 105: and adding the target compiling configuration file and the target code into a pre-compiling target code warehouse.
It should be noted that the sequence numbers of the steps in this embodiment do not represent a limitation on the execution sequence of the steps.
It is understood that, in a specific implementation, the pre-compiled object code repository determining method may be implemented by using a software program running in a processor integrated within a chip or a chip module. The method may also be implemented by combining software and hardware, and the present application is not limited thereto.
In this embodiment, the source code repository includes source codes and source compiling configuration files (such as makefile or android. The source compilation configuration file records how the source code is compiled and configuration actions, such as the installation location of the object code, additional actions after installation, etc. In particular, the source compilation configuration file includes a plurality of source modules, the source modules having source attributes.
The source module referred to in the embodiments of the present invention refers to a minimum unit having an independent function or an independent compilation Target (Target), and the source property referred to in the embodiments of the present invention refers to a property possessed by the source module, and specifically may be a value of a field (field), a property (property), or a variable (variable) in a source compilation configuration file.
The precompiled object code warehouse to be obtained by the embodiment of the invention comprises object codes and does not comprise source codes. Accordingly, what is recorded in the target compilation configuration file in the pre-compiled target code repository is a target code-related configuration action, the target compilation configuration file being different from the source compilation configuration file. Through the above steps 101-105, the target compiling configuration file and thus the pre-compiled target code repository can be obtained.
In a specific implementation of step 102, a source module to be converted is obtained by parsing the source compilation configuration file, and the source module to be converted is selected from the source modules included in the source compilation configuration file. That is, the target compiling configuration file is obtained by mapping the source module to be converted and the source attribute thereof in the source compiling configuration file.
In particular, the source compilation configuration file used is parsed into a file format suitable for the current processor architecture. For example, the source compiling configuration file in the source code repository is in an mk format, and in order to be suitable for the android platform, the source compiling configuration file may be converted into a blueprint (bp) format, and the source module to be converted is obtained by parsing the source compiling configuration file in the bp format.
Since each source module and each target module have a first mapping relationship therebetween, in a specific implementation of step 103, the conversion target module corresponding to the source module to be converted can be obtained by using the first mapping relationship.
Since each source attribute and each target attribute have a second mapping relationship, in the specific implementation of step 104, the target attribute corresponding to the source attribute of the source module to be converted, that is, the target attribute of the conversion target module, can be obtained by using the second mapping relationship. To this end, a target compilation configuration file may be obtained that includes the transformation target module and its target attributes.
It should be noted that, the first mapping relationship and the second mapping relationship may be obtained by pre-configuration, and the application does not limit this.
Then in a specific implementation of step 105 the object compilation configuration file and the object code are added to a pre-compiled object code repository, which is an object code repository for release.
In one embodiment, the pre-compiled object code repository may be an empty repository prior to the object compilation configuration file and the object code being added.
In another embodiment, before the target compilation configuration file and the target code are added, other target codes and their corresponding target compilation configuration files may be stored in the pre-compiled target code repository. Other object code and the object code may be the result of compilation of the same source code in different application environments. For example, the other object code is an object code applicable to a 32-bit arm 7 processor, and the object code is an object code applicable to a 64-bit arm64 processor.
According to the embodiment of the invention, the source module and the source attribute thereof are directly mapped, so that the project of the source code warehouse can be integrated, the precompiled object code warehouse can be quickly and accurately obtained, and the precompiled object code warehouse can be directly issued when needing to be issued subsequently, and development efficiency is improved by developers in an auxiliary manner.
In a non-limiting embodiment, the object code obtained by the embodiment of the present invention may be a compiled result of a source code in an application environment, and may also be referred to as a single set of object code. This is explained in detail below with reference to fig. 2.
The source code repository 201 and the first mapping 203 serve as inputs to the module analyzer 202. The module analyzer 202 may execute step 102 and step 103 shown in fig. 1, and output a conversion target module corresponding to the source module to be converted.
The second mapping relationship 205 serves as an input to the module converter 204. The module converter 204 may perform the steps of step 104 shown in FIG. 1, outputting the target property of the conversion target module.
Specifically, the module analyzer 202 may map the source modules to be converted one by one, and correspondingly, the module converter 204 may map the source attributes of the source modules to be converted one by one until the mapping of all the source modules to be converted and the source attributes thereof is completed.
Since the module analyzer 202 outputs a plurality of conversion target modules and the module converter 204 outputs a plurality of target attributes, the compilation configuration file generator 206 may concatenate the plurality of conversion target modules and the target attributes thereof to output a target compilation configuration file.
The target compilation configuration file and the target code 208 serve as inputs to a pre-compiled target code repository generator 207, and the pre-compiled target code repository generator 207 generates and outputs a pre-compiled target code repository 209 based on the inputs. Specifically, pre-compiled object code repository generator 207 places the object compiled configuration file and object code 208 into an empty repository, generating pre-compiled object code repository 209. Pre-compiled object code repository 209 includes object code 208 and its corresponding object compilation configuration file.
In another non-limiting embodiment, the object code obtained by the embodiment of the present invention may be a compilation result of a source code in multiple application environments, and may also be referred to as multiple sets of object codes. This is explained in detail below with reference to fig. 3.
The source code repository 301 and the first mapping 303 serve as inputs to the module filter 302. The module filter 302 may filter the source modules in the source compiling configuration file according to the first mapping relation 303 to obtain effective source modules, and the effective source modules may be used to determine source modules to be converted. The valid source module refers to a source module having a corresponding target module in the first mapping relation 303.
Effective modules are screened out through the module filter 302, so that the source module which cannot be converted into the target module can be prevented from being converted, unnecessary operation is avoided, and the efficiency is improved.
In this embodiment of the present invention, the module analyzer 304 may first obtain the source module to be converted according to the valid module, and then determine whether the target module to be converted exists in the precompiled target code warehouse.
If the target module does not exist in the precompiled object code repository, the module converter 306 may output the target attribute of the target module according to the source attribute of the source module to be converted and the second mapping relationship 305.
If a translation target module exists in the pre-compiled target code repository, module analyzer 304 adds the contents of the compiled varieties of the target code to the target attributes of the translation target module. In particular, the compiled variant content of the object code may indicate an application environment of the object code, such as a processor type, a platform type, and the like.
The compiling configuration file generator 307 may splice a plurality of conversion target modules and target attributes thereof, and output a target compiling configuration file. The conversion target module and the target attribute corresponding to each compiled variety content are divided into the same class in the compiling configuration file, so that after the application environment information is configured by the external compiling configuration information, the adaptive conversion target module and the target attribute thereof can be output and installed.
The object compilation configuration file and the object code 308 serve as inputs to a pre-compiled object code repository generator 309, and the pre-compiled object code repository generator 309 generates and outputs a pre-compiled object code repository 310 based on the inputs. Specifically, pre-compiled object code repository generator 207 puts the object compiled configuration file and object code 208 into an empty repository or updates an existing object compiled configuration file in a covering manner, generating pre-compiled object code repository 310. Precompiled object code repository 310 includes object code 308 corresponding to the contents of a plurality of compiled varieties and an object compilation configuration file.
For example, pre-compiled object code repository 310 includes object code 1 for compiled variant content 1, object code 2 for compiled variant content 2, …, and object code X for compiled variant content X. The target compilation configuration file in pre-compiled target code repository 310 includes target property Build variant1 for compiled variant content 1, target properties Build variant2, … for compiled variant content 2, and target property Build variant X for compiled variant content X.
In an embodiment of the present application, the object code is a compilation result of a source code in one or more application environments, and the pre-compiled object code repository includes object compilation configuration files for a plurality of application environments and the object code. According to the technical scheme, the target compiling configuration files and the target codes aiming at the application environments are stored in the same warehouse, so that one pre-compiling target code warehouse can adapt to various compiling configurations, and the development efficiency is further improved.
In a non-limiting embodiment of the present invention, after obtaining the warehouse of the precompiled object code, the warehouse list and the corresponding warehouse that need to be output may also be determined according to the actual scenario. Reference may be made in particular to fig. 4.
A Software Bill of Materials (SBoM) 401 and a repository registry management library 402 are used as inputs to the repository parser 403. The software bill of materials 401 records the index of each warehouse, and the warehouse registration management library 402 records the use condition of each warehouse. The usage of the repository may indicate whether the repository has been modified.
The repository resolver 403 finds and determines the usage of each repository in the software bill of materials 401 from the repository information of the repository registration management library 402 according to the index of the repository in the software bill of materials 401. The warehouse parser 403 outputs the usage of each warehouse.
The repository inventory printer 404 generates a repository inventory 405 by selecting a source code repository or a precompiled object code repository based on the usage of each repository.
Specifically, if the usage of the warehouse is an Unmodified Binary (UB) or a Modified Binary (MB), the pre-compiled object code warehouse is selected to generate the warehouse list 405, that is, the warehouse list 405 includes the identifier of the pre-compiled object code warehouse.
If the usage of the repository is Unmodified Source (US) or Modified Source (MS), the Source repository is selected to generate the repository list 405, that is, the repository list 405 includes the identifier of the Source repository.
The warehouse manifest printer 404 outputs a warehouse manifest 405 and a code warehouse indicated by the identification of the warehouse in the warehouse manifest 405. If source code repository 406 is included in repository inventory 405, source code repository 406 is output. If the warehouse listing 405 includes the precompiled object code 407, the precompiled object code 407 is output.
For more specific implementation manners of the embodiments of the present application, please refer to the foregoing embodiments, which are not described herein again.
Referring to fig. 5, fig. 5 shows a precompiled object code warehouse exporting apparatus 50, where the precompiled object code warehouse exporting apparatus 50 may include:
an obtaining module 501, configured to obtain multiple source code warehouses and object codes, where a source code warehouse includes a source code and a source compiling configuration file corresponding to the source code, the source compiling configuration file includes multiple source modules, and a source module has a source attribute;
the analysis module 502 is configured to analyze the source compiling configuration file to obtain a source module to be converted;
a module conversion module 503, configured to obtain a 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;
an attribute conversion module 504, configured to obtain a target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relationship between each source attribute and each target attribute, so as to obtain a target compiling configuration file;
and a determining module 505, configured to add the object compilation configuration file and the object code to a pre-compiled object code repository.
In a specific implementation, the precompiled object code warehouse exporting apparatus 50 may correspond to a Chip having a precompiled object code warehouse exporting function in a terminal device, such as a System-On-a-Chip (SOC), a baseband Chip, etc.; or the terminal device comprises a chip module with a pre-compiled object code warehouse export function; or to a chip module having a chip with a data processing function, or to a terminal device.
Specifically, the parsing module 502 and the module conversion module 503 correspond to the module analyzer in the foregoing embodiment, and the attribute conversion module 504 corresponds to the module converter in the foregoing embodiment.
Further, the precompiled object code repository exporting apparatus 50 may further include:
the system comprises a warehouse list acquisition module, a warehouse management module and a management module, wherein the warehouse list acquisition module is used for acquiring a software bill of materials (DOM) which records indexes of all warehouses;
the warehouse analysis module is used for searching and determining the use condition of each warehouse in the software material table list in warehouse information, wherein the use condition of the warehouse indicates whether codes in the warehouse are modified or not;
and the warehouse list generation module is used for selecting a source code warehouse or a precompiled object code warehouse to generate a warehouse list according to the use condition of each warehouse in the software bill of materials list.
The repository parsing module in the embodiment of the present invention corresponds to the repository parser 403 shown in fig. 4, and the repository inventory generating module corresponds to the repository inventory printer 404 shown in fig. 4.
Other relevant descriptions about the precompiled object code warehouse exporting apparatus 50 may refer to the relevant descriptions in the foregoing embodiments, and are not described herein again.
Each module/unit included in each apparatus and product described in the above embodiments may be a software module/unit, or may also be a hardware module/unit, or may also be a part of a software module/unit and a part of a hardware module/unit. For example, for each device or product applied to or integrated into a chip, each module/unit included in the device or product may be implemented by hardware such as a circuit, or at least a part of the module/unit may be implemented by a software program running on a processor integrated within the chip, and the rest (if any) part of the module/unit may be implemented by hardware such as a circuit; for each device and product applied to or integrated with the chip module, each module/unit included in the device and product may be implemented by hardware such as a circuit, and different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least part of the modules/units may be implemented by a software program running on a processor integrated inside the chip module, and the rest (if any) part of the modules/units may be implemented by hardware such as a circuit; for each apparatus and product applied to or integrated in the terminal device, each module/unit included in the apparatus and product may all be implemented by hardware such as a circuit, and different modules/units may be located in the same component (e.g., a chip, a circuit module, etc.) or different components in the terminal device, or at least part of the modules/units may be implemented by a software program running on a processor integrated inside the terminal device, and the rest (if any) part of the modules/units may be implemented by hardware such as a circuit.
The embodiment of the application also discloses a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program runs, the steps of the method shown in fig. 1 to 3 can be executed. The storage medium may include a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, and the like. The storage medium may further include a non-volatile (non-volatile) memory or a non-transitory (non-transient) memory, etc.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document indicates that the former and latter related objects are in an "or" relationship.
The "plurality" appearing in the embodiments of the present application means two or more.
The descriptions of the first, second, etc. appearing in the embodiments of the present application are only for illustrating and differentiating the objects, and do not represent the order or the particular limitation of the number of the devices in the embodiments of the present application, and do not constitute any limitation to the embodiments of the present application.
The term "connect" in the embodiments of the present application refers to various connection manners, such as direct connection or indirect connection, to implement communication between devices, which is not limited in this embodiment of the present application.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer instructions or the computer program are loaded or executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire or wirelessly.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus, and system may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative; for example, the division of the cell is only a logic function division, and there may be another division manner in actual implementation; for example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods described in the embodiments of the present application.
Although the present application is disclosed above, the present application is not limited thereto. Various changes and modifications may be effected therein by one of ordinary skill in the pertinent art without departing from the scope or spirit of the present disclosure, and it is intended that the scope of the present disclosure be defined by the appended claims.

Claims (12)

1. A method for determining a warehouse of pre-compiled object code, comprising:
the method comprises the steps of obtaining a plurality of source code warehouses and object codes, wherein the source code warehouses comprise source codes and source compiling configuration files corresponding to the source codes, the source compiling configuration files comprise a plurality of source modules, and the source modules have source attributes;
analyzing by utilizing the source compiling configuration file to obtain a source module to be converted;
obtaining a conversion target module corresponding to the source module to be converted according to a first mapping relation between each source module and each target module;
obtaining the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between each source attribute and each target attribute so as to obtain a target compiling configuration file;
and adding the target compiling configuration file and the target code into a pre-compiling target code warehouse.
2. The method of claim 1, wherein the obtaining a source module to be transformed by parsing the source compilation configuration file further comprises:
and screening the source module according to a first mapping relation between the source module and the target module to obtain an effective source module, wherein the effective source module is used for determining the source module to be converted.
3. The method of claim 1, wherein the object code is a result of compilation of the source code in one or more application environments, and wherein obtaining a plurality of source code repositories and object code further comprises:
the compiled variant content of each object code is obtained.
4. The method according to claim 3, wherein obtaining the target module to be converted corresponding to the source module to be converted according to the first mapping relationship between the source module and the target module further comprises:
judging whether the conversion target module exists in the precompiled target code warehouse or not;
if the conversion target module exists in the pre-compiled target code warehouse, adding the compiled variety content of the target code into the target attribute of the conversion target module.
5. The pre-compiled object code repository determination method according to claim 4, further comprising:
and if the conversion target module does not exist in the precompiled target code warehouse, acquiring the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between the source attribute and the target attribute.
6. The pre-compiled object code repository determination method according to claim 3, wherein the pre-compiled object code repository comprises object code and object compilation configuration files for the plurality of application environments.
7. The pre-compiled object code repository determination method according to claim 1, further comprising:
acquiring a software material list, wherein the software material list records indexes of all warehouses;
searching and determining the using condition of each warehouse in the software bill of materials list in the warehouse information, wherein the using condition of the warehouse represents whether the codes in the warehouse are modified or not;
and selecting a source code warehouse or a precompiled object code warehouse to generate a warehouse list according to the use condition of each warehouse in the software bill of materials.
8. The method of claim 7, wherein the selecting a source code repository or a precompiled object code repository to generate a repository inventory according to usage of each repository in the software bill of materials comprises:
if the using condition of the warehouse in the software bill of materials list is an unmodified binary system or a modified binary system, selecting the precompiled object code warehouse to generate a warehouse list;
and if the using condition of the warehouse in the software material list is the unmodified source code or the modified source code, selecting the source code warehouse to generate a warehouse list.
9. The precompiled object code repository determination method of claim 7, further comprising:
deriving the repository inventory and a code repository in the repository inventory.
10. A pre-compiled object code warehouse export apparatus, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of source code warehouses and object codes, the source code warehouses comprise source codes and source compiling configuration files corresponding to the source codes, the source compiling configuration files comprise a plurality of source modules, and the source modules have source attributes;
the analysis module is used for analyzing the source compiling configuration file to obtain a source module to be converted;
the module conversion module is used for obtaining a conversion target module corresponding to the source module to be converted according to a first mapping relation between each source module and each target module;
the attribute conversion module is used for obtaining the target attribute of the conversion target module according to the source attribute of the source module to be converted and the second mapping relation between each source attribute and each target attribute so as to obtain a target compiling configuration file;
and the determining module is used for adding the target compiling configuration file and the target code into a pre-compiling target code warehouse.
11. A computer-readable storage medium, having stored thereon a computer program, wherein the computer program, when executed by a processor, performs the steps of the pre-compiled object code warehouse determination method according to any one of claims 1 to 9.
12. A terminal device comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, wherein the processor executes the computer program to perform the steps of the pre-compiled object code repository determination method according to any one of claims 1 to 9.
CN202211435753.6A 2022-11-16 2022-11-16 Pre-compiled object code warehouse determination method and device and storage medium Pending CN115756484A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211435753.6A CN115756484A (en) 2022-11-16 2022-11-16 Pre-compiled object code warehouse determination method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211435753.6A CN115756484A (en) 2022-11-16 2022-11-16 Pre-compiled object code warehouse determination method and device and storage medium

Publications (1)

Publication Number Publication Date
CN115756484A true CN115756484A (en) 2023-03-07

Family

ID=85372085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211435753.6A Pending CN115756484A (en) 2022-11-16 2022-11-16 Pre-compiled object code warehouse determination method and device and storage medium

Country Status (1)

Country Link
CN (1) CN115756484A (en)

Similar Documents

Publication Publication Date Title
CN111209004B (en) Code conversion method and device
CN112394942B (en) Distributed software development compiling method and software development platform based on cloud computing
CN109558525B (en) Test data set generation method, device, equipment and storage medium
US9043757B2 (en) Identifying differences between source codes of different versions of a software when each source code is organized using incorporated files
CN112287013B (en) Data conversion method and adapter
CN111427583A (en) Component compiling method and device, electronic equipment and computer readable storage medium
CN114021130A (en) Compiling-independent vulnerability scanning method and device and storage medium
CN112083709B (en) Vehicle diagnosis method, system, terminal device and storage medium
CN112612502A (en) Patch generation method, device, equipment and storage medium
CN113901083A (en) Heterogeneous data source operation resource analysis positioning method and equipment based on multiple analyzers
CN112433940A (en) Software development kit SDK testing method and related equipment
CN112769706A (en) Componentized routing method and system
CN116431520A (en) Test scene determination method, device, electronic equipment and storage medium
CN117112060A (en) Component library construction method and device, electronic equipment and storage medium
US10606569B2 (en) Declarative configuration elements
CN116414774A (en) File migration method, device, equipment and storage medium
CN110826074A (en) Application vulnerability detection method and device and computer readable storage medium
CN114706586A (en) Code compiling method, code running method, code compiling device, code running device, computer equipment and storage medium
CN115756484A (en) Pre-compiled object code warehouse determination method and device and storage medium
CN116302054A (en) Development method and device of software project, storage medium and electronic equipment
CN113343036B (en) Data blood relationship analysis method and system based on key topological structure analysis
CN114756183A (en) Data printing method, device, equipment and storage medium
CN112905271A (en) Calling method and device of application program interface API and electronic equipment
CN113485942A (en) Automatic testing method and device based on independent module
CN111399842A (en) Code compiling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination