SouraVX added inline comments.

================
Comment at: flang/test/Frontend/input-output-file.f90:6
 !--------------------------
+! NOTE: We need `-E` below in order to instruct the compiler driver to create 
a job representing a fronted compiler invocation
 ! TEST 1: Print to stdout (implicit)
----------------
awarzynski wrote:
> SouraVX wrote:
> > I didn't follow this completely, Could you please elaborate a bit.
> Sorry, I'm doing a poor job documenting this here.
> 
> Basically, we want to instruct `flang-new` to stop after the preprocessing 
> phase. `-E` is a phase control flag. `-c` is another phase control flag. You 
> can also skip phase flags all together:
> ```
> $ bin/flang-new -ccc-print-phases file.f90
>             +- 0: input, "file.f90", f95-cpp-input
>          +- 1: preprocessor, {0}, f95
>       +- 2: compiler, {1}, ir
>    +- 3: backend, {2}, assembler
> +- 4: assembler, {3}, object
> 5: linker, {4}, image
> ```
> As you can see, without `-E` the driver, `flang-new`, would attempt to run 
> multiple phases which would result in multiple compiler _jobs_. But we only 
> want the compiler job, i.e. we are only interested the the first phase. 
> (IIRC, compiler jobs map 1-1 to compiler phases).
> 
> So, `-E` is added here to make sure that `flang-new` doesn't try to do too 
> much here.
Great - thanks for explaining the intent!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96864/new/

https://reviews.llvm.org/D96864

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to