[PATCH] D60330: [gn] Rebase paths in symlink_or_copy against root_build_dir

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 11:46:14 PDT 2019


phosek created this revision.
phosek added a reviewer: thakis.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We should be always rebasing paths against root_build_dir which is
the directory where scripts are run from, not root_out_dir which is
the current toolchain directory. The latter can result in invalid
paths when the action is being used from a non-default toolchain.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D60330

Files:
  llvm/utils/gn/build/symlink_or_copy.gni


Index: llvm/utils/gn/build/symlink_or_copy.gni
===================================================================
--- llvm/utils/gn/build/symlink_or_copy.gni
+++ llvm/utils/gn/build/symlink_or_copy.gni
@@ -16,9 +16,9 @@
     script = "//llvm/utils/gn/build/symlink_or_copy.py"
     args = [
       "--stamp",
-      rebase_path(stamp, root_out_dir),
+      rebase_path(stamp, root_build_dir),
       invoker.source,
-      rebase_path(invoker.output, root_out_dir),
+      rebase_path(invoker.output, root_build_dir),
     ]
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60330.193925.patch
Type: text/x-patch
Size: 534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190405/80eece6b/attachment.bin>


More information about the llvm-commits mailing list