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

Side by Side Diff: build/common.gypi

Issue 377383004: Enable _FORTIFY_SOURCE=2 with clang (unless sanitizers are used). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@isystem
Patch Set: . Created 6 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 (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 3195 matching lines...) Expand 10 before | Expand all | Expand 10 after
3206 'MEMORY_TOOL_REPLACES_ALLOCATOR', 3206 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3207 'DYNAMIC_ANNOTATIONS_ENABLED=1', 3207 'DYNAMIC_ANNOTATIONS_ENABLED=1',
3208 'WTF_USE_DYNAMIC_ANNOTATIONS=1', 3208 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
3209 ], 3209 ],
3210 }], 3210 }],
3211 ['win_use_allocator_shim==0', { 3211 ['win_use_allocator_shim==0', {
3212 'defines': ['NO_TCMALLOC'], 3212 'defines': ['NO_TCMALLOC'],
3213 }], 3213 }],
3214 # _FORTIFY_SOURCE isn't really supported by Clang now, see 3214 # _FORTIFY_SOURCE isn't really supported by Clang now, see
3215 # http://llvm.org/bugs/show_bug.cgi?id=16821. 3215 # http://llvm.org/bugs/show_bug.cgi?id=16821.
3216 # TODO(glider): once the bug is fixed, disable source fortification 3216 # It seems to work fine with Ubuntu 12 headers though, so use it
3217 # under the sanitizer tools only. 3217 # in official builds.
3218 ['os_posix==1 and (OS!="linux" or clang!=1)', { 3218 ['os_posix==1 and (asan!=1 and msan!=1 and tsan!=1 and lsan!=1 and ubs an!=1) and (OS!="linux" or clang!=1 or buildtype=="Official")', {
3219 'target_conditions': [ 3219 'target_conditions': [
3220 ['chromium_code==1', { 3220 ['chromium_code==1', {
3221 # Non-chromium code is not guaranteed to compile cleanly 3221 # Non-chromium code is not guaranteed to compile cleanly
3222 # with _FORTIFY_SOURCE. Also, fortified build may fail 3222 # with _FORTIFY_SOURCE. Also, fortified build may fail
3223 # when optimizations are disabled, so only do that for Release 3223 # when optimizations are disabled, so only do that for Release
3224 # build. 3224 # build.
3225 'defines': [ 3225 'defines': [
3226 '_FORTIFY_SOURCE=2', 3226 '_FORTIFY_SOURCE=2',
3227 ], 3227 ],
3228 }], 3228 }],
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after
5504 # settings in target dicts. SYMROOT is a special case, because many other 5504 # settings in target dicts. SYMROOT is a special case, because many other
5505 # Xcode variables depend on it, including variables such as 5505 # Xcode variables depend on it, including variables such as
5506 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5506 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
5507 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5507 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
5508 # files to appear (when present) in the UI as actual files and not red 5508 # files to appear (when present) in the UI as actual files and not red
5509 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5509 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5510 # and therefore SYMROOT, needs to be set at the project level. 5510 # and therefore SYMROOT, needs to be set at the project level.
5511 'SYMROOT': '<(DEPTH)/xcodebuild', 5511 'SYMROOT': '<(DEPTH)/xcodebuild',
5512 }, 5512 },
5513 } 5513 }
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