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

Joseph Huber via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 1 12:18:04 PDT 2024


================
@@ -0,0 +1,29 @@
+lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
+
+config.substitutions.append(('%{flags}',
+  f'--target={config.target_triple} -Wno-multi-gpu -flto -mcpu=native'))
+config.substitutions.append(('%{compile_flags}',
+    '-nogpulib -fno-builtin-printf -nogpuinc -nostdlibinc '
+    '-I %{include-dir} -I %{target-include-dir}/../../ '
+    '-I %{target-include-dir} -I %{libcxx-dir}/test/support'
+))
+config.substitutions.append(('%{link_flags}',
+  '-O1 -nostdinc++ -nostdlib++ %{lib-dir}/crt1.o '
----------------
jhuber6 wrote:

None of these options pass `-O1` currently, `-Os` is `O2` with a few differences.

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


More information about the libcxx-commits mailing list