commit 8b8bed6c2c8f8d757b40dcd9ae20e7f2345f5e06
parent 7ea0769a343dbbfd63d1c9e5bd155bd19ef747e0
Author: Chris Bracken <chris@bracken.jp>
Date: Fri, 5 Oct 2018 11:38:25 -0700
Break out compiler_std, compiler_warnings configs
Eliminate executable_ldconfig, which was unused.
Diffstat:
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/build/BUILD.gn b/build/BUILD.gn
@@ -1,12 +1,18 @@
-config("compiler_defaults") {
- cflags = [
+config("compiler_std") {
+ cflags_c = [
+ "-std=c11",
+ ]
+ cflags_cc = [
"-std=c++17",
- "-Weverything",
- "-Wno-c++98-compat",
]
}
-config("executable_ldconfig") {
- ldflags = [
+config("compiler_warnings") {
+ cflags = [
+ "-Weverything",
+ "-Werror",
+ ]
+ cflags_cc = [
+ "-Wno-c++98-compat",
]
}
diff --git a/build/BUILDCONFIG.gn b/build/BUILDCONFIG.gn
@@ -15,14 +15,14 @@ if (current_os == "") {
use_strip = false
# All binary targets will get this list of configs by default.
-_shared_binary_target_configs = [ "//build:compiler_defaults" ]
+_shared_binary_target_configs = [
+ "//build:compiler_std",
+ "//build:compiler_warnings",
+]
# Apply that default list to the binary target types.
set_defaults("executable") {
configs = _shared_binary_target_configs
-
- # Executables get this additional configuration.
- configs += [ "//build:executable_ldconfig" ]
}
set_defaults("static_library") {
configs = _shared_binary_target_configs