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

Side by Side Diff: gni/v8.gni

Issue 2169443002: [gn] Properly qualify variable names that escape v8 context (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 2016 the V8 project authors. All rights reserved. 1 # Copyright 2016 the V8 project 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/sanitizers/sanitizers.gni") 5 import("//build/config/sanitizers/sanitizers.gni")
6 import("//build/config/v8_target_cpu.gni") 6 import("//build/config/v8_target_cpu.gni")
7 7
8 declare_args() { 8 declare_args() {
9 # Indicate if valgrind was fetched as a custom deps to make it available on 9 # Indicate if valgrind was fetched as a custom deps to make it available on
10 # swarming. 10 # swarming.
(...skipping 20 matching lines...) Expand all
31 v8_use_external_startup_data = v8_use_snapshot && !is_ios 31 v8_use_external_startup_data = v8_use_snapshot && !is_ios
32 } 32 }
33 33
34 ############################################################################### 34 ###############################################################################
35 # Templates 35 # Templates
36 # 36 #
37 37
38 # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute 38 # Points to // in v8 stand-alone or to //v8/ in chromium. We need absolute
39 # paths for all configs in templates as they are shared in different 39 # paths for all configs in templates as they are shared in different
40 # subdirectories. 40 # subdirectories.
41 path_prefix = get_path_info("../", "abspath") 41 v8_path_prefix = get_path_info("../", "abspath")
42 42
43 # Common configs to remove or add in all v8 targets. 43 # Common configs to remove or add in all v8 targets.
44 remove_configs = [ "//build/config/compiler:chromium_code" ] 44 v8_remove_configs = [ "//build/config/compiler:chromium_code" ]
45 add_configs = [ 45 v8_add_configs = [
46 "//build/config/compiler:no_chromium_code", 46 "//build/config/compiler:no_chromium_code",
47 path_prefix + ":features", 47 v8_path_prefix + ":features",
48 path_prefix + ":toolchain", 48 v8_path_prefix + ":toolchain",
49 ] 49 ]
50 50
51 if (is_debug && !v8_optimized_debug) { 51 if (is_debug && !v8_optimized_debug) {
52 remove_configs += [ "//build/config/compiler:default_optimization" ] 52 v8_remove_configs += [ "//build/config/compiler:default_optimization" ]
53 add_configs += [ "//build/config/compiler:no_optimize" ] 53 v8_add_configs += [ "//build/config/compiler:no_optimize" ]
54 } else { 54 } else {
55 remove_configs += [ "//build/config/compiler:default_optimization" ] 55 v8_remove_configs += [ "//build/config/compiler:default_optimization" ]
56 56
57 # TODO(crbug.com/621335) Rework this so that we don't have the confusion 57 # TODO(crbug.com/621335) Rework this so that we don't have the confusion
58 # between "optimize_speed" and "optimize_max". 58 # between "optimize_speed" and "optimize_max".
59 if (is_posix && !is_android && !is_nacl && !using_sanitizer) { 59 if (is_posix && !is_android && !is_nacl && !using_sanitizer) {
60 add_configs += [ "//build/config/compiler:optimize_speed" ] 60 v8_add_configs += [ "//build/config/compiler:optimize_speed" ]
61 } else { 61 } else {
62 add_configs += [ "//build/config/compiler:optimize_max" ] 62 v8_add_configs += [ "//build/config/compiler:optimize_max" ]
63 } 63 }
64 } 64 }
65 65
66 # All templates should be kept in sync. 66 # All templates should be kept in sync.
67 template("v8_source_set") { 67 template("v8_source_set") {
68 source_set(target_name) { 68 source_set(target_name) {
69 forward_variables_from(invoker, "*", [ "configs" ]) 69 forward_variables_from(invoker, "*", [ "configs" ])
70 configs += invoker.configs 70 configs += invoker.configs
71 configs -= remove_configs 71 configs -= v8_remove_configs
72 configs += add_configs 72 configs += v8_add_configs
73 } 73 }
74 } 74 }
75 75
76 template("v8_executable") { 76 template("v8_executable") {
77 executable(target_name) { 77 executable(target_name) {
78 forward_variables_from(invoker, "*", [ "configs" ]) 78 forward_variables_from(invoker, "*", [ "configs" ])
79 configs += invoker.configs 79 configs += invoker.configs
80 configs -= remove_configs 80 configs -= v8_remove_configs
81 configs += add_configs 81 configs += v8_add_configs
82 if (is_linux) { 82 if (is_linux) {
83 # For enabling ASLR. 83 # For enabling ASLR.
84 ldflags = [ "-pie" ] 84 ldflags = [ "-pie" ]
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 template("v8_component") { 89 template("v8_component") {
90 component(target_name) { 90 component(target_name) {
91 forward_variables_from(invoker, "*", [ "configs" ]) 91 forward_variables_from(invoker, "*", [ "configs" ])
92 configs += invoker.configs 92 configs += invoker.configs
93 configs -= remove_configs 93 configs -= v8_remove_configs
94 configs += add_configs 94 configs += v8_add_configs
95 } 95 }
96 } 96 }
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