[PATCH] D23654: [CMake] Rename back SIMPLE_SOURCE to compile as C++
Jonas Hahnfeld via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 10:29:45 PDT 2016
Hahnfeld added a comment.
In https://reviews.llvm.org/D23654#519654, @compnerd wrote:
> Sorry, forgot to respond to @beanz' question of how does it fail. When building for ARM:
>
> error: undefined reference to '__aeabi_unwind_cpp_pr0'
>
>
> This is provided by libunwind. There are a few different providers for the personality routine, but that requires that you build those, which depend on the builtins, so we can't really guarantee that it exists (bootstrapping).
If you only need the builtins, you can directly configure `lib/builtins`. There is also support for that when checking out `compiler-rt` into `runtimes/` in the LLVM root directory.
> From your description, it sounds like you want to ensure that the C++ compiler is valid? Why not add a secondary test that does a *compile only* test for C++ support without depending on C++ headers? Something like a class definition should be sufficient for that.
Yes, a valid C++ compiler is definitely needed for the sanitizers. And the renamed test only relies on C header files, so I don't really see how you would be able to compile the sanitizers if this simple test isn't doable for your compiler.
> Alternatively, we could try `-fno-exceptions -fno-unwind-tables` as part of the compile options for the test target.
If the sanitizers are fine with that, it's worth trying...
https://reviews.llvm.org/D23654
More information about the llvm-commits
mailing list