Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-F5B7C10E-4E46-43D9-9558-65EA29645568
Visible to Intel only — GUID: GUID-F5B7C10E-4E46-43D9-9558-65EA29645568
Create a Library from IPO Objects
Libraries are often created using a library manager such as llvm-ar for Linux or llvm-lib for Windows. Given a list of objects, the library manager will insert the objects into a named library to be used in subsequent link steps.
Linux
Use llvm-ar to create a library from a list of objects. For example the following command creates a library named user.a containing the a.o and b.o objects:
llvm-ar cru user.a a.o b.o
Windows
Use llvm-lib to create libraries of IPO mock object files and link them on the command line.
For example:- Assume that you create three mock object files using a command similar to:
icx /c /Qipo a.cpp b.cpp c.cpp
- Further assume a.obj contains the main subprogram. Create a library with a command similar to:
llvm-lib -out:main.lib b.obj c.obj
- Link the library and the main program object file with a command similar to:
icx -fuse-ld=lld a.obj main.lib -o result.exe