diff options
author | Alexei Frolov <frolv@google.com> | 2020-06-10 10:46:04 -0700 |
---|---|---|
committer | Wyatt Hepler <hepler@google.com> | 2020-06-16 09:50:59 -0700 |
commit | 4c0428a0d8f3909beeb3d6f154c2cda72395d31b (patch) | |
tree | edc45d90d4aa0e09736275755fca35ab6d63103e /BUILDCONFIG.gn | |
parent | fb3d3fba791b5b200293d23f08b778ecae34e02f (diff) | |
download | pigweed-4c0428a0d8f3909beeb3d6f154c2cda72395d31b.tar.gz |
Define Linux clang target as toolchain
This change configures the Linux clang -Og target as a toolchain with
args. To support this, all Pigweed variables from pw_vars_default are
made into build args, defined within their respective modules.
The Linux clang target/toolchain is the only one that currently works.
Pigweed's other targets will be ported in later changes.
Change-Id: I051e29fde7577e41a3184c37031a4e04936404e1
Diffstat (limited to 'BUILDCONFIG.gn')
-rw-r--r-- | BUILDCONFIG.gn | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/BUILDCONFIG.gn b/BUILDCONFIG.gn index 42640b018..dbf7ed4e0 100644 --- a/BUILDCONFIG.gn +++ b/BUILDCONFIG.gn @@ -16,30 +16,13 @@ # new project, you'll need to copy this file to your project and then modify it # to fit your needs. Due to the way Pigweed handles file imports, you won't be # able to simply import this file in your own BUILDCONFIG.gn. -# -# Keep in mind when importing .gni files that `gn format` will try to -# alphabetically sort imports unless they're separated by comments. For this -# file, import order matters (modules.gni MUST be imported first). # This is imported into a scope so as not to pollute the global variable space. _pigweed_directory = { import("//build_overrides/pigweed.gni") } -_pigweed_modules = { - # Import target configuration. This is what "completes" a Pigweed - # configuration. This file should set a default toolchain, configure - # pw_executable, select backends to build against, and provide target-specific - # build arguments. - import("${_pigweed_directory.dir_pigweed}/legacy_target.gni") -} - -# Ensure some sort of default toolchain was provided by the target, and then -# set the default toolchain. -assert(_pigweed_modules.pw_target_toolchain != "", - "Build target must provide its own toolchain.") - # The default toolchain is not used in Pigweed builds, so it is set to a dummy # toolchain. The top-level BUILD.gn should stamp a group with all of the build # targets and their toolchains. -set_default_toolchain("${_pigweed_modules.dir_pw_toolchain}/dummy") +set_default_toolchain("${_pigweed_directory.dir_pw_toolchain}/dummy") |