[llvm] [libc][bazel] Add bazel targets for libc/include/... tests. (PR #141150)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 27 11:33:08 PDT 2025


================
@@ -71,6 +71,7 @@ libc_test_library(
         "//libc:llvm_libc_macros_stdfix_macros",
         "//llvm:Support",
     ],
+    alwayslink = True,
----------------
jtstogel wrote:

It'll fail to link with `duplicate symbol: main`. In the case that a test has it's own `main()`, I figured it's least surprising to be explicit about which `main()` a program is using rather than falling back to the unit test framework's `main()` if there's e.g. a typo somewhere in the test or the test's `main()` is namespaced or something.

Happy to revert if you think it's unnecessary or there's another reason to avoid it!

https://github.com/llvm/llvm-project/pull/141150


More information about the llvm-commits mailing list