[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Yeah I was wondering the same thing when I saw the failure. Unfortunately such design is a bit outside of my LLVM knowledge. I would just like to use cc1as_main.cpp functionality outside of LLVM without needing to update my copy of cc1as with every LLVM update.

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D63852#2517500 , @aykevl wrote: > or maybe I've put `AssemblerInvocation` in the wrong directory/library. This seems to be a good design question. I think a lot of people consider `-cc1` functionality to be the

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. @aykevl, please check http://lab.llvm.org:8011/#/builders/57/builds/3704: it seems you are missing a change to `clang/lib/Frontend/CMakeLists.txt` to update the `LLVM_LINK_COMPONENTS`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @echristo do you have an idea what's going on or how to fix this? I suspect I'm not including a required dependency or maybe I've put `AssemblerInvocation` in the wrong directory/library. I'm not very familiar with CMake or C++ so I'm not sure how to best fix this.

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Well that didn't quite work. I get errors like this: tools/clang/lib/Frontend/CMakeFiles/obj.clangFrontend.dir/AssemblerInvocation.cpp.o:(.toc+0x0): undefined reference to `vtable for llvm::MCSubtargetInfo'

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Thanks! I have updated this patch to match LLVM main and committed it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits

[PATCH] D63852: [Clang] Move assembler into a separate file

2021-01-23 Thread Ayke via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2325157c0568: [Clang] Move assembler into a separate file (authored by aykevl). Changed prior to commit: https://reviews.llvm.org/D63852?vs=206769=318750#toc Repository: rG LLVM Github Monorepo

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-12-01 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. Thanks for the explanation, lgtm. -eric Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-10-31 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. (sorry, I missed your comment) I basically want to run `clang` by linking to it and calling it directly, without invoking any external commands. You can see here how I did it: https://github.com/tinygo-org/tinygo/blob/master/builder/clang.cpp I copied the cc1as code in

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-23 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. The reason to not call into LLVM directly is because I want to use the compiler driver, to be compatible with all the compiler flags. Reimplementing the assembler driver would be a pain. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-15 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. Hmm. In general I'd like to hear more about what you're trying. Can you give an idea of how you'd like to invoke the library to assemble something via clang? Why not just call into llvm directly? I'm not necessarily against changing the layering here fwiw, just wanted

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-06-10 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. @echristo any chance you could take a look at this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list

[PATCH] D63852: [Clang] Move assembler into a separate file

2020-04-05 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Ping? I'm not sure who to add as a reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-12-03 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. Ping? This would be super useful to have: it avoids copying most of cc1as. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-08-17 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. *friendly ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-07-17 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-06-26 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 206769. aykevl added a comment. - removed useless anonymous namespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63852/new/ https://reviews.llvm.org/D63852 Files:

[PATCH] D63852: [Clang] Move assembler into a separate file

2019-06-26 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added a reviewer: chandlerc. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. This change adds an AssemblerInvocation class, similar to the CompilerInvocation class. It can be used to invoke cc1as directly. The project I'm