From 9c352e089854838d890d0e37a86050274e7d3852 Mon Sep 17 00:00:00 2001 From: "zra@google.com" Date: Tue, 11 Nov 2014 22:59:00 +0000 Subject: [PATCH] Moves BUILD.gn config from root to runtime. Cannot checkout a single file from svn through gclient. Review URL: https://codereview.chromium.org//712313005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41677 260f80e4-7a28-3924-810f-c04153c831b5 --- BUILD.gn | 28 ------------------- runtime/BUILD.gn | 27 +++++++++++++++++- runtime/bin/BUILD.gn | 8 +++--- .../double-conversion/src/BUILD.gn | 2 +- runtime/third_party/jscre/BUILD.gn | 2 +- runtime/vm/BUILD.gn | 8 +++--- 6 files changed, 36 insertions(+), 39 deletions(-) delete mode 100644 BUILD.gn diff --git a/BUILD.gn b/BUILD.gn deleted file mode 100644 index 4ebee386e9d..00000000000 --- a/BUILD.gn +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. - - -config("dart_config") { - defines = [] - if (is_debug) { - defines += ["DEBUG"] - } else { - defines += ["NDEBUG"] - } - - cflags = [ - "-Werror", - "-Wall", - "-Wextra", # Also known as -W. - "-Wno-unused-parameter", - "-Wnon-virtual-dtor", - "-Wvla", - "-Wno-conversion-null", - "-Woverloaded-virtual", - "-g3", - "-ggdb3", - "-fno-rtti", - "-fno-exceptions", - ] -} diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index 3f3ffc912c8..4c122625216 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -2,8 +2,33 @@ # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. +config("dart_config") { + defines = [] + if (is_debug) { + defines += ["DEBUG"] + } else { + defines += ["NDEBUG"] + } + + cflags = [ + "-Werror", + "-Wall", + "-Wextra", # Also known as -W. + "-Wno-unused-parameter", + "-Wnon-virtual-dtor", + "-Wvla", + "-Wno-conversion-null", + "-Woverloaded-virtual", + "-g3", + "-ggdb3", + "-fno-rtti", + "-fno-exceptions", + ] +} + + static_library("libdart") { - configs += ["..:dart_config"] + configs += [":dart_config"] deps = [ "vm:libdart_lib", "vm:libdart_vm", diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index bb9be7eadd9..467579eeecf 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -88,7 +88,7 @@ builtin_impl_sources_gypi = ["builtin_impl_sources.gypi"]) static_library("libdart_builtin") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] public_configs = [":libdart_builtin_config"] deps = [ ":generate_builtin_cc_file", @@ -109,7 +109,7 @@ static_library("libdart_builtin") { static_library("libdart_withcore") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] deps = [ "../vm:libdart_lib_withcore", "../vm:libdart_vm", @@ -142,7 +142,7 @@ static_library("libdart_withcore") { executable("gen_snapshot") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] deps = [ ":libdart_withcore", ":libdart_builtin", @@ -167,7 +167,7 @@ executable("gen_snapshot") { static_library("libdart_embedder_noio") { - configs += ["../..:dart_config",] + configs += ["..:dart_config",] deps = [ "..:libdart", "../vm:libdart_platform", diff --git a/runtime/third_party/double-conversion/src/BUILD.gn b/runtime/third_party/double-conversion/src/BUILD.gn index 0d7d9658bd9..5aaa53b25f2 100644 --- a/runtime/third_party/double-conversion/src/BUILD.gn +++ b/runtime/third_party/double-conversion/src/BUILD.gn @@ -4,7 +4,7 @@ static_library("libdouble_conversion") { - configs += [ "../../../..:dart_config", ] + configs += [ "../../..:dart_config", ] sources = [ "bignum.cc", "bignum.h", diff --git a/runtime/third_party/jscre/BUILD.gn b/runtime/third_party/jscre/BUILD.gn index eac8dd760a2..59c91a8913a 100644 --- a/runtime/third_party/jscre/BUILD.gn +++ b/runtime/third_party/jscre/BUILD.gn @@ -3,7 +3,7 @@ # BSD-style license that can be found in the LICENSE file. static_library("libjscre") { - configs += [ "../../..:dart_config", ] + configs += [ "../..:dart_config", ] defines = [ "SUPPORT_UTF8", "SUPPORT_UCP", diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index d86757863e2..b1afc4f1dc1 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -12,7 +12,7 @@ config("libdart_vm_config") { static_library("libdart_platform") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] public_configs = [":libdart_vm_config"] platform_headers_gypi = @@ -39,7 +39,7 @@ static_library("libdart_platform") { static_library("libdart_vm") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] public_configs = [":libdart_vm_config"] deps = [ ":generate_service_cc_file", ] @@ -143,7 +143,7 @@ template("generate_core_libraries") { } static_library("libdart_lib_withcore") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] deps = libdeps sources = libsources + ["bootstrap.cc"] + liboutputs include_dirs = [ @@ -151,7 +151,7 @@ template("generate_core_libraries") { ] } static_library("libdart_lib") { - configs += ["../..:dart_config"] + configs += ["..:dart_config"] sources = libsources + [ "bootstrap_nocore.cc", ] include_dirs = [ "..",