llvm-project/flang/test/Integration/iso-fortran-binding.cpp
parabola94 cc58ca5370
[flang/flang-rt] Add -isysroot flag only to tests really requiring (#152914)
-isysroot flag was added to all tests, but it makes
Driver/darwin-version.f90 failed.

In fact, only a few tests regarding interoperability with C need
-isysroot flag to search for headers and libraries. So, -isysroot flag
is now eliminated from the substitution `%flang`, and a new substitution
`%isysroot` has been introduced.

Moreover, Integration/iso-fortran-binding.cpp invokes clang++ via a
shell script, which makes it hard to add -isysroot flag. So, it is
refactored.

Fixes #150765
2025-08-13 21:43:53 +00:00

18 lines
309 B
C++

// REQUIRES: clang
// UNSUPPORTED: system-windows
// RUN: rm -rf %t && mkdir %t
// RUN: %clangxx %isysroot -I%flang_include %s -o %t/a.out
// RUN: %t/a.out | FileCheck %s
extern "C" {
#include "ISO_Fortran_binding.h"
}
#include <iostream>
int main() {
std::cout << "PASS\n";
return 0;
}
// CHECK: PASS