[lld] r300616 - [coff] fix test for msvclto

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 14:48:13 PDT 2017


Thanks! r301693.

On Fri, Apr 28, 2017 at 2:05 PM, Rui Ueyama <ruiu at google.com> wrote:
> That should be the correct fix. Please do this for ELF/Error.cpp too.
>
> On Fri, Apr 28, 2017 at 2:01 PM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> Oh, the test is actually invoking ms's link.exe which gets in the way.
>>
>> This fixes it. Rui: does this make sense, or is log() performance
>> sensitive so we don't want to flush each time?
>>
>> iff --git a/COFF/Error.cpp b/COFF/Error.cpp
>> index b2c7c89..166b197 100644
>> --- a/COFF/Error.cpp
>> +++ b/COFF/Error.cpp
>> @@ -59,6 +59,7 @@ void log(const Twine &Msg) {
>>    if (Config->Verbose) {
>>      std::lock_guard<std::mutex> Lock(Mu);
>>      outs() << Argv0 << ": " << Msg << "\n";
>> +    outs().flush();
>>    }
>>  }
>>
>> On Fri, Apr 28, 2017 at 1:38 PM, Hans Wennborg <hans at chromium.org> wrote:
>> > I don't normally run the lld tests on Windows, but I figured I should
>> > make a start.
>> >
>> > This test fails for me because it doesn't find "/verbose" in the
>> > output, which looks like this:
>> >
>> > C:/src/llvm/build.release/./bin\lld-link.EXE: Reading
>> > c:\src\llvm\build.release\tools\lld\test\coff\output\msvclto.ll.tmp.obj
>> > C:/src/llvm/build.release/./bin\lld-link.EXE: Reading
>> >
>> > c:\src\llvm\build.release\tools\lld\test\coff\output\msvclto.ll.tmp.dir/bitcode.obj
>> > C:/src/llvm/build.release/./bin\lld-link.EXE: link.exe /nologo
>> >
>> > C:\src\llvm\build.release\tools\lld\test\COFF\Output\msvclto.ll.tmp.dir/bitcode.obj
>> >
>> > /out:C:\src\llvm\build.release\tools\lld\test\COFF\Output\msvclto.ll.tmp.exe
>> > /opt:icf /entry:main
>> > /ve
>> > Starting pass 1
>> >
>> > Searching libraries
>> >
>> > Finished searching libraries
>> >
>> > Finished pass 1
>> >
>> > Starting pass 2
>> >      lld-lto-540789.obj
>> >      bitcode.obj
>> > Finished pass 2
>> > rbose
>> > c:\src\temp\lit_tmp_6bloe9\lld-lto-540789.obj
>> >
>> >
>> > Amusingly, it looks like /verbose itself is racing with the code that
>> > prints "/verbose"? :-)
>> >
>> > On Tue, Apr 18, 2017 at 3:29 PM, Bob Haarman via llvm-commits
>> > <llvm-commits at lists.llvm.org> wrote:
>> >> Author: inglorion
>> >> Date: Tue Apr 18 17:29:36 2017
>> >> New Revision: 300616
>> >>
>> >> URL: http://llvm.org/viewvc/llvm-project?rev=300616&view=rev
>> >> Log:
>> >> [coff] fix test for msvclto
>> >>
>> >> Modified:
>> >>     lld/trunk/test/COFF/msvclto.ll
>> >>
>> >> Modified: lld/trunk/test/COFF/msvclto.ll
>> >> URL:
>> >> http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/msvclto.ll?rev=300616&r1=300615&r2=300616&view=diff
>> >>
>> >> ==============================================================================
>> >> --- lld/trunk/test/COFF/msvclto.ll (original)
>> >> +++ lld/trunk/test/COFF/msvclto.ll Tue Apr 18 17:29:36 2017
>> >> @@ -5,7 +5,8 @@
>> >>  ; RUN:   /entry:main /verbose > %t.log || true
>> >>  ; RUN: FileCheck %s < %t.log
>> >>
>> >> -; CHECK: /opt:icf /entry:main /verbose
>> >> +; CHECK: /opt:icf /entry:main
>> >> +; CHECK: /verbose
>> >>
>> >>  target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
>> >>  target triple = "x86_64-pc-windows-msvc"
>> >>
>> >>
>> >> _______________________________________________
>> >> llvm-commits mailing list
>> >> llvm-commits at lists.llvm.org
>> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>


More information about the llvm-commits mailing list