| 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 6131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6142 }, | 6142 }, |
| 6143 }, | 6143 }, |
| 6144 }], | 6144 }], |
| 6145 # Apply a lower LTO optimization level as the default is too slow. | 6145 # Apply a lower LTO optimization level as the default is too slow. |
| 6146 ['use_lto==1 and clang==1', { | 6146 ['use_lto==1 and clang==1', { |
| 6147 'target_defaults': { | 6147 'target_defaults': { |
| 6148 'target_conditions': [ | 6148 'target_conditions': [ |
| 6149 ['_toolset=="target"', { | 6149 ['_toolset=="target"', { |
| 6150 'ldflags': [ | 6150 'ldflags': [ |
| 6151 '-Wl,--plugin-opt,O1', | 6151 '-Wl,--plugin-opt,O1', |
| 6152 # Allows the linker to apply ICF to the LTO object file. Also, whe
n |
| 6153 # targeting ARM, wWithout this flag, LTO produces a .text section |
| 6154 # that is larger than the maximum call displacement, preventing th
e |
| 6155 # linker from relocating calls (http://llvm.org/PR22999). |
| 6156 '-Wl,--plugin-opt,-function-sections', |
| 6152 ], | 6157 ], |
| 6153 }], | 6158 }], |
| 6154 ['_toolset=="target" and _type!="static_library"', { | 6159 ['_toolset=="target" and _type!="static_library"', { |
| 6155 'xcode_settings': { | 6160 'xcode_settings': { |
| 6156 'OTHER_LDFLAGS': [ | 6161 'OTHER_LDFLAGS': [ |
| 6157 '-Wl,-mllvm,-O1', | 6162 '-Wl,-mllvm,-O1', |
| 6158 ], | 6163 ], |
| 6159 }, | 6164 }, |
| 6160 }], | 6165 }], |
| 6161 ], | 6166 ], |
| 6162 'msvs_settings': { | 6167 'msvs_settings': { |
| 6163 'VCLinkerTool': { | 6168 'VCLinkerTool': { |
| 6164 'AdditionalOptions': [ | 6169 'AdditionalOptions': [ |
| 6165 '/opt:lldlto=1', | 6170 '/opt:lldlto=1', |
| 6166 ], | 6171 ], |
| 6167 }, | 6172 }, |
| 6168 }, | 6173 }, |
| 6169 }, | 6174 }, |
| 6170 }], | 6175 }], |
| 6171 ['use_lto==1 and clang==1 and target_arch=="arm"', { | |
| 6172 'target_defaults': { | |
| 6173 'target_conditions': [ | |
| 6174 ['_toolset=="target"', { | |
| 6175 # Without this flag, LTO produces a .text section that is larger | |
| 6176 # than the maximum call displacement, preventing the linker from | |
| 6177 # relocating calls (http://llvm.org/PR22999). | |
| 6178 'ldflags': [ | |
| 6179 '-Wl,-plugin-opt,-function-sections', | |
| 6180 ], | |
| 6181 }], | |
| 6182 ], | |
| 6183 }, | |
| 6184 }], | |
| 6185 ['(use_lto==1 or use_lto_o2==1) and clang==0', { | 6176 ['(use_lto==1 or use_lto_o2==1) and clang==0', { |
| 6186 'target_defaults': { | 6177 'target_defaults': { |
| 6187 'target_conditions': [ | 6178 'target_conditions': [ |
| 6188 ['_toolset=="target"', { | 6179 ['_toolset=="target"', { |
| 6189 'ldflags': [ | 6180 'ldflags': [ |
| 6190 '-flto=32', | 6181 '-flto=32', |
| 6191 ], | 6182 ], |
| 6192 }], | 6183 }], |
| 6193 ], | 6184 ], |
| 6194 }, | 6185 }, |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6320 '-fsanitize-blacklist=<(cfi_blacklist)', | 6311 '-fsanitize-blacklist=<(cfi_blacklist)', |
| 6321 '-Xclang', | 6312 '-Xclang', |
| 6322 '-fsanitize-blacklist=../../<(make_clang_dir)/lib/clang/<!(pyt
hon <(DEPTH)/tools/clang/scripts/update.py --print-clang-version)/cfi_blacklist.
txt', | 6313 '-fsanitize-blacklist=../../<(make_clang_dir)/lib/clang/<!(pyt
hon <(DEPTH)/tools/clang/scripts/update.py --print-clang-version)/cfi_blacklist.
txt', |
| 6323 ], | 6314 ], |
| 6324 }, | 6315 }, |
| 6325 }, | 6316 }, |
| 6326 }], | 6317 }], |
| 6327 ], | 6318 ], |
| 6328 }, | 6319 }, |
| 6329 }], | 6320 }], |
| 6321 # TODO(pcc): Make these flags work correctly with CFI. |
| 6322 ['use_lto!=0 and cfi_vptr==0', { |
| 6323 'target_defaults': { |
| 6324 'target_conditions': [ |
| 6325 ['_toolset=="target"', { |
| 6326 'cflags': [ |
| 6327 '-fwhole-program-vtables', |
| 6328 # TODO(pcc): Remove this flag once the upstream interface change |
| 6329 # (http://reviews.llvm.org/D18635) lands. |
| 6330 '-fwhole-program-vtables-blacklist=<(cfi_blacklist)', |
| 6331 ], |
| 6332 'ldflags': [ |
| 6333 '-fwhole-program-vtables', |
| 6334 ], |
| 6335 }], |
| 6336 ], |
| 6337 }, |
| 6338 }], |
| 6330 ], | 6339 ], |
| 6331 'xcode_settings': { | 6340 'xcode_settings': { |
| 6332 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! | 6341 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 6333 # This block adds *project-wide* configuration settings to each project | 6342 # This block adds *project-wide* configuration settings to each project |
| 6334 # file. It's almost always wrong to put things here. Specify your | 6343 # file. It's almost always wrong to put things here. Specify your |
| 6335 # custom xcode_settings in target_defaults to add them to targets instead. | 6344 # custom xcode_settings in target_defaults to add them to targets instead. |
| 6336 | 6345 |
| 6337 'conditions': [ | 6346 'conditions': [ |
| 6338 # In an Xcode Project Info window, the "Base SDK for All Configurations" | 6347 # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 6339 # setting sets the SDK on a project-wide basis. In order to get the | 6348 # setting sets the SDK on a project-wide basis. In order to get the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6376 # settings in target dicts. SYMROOT is a special case, because many other | 6385 # settings in target dicts. SYMROOT is a special case, because many other |
| 6377 # Xcode variables depend on it, including variables such as | 6386 # Xcode variables depend on it, including variables such as |
| 6378 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6387 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 6379 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6388 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 6380 # files to appear (when present) in the UI as actual files and not red | 6389 # files to appear (when present) in the UI as actual files and not red |
| 6381 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6390 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 6382 # and therefore SYMROOT, needs to be set at the project level. | 6391 # and therefore SYMROOT, needs to be set at the project level. |
| 6383 'SYMROOT': '<(DEPTH)/xcodebuild', | 6392 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 6384 }, | 6393 }, |
| 6385 } | 6394 } |
| OLD | NEW |