[flang-commits] [flang] [flang][docs] Update llvm-test-suite docs (PR #81596)

David Spickett via flang-commits flang-commits at lists.llvm.org
Tue Feb 13 03:36:24 PST 2024


https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/81596

With some missing config options and the need to install, which I always forget.

>From 72db0680da5b1c7c8e95523e8d3b248a444fd27f Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 13 Feb 2024 11:32:59 +0000
Subject: [PATCH] [flang][docs] Update llvm-test-suite docs

With some missing config options and the need to install,
which I always forget.
---
 flang/docs/FortranLLVMTestSuite.md | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/flang/docs/FortranLLVMTestSuite.md b/flang/docs/FortranLLVMTestSuite.md
index 45485ef40106f..1075b39f614a1 100644
--- a/flang/docs/FortranLLVMTestSuite.md
+++ b/flang/docs/FortranLLVMTestSuite.md
@@ -21,7 +21,9 @@ cmake -G "Ninja" -DCMAKE_C_COMPILER=<path to C compiler> \
     -DCMAKE_Fortran_COMPILER=<path to Fortran compiler> \
     -DTEST_SUITE_COLLECT_CODE_SIZE:STRING=OFF \
     -DTEST_SUITE_SUBDIRS:STRING="Fortran" \
-    -DTEST_SUITE_FORTRAN:STRING=ON ..
+    -DTEST_SUITE_FORTRAN:STRING=ON \
+    -DTEST_SUITE_LIT=<path to llvm-lit> \
+    <path to llvm-test-suite>
 ```
 
 This will configure the test-suite to run only the Fortran tests which
@@ -33,6 +35,19 @@ If your Fortran compiler is Flang, you may want to set the `NO_STOP_MESSAGE`
 environment variable to `1` in order to avoid test failures due to warnings
 about INEXACT signaling exceptions.
 
+In addition, flang must be installed to some location (`ninja install`). Otherwise
+you will get this error when configuring:
+```
+CMake Error at Fortran/gfortran/CMakeLists.txt:649 (find_file):
+  Could not find ISO_FORTRAN_C_HEADER using the following files:
+  ISO_Fortran_binding.h
+```
+
+Then to build and run the tests:
+```
+ninja
+ninja check
+```
 
 ## Running the SPEC CPU 2017
 



More information about the flang-commits mailing list