Skip to content

Commit 0cef883

Browse files
committed
Use flang_intrinsic_modules_dir instead of flang_source_dir for the include path
1 parent 2449ff8 commit 0cef883

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

flang/test/Integration/iso-fortran-binding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: clang
22
// UNSUPPORTED: system-windows
33
// RUN: rm -rf %t && mkdir %t
4-
// RUN: %clangxx %isysroot -I %include/flang %s -o %t/a.out
4+
// RUN: %clangxx %isysroot -I%flang_include %s -o %t/a.out
55
// RUN: %t/a.out | FileCheck %s
66

77
extern "C" {

flang/test/lit.cfg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,8 @@
174174

175175
llvm_config.use_clang(required=False)
176176

177-
# Include path for C headers that define Flang's Fortran ABI.
178-
config.substitutions.append(
179-
("%include", os.path.join(config.flang_source_dir, "include"))
180-
)
177+
# Clang may need the include path for ISO_fortran_binding.h.
178+
config.substitutions.append(("%flang_include", config.flang_intrinsic_modules_dir))
181179

182180
# Enable libpgmath testing
183181
result = lit_config.params.get("LIBPGMATH")

flang/test/lit.site.cfg.py.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ config.target_triple = "@LLVM_TARGET_TRIPLE@"
1111
config.llvm_target_triple_env = "@LLVM_TARGET_TRIPLE_ENV@"
1212
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
1313
config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@"
14-
config.flang_source_dir = "@FLANG_SOURCE_DIR@"
1514
config.flang_obj_root = "@FLANG_BINARY_DIR@"
1615
config.flang_tools_dir = lit_config.substitute("@FLANG_TOOLS_DIR@")
1716
config.flang_intrinsic_modules_dir = "@FLANG_INTRINSIC_MODULES_DIR@"

0 commit comments

Comments
 (0)