Chromium Code Reviews| 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. | |
|
Alexander Potapenko
2012/08/02 14:57:12
Note that tcmalloc does not work on Mac within Chr
Dai Mikurube (NOT FULLTIME)
2012/08/02 16:14:35
Ah, that's true. Thanks.
I have to find another a
| |
| 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 ['_target_name=="mksnapshot" or _target_name=="protoc" or _target_name =="ppGoogleNaClPluginChrome"', { | |
|
Dai Mikurube (NOT FULLTIME)
2012/08/02 07:43:55
Some binaries doesn't use tcmalloc. We use no-op
Alexander Potapenko
2012/08/02 14:57:12
Please write a comment about this.
Dai Mikurube (NOT FULLTIME)
2012/08/02 16:14:35
Yes, I'll do that. Thank you.
Dai Mikurube (NOT FULLTIME)
2012/08/03 10:01:50
Done.
| |
| 1605 # Ignore allocated types. | |
| 1606 'conditions': [ | |
| 1607 ['clang==1 and clang_use_allocated_type==1', { | |
| 1608 'dependencies': [ | |
| 1609 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc ated_type_ignore#target', | |
| 1610 ]}, | |
| 1611 ], | |
| 1612 ]}, { | |
| 1613 # Store allocated types in TCMalloc's allocated_type_map (extended). | |
| 1614 'conditions': [ | |
| 1615 ['clang==1 and clang_use_allocated_type==1', { | |
| 1616 'dependencies': [ | |
| 1617 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc ated_type_tcmalloc#target', | |
|
Nico
2012/08/02 15:35:03
The realpath bit here shouldn't be needed
Dai Mikurube (NOT FULLTIME)
2012/08/02 16:14:35
It is actually needed because of http://crrev.com/
Nico
2012/08/02 16:18:49
No other dependency in gyp uses realpath though, r
Dai Mikurube (NOT FULLTIME)
2012/08/02 16:54:39
I guess it happens because it is a very hacky gyp
| |
| 1618 ]}, | |
| 1619 ], | |
| 1620 ]}, | |
| 1621 ] | |
| 1622 ]}, | |
| 1623 ], | |
| 1589 ['enable_wexit_time_destructors==1', { | 1624 ['enable_wexit_time_destructors==1', { |
| 1590 'conditions': [ | 1625 'conditions': [ |
| 1591 [ 'clang==1', { | 1626 [ 'clang==1', { |
| 1592 'cflags': [ | 1627 'cflags': [ |
| 1593 '-Wexit-time-destructors', | 1628 '-Wexit-time-destructors', |
| 1594 ], | 1629 ], |
| 1595 'xcode_settings': { | 1630 'xcode_settings': { |
| 1596 'WARNING_CFLAGS': [ | 1631 'WARNING_CFLAGS': [ |
| 1597 '-Wexit-time-destructors', | 1632 '-Wexit-time-destructors', |
| 1598 ], | 1633 ], |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2322 'cflags': [ | 2357 'cflags': [ |
| 2323 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', | 2358 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 2324 ], | 2359 ], |
| 2325 }], | 2360 }], |
| 2326 ['clang==1 and "<(GENERATOR)"=="ninja"', { | 2361 ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 2327 'cflags': [ | 2362 'cflags': [ |
| 2328 # See http://crbug.com/110262 | 2363 # See http://crbug.com/110262 |
| 2329 '-fcolor-diagnostics', | 2364 '-fcolor-diagnostics', |
| 2330 ], | 2365 ], |
| 2331 }], | 2366 }], |
| 2367 ['clang==1 and clang_use_allocated_type==1', { | |
|
Alexander Potapenko
2012/08/03 09:57:07
If clang_use_allocated_type=1 implies clang=1, you
Dai Mikurube (NOT FULLTIME)
2012/08/07 10:39:18
Done.
| |
| 2368 'cflags_cc!': ['-fno-rtti'], | |
| 2369 'cflags_cc+': ['-gline-tables-only'], | |
| 2370 'target_conditions': [ | |
| 2371 ['_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"', { | |
| 2372 'cflags_cc+': [ | |
| 2373 '-frtti', | |
| 2374 '-fintercept-allocation-functions', | |
| 2375 '-I../../base/allocator', | |
| 2376 '-include', | |
| 2377 'allocated_type.h', | |
| 2378 ], | |
| 2379 }], | |
| 2380 ], | |
| 2381 'defines': ['USE_ALLOCATED_TYPE'], | |
| 2382 }], | |
| 2332 ['asan==1', { | 2383 ['asan==1', { |
| 2333 'target_conditions': [ | 2384 'target_conditions': [ |
| 2334 ['_toolset=="target"', { | 2385 ['_toolset=="target"', { |
| 2335 'cflags': [ | 2386 'cflags': [ |
| 2336 '-faddress-sanitizer', | 2387 '-faddress-sanitizer', |
| 2337 '-fno-omit-frame-pointer', | 2388 '-fno-omit-frame-pointer', |
| 2338 ], | 2389 ], |
| 2339 'ldflags': [ | 2390 'ldflags': [ |
| 2340 '-faddress-sanitizer', | 2391 '-faddress-sanitizer', |
| 2341 ], | 2392 ], |
| (...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 | 3387 # settings in target dicts. SYMROOT is a special case, because many other |
| 3337 # Xcode variables depend on it, including variables such as | 3388 # Xcode variables depend on it, including variables such as |
| 3338 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 3389 # 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 | 3390 # 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 | 3391 # 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, | 3392 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 3342 # and therefore SYMROOT, needs to be set at the project level. | 3393 # and therefore SYMROOT, needs to be set at the project level. |
| 3343 'SYMROOT': '<(DEPTH)/xcodebuild', | 3394 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 3344 }, | 3395 }, |
| 3345 } | 3396 } |
| OLD | NEW |