llvm-project/llvm/test/tools/llvm-libtool-darwin
Keith Smiley 4c12a75e69 [llvm-libtool-darwin] Add -warnings_as_errors
libtool can currently produce 2 warnings:

1. No symbols were in the object file
2. An object file with the same basename was specified multiple times

The first warning here is often harmless and may just mean you have some
translation units with no symbols for the target you're building for.
The second warning can lead to real issues like those mentioned in
https://reviews.llvm.org/D113130 where ODR violations can slip in.

This introduces a new -warnings_as_errors flag that can be used by build
systems that want to verify they never hit these warnings. For example
with bazel the libtool caller first uniques names to make sure the
duplicate base name case is not possible, but if that doesn't work as
expected, having it fail would be preferred.

It's also worth noting that llvm-libtool-darwin works around an issue
that cctools libtool experiences related to debug info and duplicate
basenames, the workaround is described here:
30baa5d2a4/llvm/lib/Object/ArchiveWriter.cpp (L424-L465)
And it avoids this bug:
f0cbbb1c37/DuplicateBasenameIssue

Differential Revision: https://reviews.llvm.org/D118931
2022-02-07 14:39:21 -08:00
..
Inputs [llvm-libtool-darwin] Fix crash with bitcode asm module 2022-02-04 10:54:27 -08:00
L-and-l.test Reapply "[llvm-libtool-darwin] Print a warning if object file names are repeated" 2022-01-28 10:19:33 -08:00
archive-flattening.test Reapply "[llvm-libtool-darwin] Print a warning if object file names are repeated" 2022-01-28 10:19:33 -08:00
arm64-asm.test [llvm-libtool-darwin] Fix crash with bitcode asm module 2022-02-04 10:54:27 -08:00
cpu-subtype-matching.test
create-static-lib.test [llvm-libtool-darwin] Add -warnings_as_errors 2022-02-07 14:39:21 -08:00
deterministic-library.test
filelist.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
help-message.test
invalid-input-output-args.test [test] Use host platform specific error message substitution in lit tests 2021-01-29 07:16:30 -05:00
missing-library-type.test
no-symbols-warning.test [llvm-libtool-darwin] Add -warnings_as_errors 2022-02-07 14:39:21 -08:00
universal-bitcode-flattening.test
universal-bitcode-output.test
universal-object-flattening.test
universal-object-output.test
version.test
x86_64-asm.test [llvm-libtool-darwin] Fix crash with bitcode asm module 2022-02-04 10:54:27 -08:00