[all-commits] [llvm/llvm-project] 0ad051: [flang] Check there's no dependency on C++ libs. NFC

Diana via All-commits all-commits at lists.llvm.org
Wed Jun 16 04:39:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ad051b5fc22b4e7334635b2bdc54eca8ee7c4c4
      https://github.com/llvm/llvm-project/commit/0ad051b5fc22b4e7334635b2bdc54eca8ee7c4c4
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2021-06-16 (Wed, 16 Jun 2021)

  Changed paths:
    A flang/test/Runtime/no-cpp-dep.c
    M flang/test/lit.cfg.py
    M flang/test/lit.site.cfg.py.in

  Log Message:
  -----------
  [flang] Check there's no dependency on C++ libs. NFC

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).

This is a recommit of 7ddbf26, with 2 fixes:
* Replace C++ comments with C comments
* Only enable the test if libFortranRuntime.a exists (this might not be
the case if e.g. BUILD_SHARED_LIBS=On)

Differential Revision: https://reviews.llvm.org/D104290




More information about the All-commits mailing list