Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: build/config/BUILD.gn

Issue 1704563003: Add a GN assert that output dir doesn't have a platform name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete explicit filter Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/allocator.gni") 5 import("//build/config/allocator.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/crypto.gni") 8 import("//build/config/crypto.gni")
9 import("//build/config/features.gni") 9 import("//build/config/features.gni")
10 import("//build/config/sanitizers/sanitizers.gni") 10 import("//build/config/sanitizers/sanitizers.gni")
11 import("//build/config/ui.gni") 11 import("//build/config/ui.gni")
12 import("//build/toolchain/goma.gni") 12 import("//build/toolchain/goma.gni")
13 13
14 declare_args() { 14 declare_args() {
15 # When set (the default) enables C++ iterator debugging in debug builds. 15 # When set (the default) enables C++ iterator debugging in debug builds.
16 # Iterator debugging is always off in release builds (technically, this flag 16 # Iterator debugging is always off in release builds (technically, this flag
17 # affects the "debug" config, which is always available but applied by 17 # affects the "debug" config, which is always available but applied by
18 # default only in debug builds). 18 # default only in debug builds).
19 # 19 #
20 # Iterator debugging is generally useful for catching bugs. But it can 20 # Iterator debugging is generally useful for catching bugs. But it can
21 # introduce extra locking to check the state of an iterator against the state 21 # introduce extra locking to check the state of an iterator against the state
22 # of the current object. For iterator- and thread-heavy code, this can 22 # of the current object. For iterator- and thread-heavy code, this can
23 # significantly slow execution. 23 # significantly slow execution.
24 enable_iterator_debugging = true 24 enable_iterator_debugging = true
25 25
26 # Set to true to enable dcheck in Release builds. 26 # Set to true to enable dcheck in Release builds.
27 dcheck_always_on = false 27 dcheck_always_on = false
28 } 28 }
29 29
30 # Because of the source assignment filter, many targets end up over-filtering
31 # their sources if the output directory contains a platform name. Assert that
32 # this doesn't happen. http://crbug.com/548283
33 template("assert_valid_out_dir") {
34 assert(target_name != "") # Mark as used.
35 assert(
36 invoker.sources == invoker.actual_sources,
37 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283")
38 }
39
40 assert_valid_out_dir("_check_output_dir_has_no_platform_name") {
41 actual_sources = [ "$root_build_dir/foo" ]
42 sources = actual_sources
43 }
44
30 # TODO(brettw) Most of these should be removed. Instead of global feature 45 # TODO(brettw) Most of these should be removed. Instead of global feature
31 # flags, we should have more modular flags that apply only to a target and its 46 # flags, we should have more modular flags that apply only to a target and its
32 # dependents. For example, depending on the "x11" meta-target should define 47 # dependents. For example, depending on the "x11" meta-target should define
33 # USE_X11 for all dependents so that everything that could use X11 gets the 48 # USE_X11 for all dependents so that everything that could use X11 gets the
34 # define, but anything that doesn't depend on X11 doesn't see it. 49 # define, but anything that doesn't depend on X11 doesn't see it.
35 # 50 #
36 # For now we define these globally to match the current GYP build. 51 # For now we define these globally to match the current GYP build.
37 config("feature_flags") { 52 config("feature_flags") {
38 # TODO(brettw) this probably needs to be parameterized. 53 # TODO(brettw) this probably needs to be parameterized.
39 defines = [ 54 defines = [
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 # This error doesn't happen every time. In VS2013, it seems if the .pch 476 # This error doesn't happen every time. In VS2013, it seems if the .pch
462 # file doesn't exist, no error will be generated (probably MS tested this 477 # file doesn't exist, no error will be generated (probably MS tested this
463 # case but forgot the other one?). To reproduce this error, do a build, 478 # case but forgot the other one?). To reproduce this error, do a build,
464 # then delete the precompile.c.obj file, then build again. 479 # then delete the precompile.c.obj file, then build again.
465 cflags_c = [ "/wd4206" ] 480 cflags_c = [ "/wd4206" ]
466 } else if (is_mac && !is_official_build && !use_goma) { 481 } else if (is_mac && !is_official_build && !use_goma) {
467 precompiled_header = "build/precompile.h" 482 precompiled_header = "build/precompile.h"
468 precompiled_source = "//build/precompile.h" 483 precompiled_source = "//build/precompile.h"
469 } 484 }
470 } 485 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698