[lld] r263070 - [lto] Add saving the LTO .o file to -save-temps.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 4 18:07:55 PDT 2016


Thanks for your review, Sean. I'll commit without the cp, and take a
look at the bots to ensure the non-determinism is gone.
Feel free to shout at me in case this doesn't fix and I'll take another look.

On Sat, Jun 4, 2016 at 6:05 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>
> On Sat, Jun 4, 2016 at 6:03 PM, Sean Silva <chisophugis at gmail.com> wrote:
>>
>>
>>
>> On Sat, Jun 4, 2016 at 5:53 PM, Davide Italiano <davide at freebsd.org>
>> wrote:
>>>
>>> On Sat, Jun 4, 2016 at 5:33 PM, Davide Italiano <davide at freebsd.org>
>>> wrote:
>>> > On Sat, Jun 4, 2016 at 5:18 PM, Sean Silva via llvm-commits
>>> > <llvm-commits at lists.llvm.org> wrote:
>>> >>
>>> >>
>>> >> On Sat, Jun 4, 2016 at 4:52 PM, Rafael EspĂ­ndola
>>> >> <rafael.espindola at gmail.com> wrote:
>>> >>>
>>> >>> I think this test needs to create a temporary directory and cd into
>>> >>> it:
>>> >>>
>>> >>> llvm-nm a.out | FileCheck %s
>>> >>>
>>> >>> this could be using a a.out from some other test if the scheduling is
>>> >>> just right.
>>> >>
>>> >>
>>> >> Good catch. I was staring at my original test case in this patch which
>>> >> had
>>> >> explicit `-o`..
>>> >>
>>> >> It looks like this issue was likely introduced in
>>> >>
>>> >> http://llvm.org/klaus/lld/commit/e60c3351266e56d91bfd60f34d36edbbb3a1c5e1/
>>> >>
>>>
>>> Index: test/ELF/lto/save-temps.ll
>>> ===================================================================
>>> --- test/ELF/lto/save-temps.ll (revision 271819)
>>> +++ test/ELF/lto/save-temps.ll (working copy)
>>> @@ -1,7 +1,9 @@
>>>  ; REQUIRES: x86
>>> -; RUN: rm -f a.out a.out.lto.bc a.out.lto.o
>>> +; RUN: cd %T
>>> +; RUN: rm -f %t.ll a.out a.out.lto.bc a.out.lto.o
>>> +; RUN: cp %p/Inputs/save-temps.ll %t.ll
>>>  ; RUN: llvm-as %s -o %t.o
>>> -; RUN: llvm-as %p/Inputs/save-temps.ll -o %t2.o
>>> +; RUN: llvm-as %t.ll -o %t2.o
>>>  ; RUN: ld.lld -shared -m elf_x86_64 %t.o %t2.o -save-temps
>>>  ; RUN: llvm-nm a.out | FileCheck %s
>>>  ; RUN: llvm-nm a.out.lto.bc | FileCheck %s
>>>
>>> Something like this?
>>
>>
>> Makes sense. Do you need to copy `%p/Inputs/save-temps.ll`? I think that
>> should expand to an absolute path and still be correct even after you change
>> directory.
>
>
> Sorry, that may have been a bit ambiguous. Basically "LGTM, but I don't
> think you should need to copy `%p/Inputs/save-temps.ll`".
>
> -- Sean Silva
>
>>
>> -- Sean Silva
>>
>>>
>>> --
>>> Davide
>>>
>>> "There are no solved problems; there are only problems that are more
>>> or less solved" -- Henri Poincare
>>
>>
>



-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list