OSDN Git Service

Add initial scaffolding for the GN build.
authorNico Weber <nicolasweber@gmx.de>
Sat, 17 Nov 2018 02:21:53 +0000 (02:21 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 17 Nov 2018 02:21:53 +0000 (02:21 +0000)
commitbbceba6721366d37c43b8becba6adda9b173ae16
tree00d88a965f080c6856f30d390a393ce374fd23e7
parenta975da2543e7eb9999b166136008a834033a3924
Add initial scaffolding for the GN build.

See "GN build roundtable summary; adding GN build files to the repo" on
llvm-dev and cfe-dev for discussion.

In particular, this build is completely unsupported. People adding new files to
LLVM are not expected to update the GN build files, and reviewers are not
supposed to request the gn build files to be updated.

This adds just enough to be able to build llvm/lib/Demangle. It requires using
a monorepo.

This adds a few build config options you can set in args.gn
(`gn args out/foo --list` for all):
- is_debug = true to enable debug builds (defaults to release)
- llvm_enable_assertions to toggle assertions (defaults to true)
- clang_base_path, if set an absolute path to a locally-built clang to be used
  as host compiler

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347128 91177308-0d34-0410-b5e6-96231b3b80d8
utils/gn/.gn [new file with mode: 0644]
utils/gn/README.rst [new file with mode: 0644]
utils/gn/build/BUILD.gn [new file with mode: 0644]
utils/gn/build/BUILDCONFIG.gn [new file with mode: 0644]
utils/gn/build/buildflags.gni [new file with mode: 0644]
utils/gn/build/enable_threads.gni [new file with mode: 0644]
utils/gn/build/mac_sdk.gni [new file with mode: 0644]
utils/gn/build/toolchain/BUILD.gn [new file with mode: 0644]
utils/gn/build/toolchain/compiler.gni [new file with mode: 0644]
utils/gn/secondary/BUILD.gn [new file with mode: 0644]
utils/gn/secondary/llvm/lib/Demangle/BUILD.gn [new file with mode: 0644]