[flang] Check there's no dependency on C++ libs
authorDiana Picus <diana.picus@linaro.org>
Mon, 14 Jun 2021 13:25:16 +0000 (13:25 +0000)
committerDiana Picus <diana.picus@linaro.org>
Wed, 16 Jun 2021 08:23:43 +0000 (08:23 +0000)
commit7ddbf2633911a5c378ad6af01e250f6f252b9032
treefcade7e3b92e5ccba01a33745f92f479d6c910a0
parent37109974af4b33189a599735afa67ed57c27b8ab
[flang] Check there's no dependency on C++ libs

Add a test to make sure the flang runtime doesn't pull in the C++
runtime libraries.

This is achieved by adding a C file that calls some functions from the
runtime (currently only CpuTime, but we should probably add anything
complicated enough, e.g. IO-related things). We force the C compiler to
use -std=c90 to make sure it's really in C mode (we don't really care
which version of the standard, this one is probably more widely
available). We only enable this test if CMAKE_C_COMPILER is set to
something (which is probably always true in practice).

Differential Revision: https://reviews.llvm.org/D104290
flang/test/Runtime/no-cpp-dep.c [new file with mode: 0644]
flang/test/lit.cfg.py
flang/test/lit.site.cfg.py.in