blob: cf5b8700756a4d5d1206fd6efd8fa9a75b968aa4 [file] [log] [blame]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alexander Khabarov <alexander.khabarov@arm.com>
Date: Thu, 19 Oct 2023 15:02:08 +0000
Subject: [PATCH] Guard against empty workspace root
The workspace root in `llvm/tblgen.bzl` is empty when running the build
from the root directory of the project. Default to `"."` to avoid
include errors resulting from this.
---
llvm/tblgen.bzl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/tblgen.bzl b/llvm/tblgen.bzl
index d43390918..9486edf29 100644
--- a/llvm/tblgen.bzl
+++ b/llvm/tblgen.bzl
@@ -35,7 +35,7 @@ def gentbl(
tblgen_args: Extra arguments string to pass to the tblgen binary.
**kwargs: Keyword arguments to pass to subsidiary cc_library() rule.
"""
- llvm_project_execroot_path = Label("//llvm:tblgen.bzl").workspace_root
+ llvm_project_execroot_path = Label("//llvm:tblgen.bzl").workspace_root or "."
if td_file not in td_srcs:
td_srcs += [td_file]