[libcxx-commits] [libcxx] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 20 17:36:26 PDT 2023
================
@@ -45,10 +45,10 @@ config.substitutions.append(('%{flags}',
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
))
config.substitutions.append(('%{compile_flags}',
- '-nostdinc++ -I %{include} -I %{libcxx}/test/support'
+ '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{libcxx}/test/support'
----------------
ldionne wrote:
My thinking here was that `CMAKE_CXX_FLAGS_INIT` are kind of like flags specified in a toolchain file -- they represent flags that literally any program compiled for target X needs to be passed. In that sense, they would be required for both the library and the test suite.
For instance, @arichardson don't you need to pass `-mabi=` or `-march=` to both the library and the test suite? I am still thinking that the proper way to actually do this would be to create `.cfg.in` config files that pass the target flags you need. Or if you need to specify various values for e.g. `-mabi`, you can create a Lit parameter that is local to that configuration like we do in `libcxx/test/configs/apple-libc++-backdeployment.cfg.in`. It feels like I've suggested that in the past though, so maybe there's a reason why you didn't go down that road?
https://github.com/llvm/llvm-project/pull/67201
More information about the libcxx-commits
mailing list