Skip to content

Commit a3a80fe

Browse files
authored
Fixed relative paths for Flang out-of-tree builder. (#170)
After llvm/llvm-project#87822 we can specify real relative paths from the flang build directory to the directories containing LLVM/CLANG/etc. projects' config files.
1 parent 3aab1db commit a3a80fe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

zorg/buildbot/builders/FlangBuilder.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,12 @@ def getFlangOutOfTreeBuildFactory(
4444
mlir_dir = "{}/lib/cmake/mlir".format(f.obj_dir)
4545
clang_dir = "{}/lib/cmake/clang".format(f.obj_dir)
4646
CmakeCommand.applyRequiredOptions(flang_cmake_args, [
47-
# We actually need the paths to be relative to the source directory,
48-
# otherwise find_package can't locate the config files.
4947
('-DLLVM_DIR:PATH=',
50-
LLVMBuildFactory.pathRelativeTo(llvm_dir, flang_src_dir)),
48+
LLVMBuildFactory.pathRelativeTo(llvm_dir, flang_obj_dir)),
5149
('-DMLIR_DIR:PATH=',
52-
LLVMBuildFactory.pathRelativeTo(mlir_dir, flang_src_dir)),
50+
LLVMBuildFactory.pathRelativeTo(mlir_dir, flang_obj_dir)),
5351
('-DCLANG_DIR:PATH=',
54-
LLVMBuildFactory.pathRelativeTo(clang_dir, flang_src_dir)),
52+
LLVMBuildFactory.pathRelativeTo(clang_dir, flang_obj_dir)),
5553
])
5654

5755
# We can't use addCmakeSteps as that would use the path in f.llvm_srcdir.

0 commit comments

Comments
 (0)