[llvm-bugs] [Bug 42386] New: Clang returns zero but does not create output file with -c + object file as input

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 25 10:32:06 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42386

            Bug ID: 42386
           Summary: Clang returns zero but does not create output file
                    with -c + object file as input
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: sbc at chromium.org
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

I would expect clang to return non-zero when the output is not generated.

```
$ clanh -c -o hello2.o hello.o
clang-9: warning: hello.o: 'linker' input unused
[-Wunused-command-line-argument]
$ echo $?
0
$ stat hello2.o
stat: cannot stat 'hello2.o': No such file or directory
```

I noticed gcc has the same behavior, but still I would expect `clang: error: no
input files` after the warning and a non-zero return code. 

Another way of putting it: if all inputs are unused I would expect "no input
files" error.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190625/132198d0/attachment-0001.html>


More information about the llvm-bugs mailing list