[libcxx-commits] [libcxx] [libcxx] Add testing configuration for GPU targets (PR #104515)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 11 09:24:07 PDT 2024


================
@@ -30,3 +30,7 @@ config.substitutions.append(('%{target-include-dir}', '@LIBCXX_TESTING_INSTALL_P
 config.substitutions.append(('%{lib-dir}', '@LIBCXX_TESTING_INSTALL_PREFIX@/@LIBCXX_INSTALL_LIBRARY_DIR@'))
 config.substitutions.append(('%{module-dir}', '@LIBCXX_TESTING_INSTALL_PREFIX@/@LIBCXX_INSTALL_MODULES_DIR@'))
 config.substitutions.append(('%{test-tools-dir}', '@LIBCXX_TEST_TOOLS_PATH@'))
+
+# Available if building libc++ on top of llvm-libc.
+config.substitutions.append(('%{libc-dir}', '@LIBCXX_LIBC_LIBRARY_DIR@'))
+config.substitutions.append(('%{libc-include-dir}', '@LIBCXX_LIBC_INCLUDE_DIR@'))
----------------
ldionne wrote:

We want to keep the `cmake-bridge` as lean as possible, and adding "optional" substitutions like this goes against that principle.

It seems like a smell that you need to pass `%{libc-dir}/crt1.o -lc -lm` explicitly when linking: why do you need that? You didn't pass `-nostdlib` so I would expect Clang to use the default stdlib on the system. It looks like the underlying problem is really that your compiler is not configured properly to use the just-built llvm-libc and you're working around that in the libc++ testing configuration.

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


More information about the libcxx-commits mailing list