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

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

Issue 1150193002: GN: Add support for prebuilt instrumented libraries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 if (current_cpu == "arm") { 7 if (current_cpu == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
11 import("//build/config/mips.gni") 11 import("//build/config/mips.gni")
12 } 12 }
13 if (is_posix) { 13 if (is_posix) {
14 import("//build/config/gcc/gcc_version.gni") 14 import("//build/config/gcc/gcc_version.gni")
15 } 15 }
16 16
17 import("//build/toolchain/ccache.gni") 17 import("//build/toolchain/ccache.gni")
18 import("//build/config/sanitizers/sanitizers.gni")
18 19
19 declare_args() { 20 declare_args() {
20 # Normally, Android builds are lightly optimized, even for debug builds, to 21 # Normally, Android builds are lightly optimized, even for debug builds, to
21 # keep binary size down. Setting this flag to true disables such optimization 22 # keep binary size down. Setting this flag to true disables such optimization
22 android_full_debug = false 23 android_full_debug = false
23 24
24 # Whether to use the binary binutils checked into third_party/binutils. 25 # Whether to use the binary binutils checked into third_party/binutils.
25 # These are not multi-arch so cannot be used except on x86 and x86-64 (the 26 # These are not multi-arch so cannot be used except on x86 and x86-64 (the
26 # only two architectures that are currently checked in). Turn this off when 27 # only two architectures that are currently checked in). Turn this off when
27 # you are using a custom toolchain and need to control -B in cflags. 28 # you are using a custom toolchain and need to control -B in cflags.
(...skipping 21 matching lines...) Expand all
49 # http://gcc.gnu.org/wiki/DebugFission 50 # http://gcc.gnu.org/wiki/DebugFission
50 use_debug_fission = 51 use_debug_fission =
51 !is_win && use_gold && linux_use_bundled_binutils && !use_ccache 52 !is_win && use_gold && linux_use_bundled_binutils && !use_ccache
52 53
53 if (is_win) { 54 if (is_win) {
54 # Whether the VS xtree header has been patched to disable warning 4702. If 55 # Whether the VS xtree header has been patched to disable warning 4702. If
55 # it has, then we don't need to disable 4702 (unreachable code warning). 56 # it has, then we don't need to disable 4702 (unreachable code warning).
56 # The patch is preapplied to the internal toolchain and hence all bots. 57 # The patch is preapplied to the internal toolchain and hence all bots.
57 msvs_xtree_patched = false 58 msvs_xtree_patched = false
58 } 59 }
59
60 # Track where uninitialized memory originates from. From fastest to slowest:
61 # 0 - no tracking, 1 - track only the initial allocation site, 2 - track the
62 # chain of stores leading from allocation site to use site.
63 msan_track_origins = 2
64 } 60 }
65 61
66 # default_include_dirs --------------------------------------------------------- 62 # default_include_dirs ---------------------------------------------------------
67 # 63 #
68 # This is a separate config so that third_party code (which would not use the 64 # This is a separate config so that third_party code (which would not use the
69 # source root and might have conflicting versions of some headers) can remove 65 # source root and might have conflicting versions of some headers) can remove
70 # this and specify their own include paths. 66 # this and specify their own include paths.
71 config("default_include_dirs") { 67 config("default_include_dirs") {
72 include_dirs = [ 68 include_dirs = [
73 "//", 69 "//",
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 164 }
169 if (is_msan) { 165 if (is_msan) {
170 msan_blacklist_path = 166 msan_blacklist_path =
171 rebase_path("//tools/msan/blacklist.txt", root_build_dir) 167 rebase_path("//tools/msan/blacklist.txt", root_build_dir)
172 cflags += [ 168 cflags += [
173 "-fsanitize=memory", 169 "-fsanitize=memory",
174 "-fsanitize-memory-track-origins=$msan_track_origins", 170 "-fsanitize-memory-track-origins=$msan_track_origins",
175 "-fsanitize-blacklist=$msan_blacklist_path", 171 "-fsanitize-blacklist=$msan_blacklist_path",
176 ] 172 ]
177 173
178 # TODO(GYP): Support instrumented libraries and custom libc++. 174 # TODO(GYP): Support custom libc++.
earthdok 2015/05/28 18:27:45 This isn't resolved. We need to support source bui
Sam McNally 2015/05/29 08:33:00 Moved the TODO into the instrumented_libraries BUI
179 } 175 }
180 } 176 }
181 177
182 if (is_clang && is_debug) { 178 if (is_clang && is_debug) {
183 # Allow comparing the address of references and 'this' against 0 179 # Allow comparing the address of references and 'this' against 0
184 # in debug builds. Technically, these can never be null in 180 # in debug builds. Technically, these can never be null in
185 # well-defined C/C++ and Clang can optimize such checks away in 181 # well-defined C/C++ and Clang can optimize such checks away in
186 # release builds, but they may be used in asserts in debug builds. 182 # release builds, but they may be used in asserts in debug builds.
187 cflags_cc += [ 183 cflags_cc += [
188 "-Wno-undefined-bool-conversion", 184 "-Wno-undefined-bool-conversion",
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 cflags += [ "-gsplit-dwarf" ] 1139 cflags += [ "-gsplit-dwarf" ]
1144 } 1140 }
1145 } 1141 }
1146 } 1142 }
1147 1143
1148 config("no_symbols") { 1144 config("no_symbols") {
1149 if (!is_win) { 1145 if (!is_win) {
1150 cflags = [ "-g0" ] 1146 cflags = [ "-g0" ]
1151 } 1147 }
1152 } 1148 }
OLDNEW
« no previous file with comments | « no previous file | build/config/sanitizers/BUILD.gn » ('j') | third_party/instrumented_libraries/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698