Skip to content

Commit 460deb6

Browse files
[build] fix local llvm build when .llvm-project/build doesn't exist (#7680)
The previous command (`$(realdir .llvm-project/build)`) works only if .llvm-project/build already exists. The new command will get the absolute path of the directory in which the Makefile exists, and then append `.llvm-project/build`.
1 parent 83a1f00 commit 460deb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PYTHON ?= python
66
BUILD_DIR := $(shell cd python; $(PYTHON) -c 'from build_helpers import get_cmake_dir; print(get_cmake_dir())')
77
TRITON_OPT := $(BUILD_DIR)/bin/triton-opt
88
PYTEST := $(PYTHON) -m pytest
9-
LLVM_BUILD_PATH ?= $(realpath .llvm-project/build)
9+
LLVM_BUILD_PATH ?= "$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/.llvm-project/build"
1010
NUM_PROCS ?= 8
1111

1212
# Incremental builds

0 commit comments

Comments
 (0)