Try to implment using flang -cc1as compile assembly files. Related patch (fc1as): https://reviews.llvm.org/D143478
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/tools/flang-driver/CMakeLists.txt | ||
---|---|---|
37–41 | In general we are trying to limit or reduce the dependency on Clang. This will further increase the dependency. Can we share more code by moving the common portion to llvm/lib/Frontend? |
flang/tools/flang-driver/CMakeLists.txt | ||
---|---|---|
37–41 | +1 |
If this is all that's needed to have an integrated assembly in LLVM Flang, then this is good news and https://reviews.llvm.org/D143478 should be abandoned in favor of this approach. However, we need to find alternatives to increasing dependency on Clang.
flang/tools/flang-driver/CMakeLists.txt | ||
---|---|---|
37–41 | +1 |
Simplified code
flang/tools/flang-driver/CMakeLists.txt | ||
---|---|---|
37–41 | I think this may need to deal with the TextDiagnosticPrinter part. But I don't have a good way to handle it yet. |
@sunshaoce, @awarzynski are there remaining issues with this patch? We currently needs this for our testing.
"However, we need to find alternatives to increasing dependency on Clang." ;-)
We should avoid code duplication, so making sure that flang-new -fc1as == clang -cc1as is a good thing. But the extra dependency on clangFrontend would be a step away from making Flang independent of Clang.
We currently needs this for our testing.
Presumably, this is only needed for compiling assembly files? Why not use clang --cc1as instead? At least as an interim solution.
flang/tools/flang-driver/CMakeLists.txt | ||
---|---|---|
37–41 | @DavidTruby Can you have a quick look whether we can refactor the case for TextDiagnosticPrinter? |