[PATCH] D156363: [Driver] -###: exit with code 1 if hasErrorOccurred

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 10:57:52 PDT 2023


MaskRay added a comment.

In D156363#4554812 <https://reviews.llvm.org/D156363#4554812>, @jhuber6 wrote:

> In D156363#4554790 <https://reviews.llvm.org/D156363#4554790>, @ro wrote:
>
>> In D156363#4553043 <https://reviews.llvm.org/D156363#4553043>, @ro wrote:
>>
>>> It seems the latest commit of this patch has (re-)introduced two failures on the Solaris/amd64 buildbot <https://lab.llvm.org/staging/#/builders/101/builds/14320>:
>>>
>>>   FAIL: Clang::clang_f_opts.c
>>>   FAIL: Clang::lto.c
>>>
>>> I cannot really make sense of that.
>>
>> I think I found it: running the matching '*.script' files under `bash -x` shows the tests ending with:
>>
>> - for `clang_f_lto.c`:
>>
>>   + : 'RUN: at line 117'
>>   + /var/llvm/local-amd64-debug-stage2/tools/clang/stage2-bins/bin/clang -### -flto -forder-file-instrumentation /vol/llvm/src/llvm-project/local/clang/test/Driver/clang_f_opts.c
>>   + /var/llvm/local-amd64-debug-stage2/tools/clang/stage2-bins/bin/FileCheck -check-prefix=CHECK-ORDERFILE-INSTR-LTO /vol/llvm/src/llvm-project/local/clang/test/Driver/clang_f_opts.c
>>
>> - for `lto.c`, it's similar:
>>
>>   + : 'RUN: at line 19'
>>   + /var/llvm/local-amd64-debug-stage2/tools/clang/stage2-bins/bin/clang /vol/llvm/src/llvm-project/local/clang/test/Driver/lto.c -flto -save-temps -###
>>   ro at niers 79 > /var/llvm/local-amd64-debug-stage2/tools/clang/stage2-bins/bin/clan
>>
>> Manually re-running `clang` gives
>>
>>   clang: error: 'amd64-pc-solaris2.11': unable to pass LLVM bit-code files to linker
>>
>> in both cases.
>
> Probably because we're not specifying the `--target=` I'll add that in my fix for AMDGPU I'm working on and see if it solves the problem.

Thank you for fixing these tests. I agree that clang_f_opts.c:117 with `-flto` needs a `--target=`, to not cause this error on `amd64-pc-solaris2.11'`.
This should be the only line. I unfortunately did not catch this because I do not have access to a target using `HasNativeLLVMSupport` == false`.

For the AMDGPU tests, I do not have local ROCm, so I am unable to catch the issues. I have managed to fix many others before relanding this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156363



More information about the cfe-commits mailing list