| 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/ccache.gni") | 9 import("//build/toolchain/ccache.gni") |
| 10 | 10 |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 568 |
| 569 if (is_nacl) { | 569 if (is_nacl) { |
| 570 configs += [ "//build/config/nacl:compiler_codegen" ] | 570 configs += [ "//build/config/nacl:compiler_codegen" ] |
| 571 } else if (is_posix && !is_mac && !is_ios) { | 571 } else if (is_posix && !is_mac && !is_ios) { |
| 572 if (current_cpu == "x86") { | 572 if (current_cpu == "x86") { |
| 573 if (is_clang) { | 573 if (is_clang) { |
| 574 cflags += [ | 574 cflags += [ |
| 575 # Else building libyuv gives clang's register allocator issues, | 575 # Else building libyuv gives clang's register allocator issues, |
| 576 # see llvm.org/PR15798 / crbug.com/233709 | 576 # see llvm.org/PR15798 / crbug.com/233709 |
| 577 "-momit-leaf-frame-pointer", | 577 "-momit-leaf-frame-pointer", |
| 578 | |
| 579 # Align the stack on 16-byte boundaries, http://crbug.com/418554. | |
| 580 "-mstack-alignment=16", | |
| 581 "-mstackrealign", | |
| 582 ] | 578 ] |
| 583 } | 579 } |
| 584 } else if (current_cpu == "arm") { | 580 } else if (current_cpu == "arm") { |
| 585 if (!is_clang) { | 581 if (!is_clang) { |
| 586 # Clang doesn't support these flags. | 582 # Clang doesn't support these flags. |
| 587 cflags += [ | 583 cflags += [ |
| 588 # The tree-sra optimization (scalar replacement for | 584 # The tree-sra optimization (scalar replacement for |
| 589 # aggregates enabling subsequent optimizations) leads to | 585 # aggregates enabling subsequent optimizations) leads to |
| 590 # invalid code generation when using the Android NDK's | 586 # invalid code generation when using the Android NDK's |
| 591 # compiler (r5-r7). This can be verified using | 587 # compiler (r5-r7). This can be verified using |
| 592 # webkit_unit_tests' WTF.Checked_int8_t test. | 588 # webkit_unit_tests' WTF.Checked_int8_t test. |
| 593 "-fno-tree-sra", | 589 "-fno-tree-sra", |
| 594 | 590 |
| 595 # The following option is disabled to improve binary | 591 # The following option is disabled to improve binary |
| 596 # size and performance in gcc 4.9. | 592 # size and performance in gcc 4.9. |
| 597 "-fno-caller-saves", | 593 "-fno-caller-saves", |
| 598 ] | 594 ] |
| 599 } | 595 } |
| 600 } | 596 } |
| 601 } | 597 } |
| 602 | 598 |
| 603 asmflags = cflags | 599 asmflags = cflags |
| 604 } | 600 } |
| 605 | 601 |
| 602 # This is separate from :compiler_codegen (and not even a sub-config there) |
| 603 # so that some targets can remove it from the list with: |
| 604 # configs -= [ "//build/config/compiler:clang_stackrealign" ] |
| 605 # See https://crbug.com/556393 for details of where it must be avoided. |
| 606 config("clang_stackrealign") { |
| 607 if (is_clang && current_cpu == "x86" && !is_nacl) { |
| 608 cflags = [ |
| 609 # Align the stack on 16-byte boundaries, http://crbug.com/418554. |
| 610 "-mstack-alignment=16", |
| 611 "-mstackrealign", |
| 612 ] |
| 613 } |
| 614 } |
| 615 |
| 606 config("compiler_arm_fpu") { | 616 config("compiler_arm_fpu") { |
| 607 if (current_cpu == "arm" && !is_ios && !is_nacl) { | 617 if (current_cpu == "arm" && !is_ios && !is_nacl) { |
| 608 cflags = [ "-mfpu=$arm_fpu" ] | 618 cflags = [ "-mfpu=$arm_fpu" ] |
| 609 asmflags = cflags | 619 asmflags = cflags |
| 610 } | 620 } |
| 611 } | 621 } |
| 612 | 622 |
| 613 # runtime_library ------------------------------------------------------------- | 623 # runtime_library ------------------------------------------------------------- |
| 614 # | 624 # |
| 615 # Sets the runtime library and associated options. | 625 # Sets the runtime library and associated options. |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 if (symbol_level == 0) { | 1296 if (symbol_level == 0) { |
| 1287 configs = [ ":no_symbols" ] | 1297 configs = [ ":no_symbols" ] |
| 1288 } else if (symbol_level == 1) { | 1298 } else if (symbol_level == 1) { |
| 1289 configs = [ ":minimal_symbols" ] | 1299 configs = [ ":minimal_symbols" ] |
| 1290 } else if (symbol_level == 2) { | 1300 } else if (symbol_level == 2) { |
| 1291 configs = [ ":symbols" ] | 1301 configs = [ ":symbols" ] |
| 1292 } else { | 1302 } else { |
| 1293 assert(false) | 1303 assert(false) |
| 1294 } | 1304 } |
| 1295 } | 1305 } |
| OLD | NEW |