1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/utils/gn/.gn
Nico Weber de3429242c 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

llvm-svn: 347128
2018-11-17 02:21:53 +00:00

17 lines
767 B
Plaintext

# FIXME: Once it's possible to add files to the root directory of the
# monorepo, move this file to there. Until then, you need to pass
# `--dotfile=llvm/utils/gn/.gn --root=.` to the `gn gen` command.
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/"