You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
linking together the .o files into an executable
for (2) I think you'll want to use the Clang driver to run a link subprocess (which will use lld or some other linker on the system)
for (1), you'll want to do this directly. llc does do this, but I wouldn't use it as a reference. I would use the code in Clang in BackendUtil.cpp https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/BackendUtil.cpp
None of that file's routines are really in usefully public and reliably APIs
I wouldn't depend on it
I would look at how it uses the LLVM APIs, and then directly use the LLVM APIs to emit the .o file
(this file is considered an implementation detail of Clang)
(but it's usage of the LLVM APIs is likely a better reference that llc's usage of LLVM APIs)
Per some side-discussion, most of the BackendUtil.cpp won't be used, e.g. ThinLTO. We might want that eventually but not right now, and possibly rewritten. Rather, this really is for the most core part of things like using the pass manager and the core LLVM APIs for .o.
(note, not working on this right now, but taking this down to remember the discussion)
The text was updated successfully, but these errors were encountered:
chandlerc
added
long term
Issues expected to take over 90 days to resolve.
and removed
inactive
Issues and PRs which have been inactive for at least 90 days.
labels
Aug 6, 2023
Capturing some notes from @chandlerc:
Per some side-discussion, most of the BackendUtil.cpp won't be used, e.g. ThinLTO. We might want that eventually but not right now, and possibly rewritten. Rather, this really is for the most core part of things like using the pass manager and the core LLVM APIs for .o.
(note, not working on this right now, but taking this down to remember the discussion)
The text was updated successfully, but these errors were encountered: