OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # IMPORTANT: | 5 # IMPORTANT: |
6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
8 { | 8 { |
9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 # Enable building with ASAN (Clang's -faddress-sanitizer option). | 231 # Enable building with ASAN (Clang's -faddress-sanitizer option). |
232 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 | 232 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 |
233 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addre
sssanitizer | 233 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addre
sssanitizer |
234 'asan%': 0, | 234 'asan%': 0, |
235 | 235 |
236 # Enable building with TSAN (Clang's -fthread-sanitizer option). | 236 # Enable building with TSAN (Clang's -fthread-sanitizer option). |
237 # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1 | 237 # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1 |
238 # See http://clang.llvm.org/docs/ThreadSanitizer.html | 238 # See http://clang.llvm.org/docs/ThreadSanitizer.html |
239 'tsan%': 0, | 239 'tsan%': 0, |
240 | 240 |
| 241 # Use a modified version of Clang to intercept allocated types and sizes |
| 242 # for allocated objects. -fintercept-allocated-type only works with the |
| 243 # modified clang, but clang_use_allocated_type=1 implies clang=1 |
| 244 # TODO(dmikurube): Add a link to a description page. |
| 245 # TODO(dmikurube): Support mac with another AllocatedTypeMap store. |
| 246 'clang_use_allocated_type%': 0, |
| 247 |
241 # Set to true to instrument the code with function call logger. | 248 # Set to true to instrument the code with function call logger. |
242 # See src/third_party/cygprofile/cyg-profile.cc for details. | 249 # See src/third_party/cygprofile/cyg-profile.cc for details. |
243 'order_profiling%': 0, | 250 'order_profiling%': 0, |
244 | 251 |
245 # Use the provided profiled order file to link Chrome image with it. | 252 # Use the provided profiled order file to link Chrome image with it. |
246 # This makes Chrome faster by better using CPU cache when executing code. | 253 # This makes Chrome faster by better using CPU cache when executing code. |
247 # This is known as PGO (profile guided optimization). | 254 # This is known as PGO (profile guided optimization). |
248 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-e
ffort | 255 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-e
ffort |
249 'order_text_section%' : "", | 256 'order_text_section%' : "", |
250 | 257 |
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 # third_party/asan may be different from the default one. | 1181 # third_party/asan may be different from the default one. |
1175 # TODO(glider): this isn't true anymore, need to check if we can use the | 1182 # TODO(glider): this isn't true anymore, need to check if we can use the |
1176 # plugins now. | 1183 # plugins now. |
1177 'clang_use_chrome_plugins%': 0, | 1184 'clang_use_chrome_plugins%': 0, |
1178 }], | 1185 }], |
1179 | 1186 |
1180 ['tsan==1', { | 1187 ['tsan==1', { |
1181 'clang%': 1, | 1188 'clang%': 1, |
1182 }], | 1189 }], |
1183 | 1190 |
| 1191 ['clang_use_allocated_type==1', { |
| 1192 'clang%': 1, |
| 1193 'clang_use_chrome_plugins%': 0, |
| 1194 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
| 1195 }], |
| 1196 |
1184 # On valgrind bots, override the optimizer settings so we don't inline too | 1197 # On valgrind bots, override the optimizer settings so we don't inline too |
1185 # much and make the stacks harder to figure out. | 1198 # much and make the stacks harder to figure out. |
1186 # | 1199 # |
1187 # TODO(rnk): Kill off variables that no one else uses and just implement | 1200 # TODO(rnk): Kill off variables that no one else uses and just implement |
1188 # them under a build_for_tool== condition. | 1201 # them under a build_for_tool== condition. |
1189 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { | 1202 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
1190 # gcc flags | 1203 # gcc flags |
1191 'mac_debug_optimization': '1', | 1204 'mac_debug_optimization': '1', |
1192 'mac_release_optimization': '1', | 1205 'mac_release_optimization': '1', |
1193 'release_optimize': '1', | 1206 'release_optimize': '1', |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1579 'defines': ['ENABLE_AUTOMATION=1'], | 1592 'defines': ['ENABLE_AUTOMATION=1'], |
1580 }], | 1593 }], |
1581 ['enable_printing==1', { | 1594 ['enable_printing==1', { |
1582 'defines': ['ENABLE_PRINTING=1'], | 1595 'defines': ['ENABLE_PRINTING=1'], |
1583 }], | 1596 }], |
1584 ['enable_captive_portal_detection==1', { | 1597 ['enable_captive_portal_detection==1', { |
1585 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], | 1598 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
1586 }], | 1599 }], |
1587 ], # conditions for 'target_defaults' | 1600 ], # conditions for 'target_defaults' |
1588 'target_conditions': [ | 1601 'target_conditions': [ |
| 1602 ['_type=="executable" or _type=="loadable_module"', { |
| 1603 'target_conditions': [ |
| 1604 # Some binaries doesn't use tcmalloc. We use empty interceptors |
| 1605 # for these binaries since the allocated type mapping is recorded |
| 1606 # in a tcmalloc-dependent data structure. |
| 1607 ['_target_name=="mksnapshot" or _target_name=="protoc" or _target_name
=="ppGoogleNaClPluginChrome"', { |
| 1608 # Ignore allocated types. |
| 1609 'conditions': [ |
| 1610 ['clang==1 and clang_use_allocated_type==1', { |
| 1611 'dependencies': [ |
| 1612 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc
ated_type_ignore#target', |
| 1613 ]}, |
| 1614 ], |
| 1615 ]}, { |
| 1616 # Store allocated types in TCMalloc's allocated_type_map (extended). |
| 1617 'conditions': [ |
| 1618 ['clang==1 and clang_use_allocated_type==1', { |
| 1619 'dependencies': [ |
| 1620 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc
ated_type_tcmalloc#target', |
| 1621 ]}, |
| 1622 ], |
| 1623 ]}, |
| 1624 ] |
| 1625 ]}, |
| 1626 ], |
1589 ['enable_wexit_time_destructors==1', { | 1627 ['enable_wexit_time_destructors==1', { |
1590 'conditions': [ | 1628 'conditions': [ |
1591 [ 'clang==1', { | 1629 [ 'clang==1', { |
1592 'cflags': [ | 1630 'cflags': [ |
1593 '-Wexit-time-destructors', | 1631 '-Wexit-time-destructors', |
1594 ], | 1632 ], |
1595 'xcode_settings': { | 1633 'xcode_settings': { |
1596 'WARNING_CFLAGS': [ | 1634 'WARNING_CFLAGS': [ |
1597 '-Wexit-time-destructors', | 1635 '-Wexit-time-destructors', |
1598 ], | 1636 ], |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2322 'cflags': [ | 2360 'cflags': [ |
2323 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', | 2361 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
2324 ], | 2362 ], |
2325 }], | 2363 }], |
2326 ['clang==1 and "<(GENERATOR)"=="ninja"', { | 2364 ['clang==1 and "<(GENERATOR)"=="ninja"', { |
2327 'cflags': [ | 2365 'cflags': [ |
2328 # See http://crbug.com/110262 | 2366 # See http://crbug.com/110262 |
2329 '-fcolor-diagnostics', | 2367 '-fcolor-diagnostics', |
2330 ], | 2368 ], |
2331 }], | 2369 }], |
| 2370 ['clang==1 and clang_use_allocated_type==1', { |
| 2371 'cflags_cc!': ['-fno-rtti'], |
| 2372 'cflags_cc+': ['-gline-tables-only'], |
| 2373 'target_conditions': [ |
| 2374 ['_target_name!="allocator" and _target_name!="allocator_extensi
on_thunks" and _target_name!="libcmt" and _target_name!="allocator_extension_thu
nks_win64" and _target_name!="allocated_type_log" and _target_name!="allocated_t
ype_ignore" and _target_name!="allocated_type_tcmalloc"', { |
| 2375 'cflags_cc+': [ |
| 2376 '-frtti', |
| 2377 '-fintercept-allocation-functions', |
| 2378 '-I../../base/allocator', |
| 2379 '-include', |
| 2380 'allocated_type.h', |
| 2381 ], |
| 2382 }], |
| 2383 ], |
| 2384 'defines': ['USE_ALLOCATED_TYPE'], |
| 2385 }], |
2332 ['asan==1', { | 2386 ['asan==1', { |
2333 'target_conditions': [ | 2387 'target_conditions': [ |
2334 ['_toolset=="target"', { | 2388 ['_toolset=="target"', { |
2335 'cflags': [ | 2389 'cflags': [ |
2336 '-faddress-sanitizer', | 2390 '-faddress-sanitizer', |
2337 '-fno-omit-frame-pointer', | 2391 '-fno-omit-frame-pointer', |
2338 ], | 2392 ], |
2339 'ldflags': [ | 2393 'ldflags': [ |
2340 '-faddress-sanitizer', | 2394 '-faddress-sanitizer', |
2341 ], | 2395 ], |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3336 # settings in target dicts. SYMROOT is a special case, because many other | 3390 # settings in target dicts. SYMROOT is a special case, because many other |
3337 # Xcode variables depend on it, including variables such as | 3391 # Xcode variables depend on it, including variables such as |
3338 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 3392 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
3339 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 3393 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
3340 # files to appear (when present) in the UI as actual files and not red | 3394 # files to appear (when present) in the UI as actual files and not red |
3341 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 3395 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
3342 # and therefore SYMROOT, needs to be set at the project level. | 3396 # and therefore SYMROOT, needs to be set at the project level. |
3343 'SYMROOT': '<(DEPTH)/xcodebuild', | 3397 'SYMROOT': '<(DEPTH)/xcodebuild', |
3344 }, | 3398 }, |
3345 } | 3399 } |
OLD | NEW |