[libcxx-commits] [libcxx] [libcxx] Add testing configuration for GPU targets (PR #104515)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 1 10:22:21 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 '
----------------
ldionne wrote:
```suggestion
'-nostdlib++ %{lib-dir}/crt1.o '
```
`-nostdinc++` should be part of `compile_flags`, not `link_flags`.
`-O1` is controlled by a Lit parameter (`optimization=none|speed|size`), and shouldn't be hardcoded.
https://github.com/llvm/llvm-project/pull/104515
More information about the libcxx-commits
mailing list