[PATCH] D56419: [gn build] Move .gn file to the root of the monorepo

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 7 15:40:17 PST 2019


thakis created this revision.
thakis added a reviewer: phosek.

This adds it to llvm.org/svn/llvm-project/monorepo-root/trunk which is mirrored to the root of https://github.com/llvm-git-prototype/llvm.

Having the .gn file in the root of the repo greatly improves the ergonomics of running gn: It's now just `gn gen out/foo` instead of `gn --dotfile=llvm/utils/gn/.gn --root=. gen out/foo` (likewise for all other gn commands).

I'll then remove it from llvm/utils/gn/.gn in a separate patch once everyone uses the official monorepo.


https://reviews.llvm.org/D56419

Files:
  .gn


Index: .gn
===================================================================
--- .gn
+++ .gn
@@ -0,0 +1,14 @@
+# LLVM's GN build is unsupported, see llvm/utils/gn/README.rst for details.
+
+buildconfig = "//llvm/utils/gn/build/BUILDCONFIG.gn"
+
+# Disallow all calls to exec_script. We should be very conservative about
+# whitelisting things here.
+exec_script_whitelist = []
+
+# The normal GN setup is to have BUILD.gn files in-tree and a root BUILD.gn
+# file.  Since LLVM's GN build is unofficial, set secondary_source to tell GN
+# that e.g. llvm/lib/Demangle/BUILD.gn is found at
+# llvm/utils/gn/secondary/llvm/lib/Demangle/BUILD.gn and that the root BUILD.gn
+# file is at llvm/utils/gn/secondary/BUILD.gn
+secondary_source = "//llvm/utils/gn/secondary/"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56419.180581.patch
Type: text/x-patch
Size: 766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190107/8da2fc55/attachment.bin>


More information about the llvm-commits mailing list