| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
| 9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
| 10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 } | 458 } |
| 459 | 459 |
| 460 # Allows the linker to apply ICF to the LTO object file. Also, when | 460 # Allows the linker to apply ICF to the LTO object file. Also, when |
| 461 # targeting ARM, without this flag, LTO produces a .text section that is | 461 # targeting ARM, without this flag, LTO produces a .text section that is |
| 462 # larger than the maximum call displacement, preventing the linker from | 462 # larger than the maximum call displacement, preventing the linker from |
| 463 # relocating calls (http://llvm.org/PR22999). | 463 # relocating calls (http://llvm.org/PR22999). |
| 464 if (is_linux) { | 464 if (is_linux) { |
| 465 ldflags += [ "-Wl,-plugin-opt,-function-sections" ] | 465 ldflags += [ "-Wl,-plugin-opt,-function-sections" ] |
| 466 } | 466 } |
| 467 | 467 |
| 468 # TODO(pcc): Make these flags work correctly with CFI. | 468 cflags += [ "-fwhole-program-vtables" ] |
| 469 if (!is_cfi) { | 469 ldflags += [ "-fwhole-program-vtables" ] |
| 470 cflags += [ "-fwhole-program-vtables" ] | |
| 471 ldflags += [ "-fwhole-program-vtables" ] | |
| 472 } | |
| 473 } | 470 } |
| 474 | 471 |
| 475 # Pass the same C/C++ flags to the objective C/C++ compiler. | 472 # Pass the same C/C++ flags to the objective C/C++ compiler. |
| 476 cflags_objc += cflags_c | 473 cflags_objc += cflags_c |
| 477 cflags_objcc += cflags_cc | 474 cflags_objcc += cflags_cc |
| 478 | 475 |
| 479 # Assign any flags set for the C compiler to asmflags so that they are sent | 476 # Assign any flags set for the C compiler to asmflags so that they are sent |
| 480 # to the assembler. The Windows assembler takes different types of flags | 477 # to the assembler. The Windows assembler takes different types of flags |
| 481 # so only do so for posix platforms. | 478 # so only do so for posix platforms. |
| 482 if (is_posix) { | 479 if (is_posix) { |
| (...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1563 | 1560 |
| 1564 if (is_ios || is_mac) { | 1561 if (is_ios || is_mac) { |
| 1565 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1562 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1566 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1563 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1567 config("enable_arc") { | 1564 config("enable_arc") { |
| 1568 common_flags = [ "-fobjc-arc" ] | 1565 common_flags = [ "-fobjc-arc" ] |
| 1569 cflags_objc = common_flags | 1566 cflags_objc = common_flags |
| 1570 cflags_objcc = common_flags | 1567 cflags_objcc = common_flags |
| 1571 } | 1568 } |
| 1572 } | 1569 } |
| OLD | NEW |