[all-commits] [llvm/llvm-project] aa06f3: [flang][driver] Fix output filename generation in ...

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Fri Jul 16 09:06:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aa06f34dac65cbfcbffd7cb3b033eadcd103ffdf
      https://github.com/llvm/llvm-project/commit/aa06f34dac65cbfcbffd7cb3b033eadcd103ffdf
  Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
  Date:   2021-07-16 (Fri, 16 Jul 2021)

  Changed paths:
    M flang/tools/f18/flang.in

  Log Message:
  -----------
  [flang][driver] Fix output filename generation in `flang`

In the `flang` bash script, we need to be careful _when_ to use <output>
from `flang -c -o <output> <input>` when generating the relocatable
output file name.

In particular, we should use it in this case:
```compilation only
flang -c -o <output> <input>
```
but leave it for the final executable here:
```compile, assemble and link
flang  -o <output> <input>
```
This change is implemented in `get_relocatable_name`.

I've also taken the liberty to fix how errors from sub-commands are
reported (without this change, `flang` always returns `0` on failure).
This is implemented in `main`.

Differential Revision: https://reviews.llvm.org/D105896




More information about the All-commits mailing list