[llvm] [Bazel] Allow the overlay to contain new directories (PR #126759)
Aaron Siddhartha Mondal via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 08:13:44 PST 2025
https://github.com/aaronmondal created https://github.com/llvm/llvm-project/pull/126759
None
>From 5ab954084987b5b77b71dacf5f28cdc93ebcf027 Mon Sep 17 00:00:00 2001
From: Aaron Siddhartha Mondal <aaron at tracemachina.com>
Date: Tue, 11 Feb 2025 17:10:10 +0100
Subject: [PATCH] [Bazel] Allow the overlay to contain new directories
---
utils/bazel/overlay_directories.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/utils/bazel/overlay_directories.py b/utils/bazel/overlay_directories.py
index 526a78e978e5d66..53933ce54bcfa1d 100755
--- a/utils/bazel/overlay_directories.py
+++ b/utils/bazel/overlay_directories.py
@@ -86,12 +86,15 @@ def main(args):
os.path.join(args.overlay, relpath), os.path.join(args.target, relpath)
)
- for src_entry in os.listdir(os.path.join(args.src, rel_root)):
- if src_entry not in dirs:
- relpath = os.path.join(rel_root, src_entry)
- _symlink_abs(
- os.path.join(args.src, relpath), os.path.join(args.target, relpath)
- )
+ src_path = os.path.join(args.src, rel_root)
+ if os.path.isdir(src_path):
+ for src_entry in os.listdir(src_path):
+ if src_entry not in dirs:
+ relpath = os.path.join(rel_root, src_entry)
+ _symlink_abs(
+ os.path.join(args.src, relpath),
+ os.path.join(args.target, relpath),
+ )
if __name__ == "__main__":
More information about the llvm-commits
mailing list