]> granicus.if.org Git - llvm/commitdiff
[gn] Rebase paths in symlink_or_copy against root_build_dir
authorPetr Hosek <phosek@chromium.org>
Fri, 5 Apr 2019 19:13:54 +0000 (19:13 +0000)
committerPetr Hosek <phosek@chromium.org>
Fri, 5 Apr 2019 19:13:54 +0000 (19:13 +0000)
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.

Differential Revision: https://reviews.llvm.org/D60330

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357798 91177308-0d34-0410-b5e6-96231b3b80d8

utils/gn/build/symlink_or_copy.gni

index 499d2e897d53d0cc642774169249ca264104ca39..f4f45fd7abd4b17fd75f13b53439a760668a8fbc 100644 (file)
@@ -16,9 +16,9 @@ template("symlink_or_copy") {
     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),
     ]
   }
 }