New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 861743 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

lld error output on linux is hard to read

Project Member Reported by thakis@chromium.org, Jul 9

Issue description

(lifted from bug 829795 comment 0:)

I find lld error output hard to read somehow.

1. Why does lld prefix errors with its path? If it must do that (clang doesn't; and the build system usually prints what step failed), maybe just the basename is enough. With that:

error: undefined symbol: gpu::gles2::ClientServiceMap<unsigned long, unsigned long>::kMaxFlatArraySize
>>> referenced by client_service_map_unittest.cc:159 (../../gpu/command_buffer/service/client_service_map_unittest.cc:159)
>>>               obj/gpu/gpu_unittests/client_service_map_unittest.o:(gpu::gles2::ClientServiceMap_ForEach_Test::TestBody())



2.Why print ">>>" instead of just whitespace?

error: undefined symbol: gpu::gles2::ClientServiceMap<unsigned long, unsigned long>::kMaxFlatArraySize
    referenced by client_service_map_unittest.cc:159 (../../gpu/command_buffer/service/client_service_map_unittest.cc:159)
                  obj/gpu/gpu_unittests/client_service_map_unittest.o:(gpu::gles2::ClientServiceMap_ForEach_Test::TestBody())



3. Also, it might be nice to not print "error: hi.obj: undefined symbol:" for each undefined symbol, but instead do:

error: undefined symbols:
  gpu::gles2::ClientServiceMap<unsigned long, unsigned long>::kMaxFlatArraySize, referenced by
      client_service_map_unittest.cc:159 (../../gpu/command_buffer/service/client_service_map_unittest.cc:159)
      obj/gpu/gpu_unittests/client_service_map_unittest.o:(gpu::gles2::ClientServiceMap_ForEach_Test::TestBody())
  next undefined symbol if there's more than one



I'd find each of these steps a big improvement in lld output readability.


Also, it looks like lld-link doesn't print the "referenced by" bit (?)
 
(Today's error triggering this: https://logs.chromium.org/v/?s=chromium%2Fbuildbucket%2Fcr-buildbucket.appspot.com%2F8941473038426287648%2F%2B%2Fsteps%2Fcompile__with_patch_%2F0%2Fstdout

/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: KeyStorageLinux::GetKey()
>>> referenced by bind_internal.h:794 (../../base/bind_internal.h:794)
>>>               obj/components/os_crypt/unit_tests/key_storage_linux_unittest.o:(KeyStorageLinuxTest_SkipPostingToSameTaskRunner_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: KeyStorageLinux::GetKey()
>>> referenced by key_storage_linux_unittest.cc:56 (../../components/os_crypt/key_storage_linux_unittest.cc:56)
>>>               obj/components/os_crypt/unit_tests/key_storage_linux_unittest.o:(KeyStorageLinuxTest_IgnoreTaskRunnerIfNull_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:37 (../../components/os_crypt/key_storage_util_linux_unittest.cc:37)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_FirstTimeDefaultsToTrue_Test::TestBody())


(etc)
Cc: ruiu@google.com p...@chromium.org
Any opposition to doing step 1 (don't print lld's path in diags)?

Comment 3 Deleted

Comment 4 Deleted

Comment 5 Deleted

Delete comment ⚐
Current output:

/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: KeyStorageLinux::GetKey()
>>> referenced by bind_internal.h:794 (../../base/bind_internal.h:794)
>>>               obj/components/os_crypt/unit_tests/key_storage_linux_unittest.o:(KeyStorageLinuxTest_SkipPostingToSameTaskRunner_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: KeyStorageLinux::GetKey()
>>> referenced by key_storage_linux_unittest.cc:56 (../../components/os_crypt/key_storage_linux_unittest.cc:56)
>>>               obj/components/os_crypt/unit_tests/key_storage_linux_unittest.o:(KeyStorageLinuxTest_IgnoreTaskRunnerIfNull_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:37 (../../components/os_crypt/key_storage_util_linux_unittest.cc:37)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_FirstTimeDefaultsToTrue_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::WriteBackendUse(base::FilePath const&, bool)
>>> referenced by key_storage_util_linux_unittest.cc:41 (../../components/os_crypt/key_storage_util_linux_unittest.cc:41)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToTrue_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:42 (../../components/os_crypt/key_storage_util_linux_unittest.cc:42)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToTrue_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::WriteBackendUse(base::FilePath const&, bool)
>>> referenced by key_storage_util_linux_unittest.cc:46 (../../components/os_crypt/key_storage_util_linux_unittest.cc:46)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToFalse_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:47 (../../components/os_crypt/key_storage_util_linux_unittest.cc:47)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToFalse_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::WriteBackendUse(base::FilePath const&, bool)
>>> referenced by key_storage_util_linux_unittest.cc:51 (../../components/os_crypt/key_storage_util_linux_unittest.cc:51)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:52 (../../components/os_crypt/key_storage_util_linux_unittest.cc:52)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::WriteBackendUse(base::FilePath const&, bool)
>>> referenced by key_storage_util_linux_unittest.cc:54 (../../components/os_crypt/key_storage_util_linux_unittest.cc:54)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:55 (../../components/os_crypt/key_storage_util_linux_unittest.cc:55)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::WriteBackendUse(base::FilePath const&, bool)
>>> referenced by key_storage_util_linux_unittest.cc:57 (../../components/os_crypt/key_storage_util_linux_unittest.cc:57)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
>>> referenced by key_storage_util_linux_unittest.cc:58 (../../components/os_crypt/key_storage_util_linux_unittest.cc:58)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:77 (../../components/os_crypt/key_storage_util_linux_unittest.cc:77)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_PasswordStoreFlagOverrides_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:82 (../../components/os_crypt/key_storage_util_linux_unittest.cc:82)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_PasswordStoreFlagOverrides_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:87 (../../components/os_crypt/key_storage_util_linux_unittest.cc:87)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_PasswordStoreFlagOverrides_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:95 (../../components/os_crypt/key_storage_util_linux_unittest.cc:95)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:99 (../../components/os_crypt/key_storage_util_linux_unittest.cc:99)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:103 (../../components/os_crypt/key_storage_util_linux_unittest.cc:103)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())
/b/swarming/w/ir/cache/builder/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin/ld.lld: error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
>>> referenced by key_storage_util_linux_unittest.cc:107 (../../components/os_crypt/key_storage_util_linux_unittest.cc:107)
>>>               obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())


Output with all suggestions applied:

error: undefined symbol: KeyStorageLinux::GetKey()
    referenced by bind_internal.h:794 (../../base/bind_internal.h:794)
                  obj/components/os_crypt/unit_tests/key_storage_linux_unittest.o:(KeyStorageLinuxTest_SkipPostingToSameTaskRunner_Test::TestBody())
    referenced by key_storage_linux_unittest.cc:56 (../../components/os_crypt/key_storage_linux_unittest.cc:56)
                  obj/components/os_crypt/unit_tests/key_storage_linux_unittest.o:(KeyStorageLinuxTest_IgnoreTaskRunnerIfNull_Test::TestBody())
error: undefined symbol: os_crypt::GetBackendUse(base::FilePath const&)
    referenced by key_storage_util_linux_unittest.cc:37 (../../components/os_crypt/key_storage_util_linux_unittest.cc:37)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_FirstTimeDefaultsToTrue_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:42 (../../components/os_crypt/key_storage_util_linux_unittest.cc:42)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToTrue_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:47 (../../components/os_crypt/key_storage_util_linux_unittest.cc:47)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToFalse_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:52 (../../components/os_crypt/key_storage_util_linux_unittest.cc:52)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:55 (../../components/os_crypt/key_storage_util_linux_unittest.cc:55)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:58 (../../components/os_crypt/key_storage_util_linux_unittest.cc:58)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
error: undefined symbol: os_crypt::WriteBackendUse(base::FilePath const&, bool)
    referenced by key_storage_util_linux_unittest.cc:41 (../../components/os_crypt/key_storage_util_linux_unittest.cc:41)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToTrue_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:46 (../../components/os_crypt/key_storage_util_linux_unittest.cc:46)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_SetToFalse_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:51 (../../components/os_crypt/key_storage_util_linux_unittest.cc:51)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:54 (../../components/os_crypt/key_storage_util_linux_unittest.cc:54)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:57 (../../components/os_crypt/key_storage_util_linux_unittest.cc:57)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxPreferenceTest_MultipleWrites_Test::TestBody())
error: undefined symbol: os_crypt::SelectBackend(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, base::nix::DesktopEnvironment)
    referenced by key_storage_util_linux_unittest.cc:77 (../../components/os_crypt/key_storage_util_linux_unittest.cc:77)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_PasswordStoreFlagOverrides_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:82 (../../components/os_crypt/key_storage_util_linux_unittest.cc:82)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_PasswordStoreFlagOverrides_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:87 (../../components/os_crypt/key_storage_util_linux_unittest.cc:87)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_PasswordStoreFlagOverrides_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:95 (../../components/os_crypt/key_storage_util_linux_unittest.cc:95)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:99 (../../components/os_crypt/key_storage_util_linux_unittest.cc:99)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:103 (../../components/os_crypt/key_storage_util_linux_unittest.cc:103)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())
    referenced by key_storage_util_linux_unittest.cc:107 (../../components/os_crypt/key_storage_util_linux_unittest.cc:107)
                  obj/components/os_crypt/unit_tests/key_storage_util_linux_unittest.o:((anonymous namespace)::KeyStorageUtilLinuxTest_IgnoreBackends_Test::TestBody())



(6.2 kB output instead of 10.1 kB)
Labels: -OS-Mac
CL to omit the path: https://reviews.llvm.org/D49189
To me marking continuation lines explicitly with ">>>" feels more readable than just whitespace, in particular when long error messages are line-wrapped.

Showing undefined symbols all at once is an interesting idea. One thing is that we have a feature to terminate the linker when it sees too many errors (by default 20 errors). I don't have a clear idea how we can aggregate error messages while keeping it in sync with the error limiting feature though.

I think one of the reason why the buildbot logs is hard to read is the lack of colors. Any reason to not enable colored output? We can convert ANSI escape sequences to HTML color tags.
I don't know how the output works, but I'm guessing the part producing the output doesn't know it writes html.

(Also it's a bit difficult for other technical reasons: ninja strips ansi escape codes from subprocesses if it's not writing to a tty so that'd also require running the build in a pty.)

(I suppose we could let the tools themselves write html instead of ansi, but that seems worse in a way.)


By similar reasoning terminals should indicate line continuations (or the first "real" line after a newline following a wrapped line) somehow so that programs don't need to inject noise in their output in case a terminal wraps the output :-)
Isn't there any way to tell ninja that we want ANSI color-escaped output? I believe allowing colored output makes the error message much easier to read.
There isn't. We could maybe make it work, but making the output more readable in the first place seems better (and in this case sufficient) than adding markup to try and work around it not being very readable.

Also, I find it difficult to read not only on bots but also in my daily work, and in my terminal I do have highlighting (I made that work in  bug 841221 ).
Honestly I don't think that the current lld's error message format is hard to read, and the lack of color it hard to read to me, perhaps because I designed the error message format.

That said, before implementing it, I discussed how error messages should look like in the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2017-March/111459.html

So if you want to change the format, perhaps you should bring it to the mailing list to get feedbacks from broader audiences? I'm happy to adopt an error message format which the majority thinks easy to read.
r337634 made it so that only the basename gets printed, addressing the first point. I'll see if I can find a patch for 3 that fits with the error limiting.

Comment 15 Deleted

r340482 made multiline diagnostics (such as "undefined symbol") separated by only one blank line instead of accidentally two in lld-link.

Hey, lld-link already does suggestion 3, only ld.lld doesn't:

Nicos-MacBook-Pro:llvm-build-goma thakis$ cat foo.cc
void f();
void g() { f(); }
int main() { f(); g(); }
Nicos-MacBook-Pro:llvm-build-goma thakis$ bin/clang --target=x86_64-linux-gnu -nostdlib -fuse-ld=lld foo.cc
ld.lld: error: undefined symbol: f()
>>> referenced by foo.cc
>>>               /var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/foo-bafbec.o:(g())

ld.lld: error: undefined symbol: f()
>>> referenced by foo.cc
>>>               /var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/foo-bafbec.o:(main)
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
Nicos-MacBook-Pro:llvm-build-goma thakis$ bin/clang-cl -fuse-ld=lld foo.cc /link /nodefaultlib 
lld-link: error: <root>: undefined symbol: _mainCRTStartup
lld-link: error: undefined symbol: "void __cdecl f(void)" (?f@@YAXXZ)
>>> referenced by /var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/foo-c99f4b.obj:("void __cdecl g(void)" (?g@@YAXXZ))
>>> referenced by /var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/foo-c99f4b.obj:(_main)
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)

Sign in to add a comment