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 6104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6115 }, | 6115 }, |
6116 }, | 6116 }, |
6117 }], | 6117 }], |
6118 # Apply a lower LTO optimization level as the default is too slow. | 6118 # Apply a lower LTO optimization level as the default is too slow. |
6119 ['use_lto==1 and clang==1', { | 6119 ['use_lto==1 and clang==1', { |
6120 'target_defaults': { | 6120 'target_defaults': { |
6121 'target_conditions': [ | 6121 'target_conditions': [ |
6122 ['_toolset=="target"', { | 6122 ['_toolset=="target"', { |
6123 'ldflags': [ | 6123 'ldflags': [ |
6124 '-Wl,--plugin-opt,O1', | 6124 '-Wl,--plugin-opt,O1', |
| 6125 # Allows the linker to apply ICF to the LTO object file. Also, whe
n |
| 6126 # targeting ARM, wWithout this flag, LTO produces a .text section |
| 6127 # that is larger than the maximum call displacement, preventing th
e |
| 6128 # linker from relocating calls (http://llvm.org/PR22999). |
| 6129 '-Wl,--plugin-opt,-function-sections', |
6125 ], | 6130 ], |
6126 }], | 6131 }], |
6127 ['_toolset=="target" and _type!="static_library"', { | 6132 ['_toolset=="target" and _type!="static_library"', { |
6128 'xcode_settings': { | 6133 'xcode_settings': { |
6129 'OTHER_LDFLAGS': [ | 6134 'OTHER_LDFLAGS': [ |
6130 '-Wl,-mllvm,-O1', | 6135 '-Wl,-mllvm,-O1', |
6131 ], | 6136 ], |
6132 }, | 6137 }, |
6133 }], | 6138 }], |
6134 ], | 6139 ], |
6135 'msvs_settings': { | 6140 'msvs_settings': { |
6136 'VCLinkerTool': { | 6141 'VCLinkerTool': { |
6137 'AdditionalOptions': [ | 6142 'AdditionalOptions': [ |
6138 '/opt:lldlto=1', | 6143 '/opt:lldlto=1', |
6139 ], | 6144 ], |
6140 }, | 6145 }, |
6141 }, | 6146 }, |
6142 }, | 6147 }, |
6143 }], | 6148 }], |
6144 ['use_lto==1 and clang==1 and target_arch=="arm"', { | |
6145 'target_defaults': { | |
6146 'target_conditions': [ | |
6147 ['_toolset=="target"', { | |
6148 # Without this flag, LTO produces a .text section that is larger | |
6149 # than the maximum call displacement, preventing the linker from | |
6150 # relocating calls (http://llvm.org/PR22999). | |
6151 'ldflags': [ | |
6152 '-Wl,-plugin-opt,-function-sections', | |
6153 ], | |
6154 }], | |
6155 ], | |
6156 }, | |
6157 }], | |
6158 ['(use_lto==1 or use_lto_o2==1) and clang==0', { | 6149 ['(use_lto==1 or use_lto_o2==1) and clang==0', { |
6159 'target_defaults': { | 6150 'target_defaults': { |
6160 'target_conditions': [ | 6151 'target_conditions': [ |
6161 ['_toolset=="target"', { | 6152 ['_toolset=="target"', { |
6162 'ldflags': [ | 6153 'ldflags': [ |
6163 '-flto=32', | 6154 '-flto=32', |
6164 ], | 6155 ], |
6165 }], | 6156 }], |
6166 ], | 6157 ], |
6167 }, | 6158 }, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6293 '-fsanitize-blacklist=<(cfi_blacklist)', | 6284 '-fsanitize-blacklist=<(cfi_blacklist)', |
6294 '-Xclang', | 6285 '-Xclang', |
6295 '-fsanitize-blacklist=../../<(make_clang_dir)/lib/clang/<!(pyt
hon <(DEPTH)/tools/clang/scripts/update.py --print-clang-version)/cfi_blacklist.
txt', | 6286 '-fsanitize-blacklist=../../<(make_clang_dir)/lib/clang/<!(pyt
hon <(DEPTH)/tools/clang/scripts/update.py --print-clang-version)/cfi_blacklist.
txt', |
6296 ], | 6287 ], |
6297 }, | 6288 }, |
6298 }, | 6289 }, |
6299 }], | 6290 }], |
6300 ], | 6291 ], |
6301 }, | 6292 }, |
6302 }], | 6293 }], |
| 6294 # TODO(pcc): Make these flags work correctly with CFI. |
| 6295 ['use_lto!=0 and cfi_vptr==0', { |
| 6296 'target_defaults': { |
| 6297 'target_conditions': [ |
| 6298 ['_toolset=="target"', { |
| 6299 'cflags': [ |
| 6300 '-fwhole-program-vtables', |
| 6301 # TODO(pcc): Remove this flag once the upstream interface change |
| 6302 # (http://reviews.llvm.org/D18635) lands. |
| 6303 '-fwhole-program-vtables-blacklist=<(cfi_blacklist)', |
| 6304 ], |
| 6305 'ldflags': [ |
| 6306 '-fwhole-program-vtables', |
| 6307 ], |
| 6308 }], |
| 6309 ], |
| 6310 }, |
| 6311 }], |
6303 ], | 6312 ], |
6304 'xcode_settings': { | 6313 'xcode_settings': { |
6305 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! | 6314 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
6306 # This block adds *project-wide* configuration settings to each project | 6315 # This block adds *project-wide* configuration settings to each project |
6307 # file. It's almost always wrong to put things here. Specify your | 6316 # file. It's almost always wrong to put things here. Specify your |
6308 # custom xcode_settings in target_defaults to add them to targets instead. | 6317 # custom xcode_settings in target_defaults to add them to targets instead. |
6309 | 6318 |
6310 'conditions': [ | 6319 'conditions': [ |
6311 # In an Xcode Project Info window, the "Base SDK for All Configurations" | 6320 # In an Xcode Project Info window, the "Base SDK for All Configurations" |
6312 # setting sets the SDK on a project-wide basis. In order to get the | 6321 # 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... |
6349 # settings in target dicts. SYMROOT is a special case, because many other | 6358 # settings in target dicts. SYMROOT is a special case, because many other |
6350 # Xcode variables depend on it, including variables such as | 6359 # Xcode variables depend on it, including variables such as |
6351 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6360 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6352 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6361 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6353 # files to appear (when present) in the UI as actual files and not red | 6362 # files to appear (when present) in the UI as actual files and not red |
6354 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6363 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6355 # and therefore SYMROOT, needs to be set at the project level. | 6364 # and therefore SYMROOT, needs to be set at the project level. |
6356 'SYMROOT': '<(DEPTH)/xcodebuild', | 6365 'SYMROOT': '<(DEPTH)/xcodebuild', |
6357 }, | 6366 }, |
6358 } | 6367 } |
OLD | NEW |