| 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 } else if (current_cpu == "arm") { | 527 } else if (current_cpu == "arm") { |
| 528 if (is_clang && !is_android && !is_nacl) { | 528 if (is_clang && !is_android && !is_nacl) { |
| 529 cflags += [ "--target=arm-linux-gnueabihf" ] | 529 cflags += [ "--target=arm-linux-gnueabihf" ] |
| 530 ldflags += [ "--target=arm-linux-gnueabihf" ] | 530 ldflags += [ "--target=arm-linux-gnueabihf" ] |
| 531 } | 531 } |
| 532 if (!is_nacl) { | 532 if (!is_nacl) { |
| 533 cflags += [ | 533 cflags += [ |
| 534 "-march=$arm_arch", | 534 "-march=$arm_arch", |
| 535 "-mfloat-abi=$arm_float_abi", | 535 "-mfloat-abi=$arm_float_abi", |
| 536 ] | 536 ] |
| 537 if (arm_use_thumb) { | |
| 538 cflags += [ "-mthumb" ] | |
| 539 if (is_android && !is_clang) { | |
| 540 # Clang doesn't support this option. | |
| 541 cflags += [ "-mthumb-interwork" ] | |
| 542 } | |
| 543 } | |
| 544 } | 537 } |
| 545 if (arm_tune != "") { | 538 if (arm_tune != "") { |
| 546 cflags += [ "-mtune=$arm_tune" ] | 539 cflags += [ "-mtune=$arm_tune" ] |
| 547 } | 540 } |
| 548 } else if (current_cpu == "arm64") { | 541 } else if (current_cpu == "arm64") { |
| 549 if (is_clang && !is_android && !is_nacl) { | 542 if (is_clang && !is_android && !is_nacl) { |
| 550 cflags += [ "--target=aarch64-linux-gnu" ] | 543 cflags += [ "--target=aarch64-linux-gnu" ] |
| 551 ldflags += [ "--target=aarch64-linux-gnu" ] | 544 ldflags += [ "--target=aarch64-linux-gnu" ] |
| 552 } | 545 } |
| 553 } else if (current_cpu == "mipsel" && !is_nacl) { | 546 } else if (current_cpu == "mipsel" && !is_nacl) { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 } | 751 } |
| 759 } | 752 } |
| 760 | 753 |
| 761 config("compiler_arm_fpu") { | 754 config("compiler_arm_fpu") { |
| 762 if (current_cpu == "arm" && !is_ios && !is_nacl) { | 755 if (current_cpu == "arm" && !is_ios && !is_nacl) { |
| 763 cflags = [ "-mfpu=$arm_fpu" ] | 756 cflags = [ "-mfpu=$arm_fpu" ] |
| 764 asmflags = cflags | 757 asmflags = cflags |
| 765 } | 758 } |
| 766 } | 759 } |
| 767 | 760 |
| 761 config("compiler_arm_thumb") { |
| 762 if (current_cpu == "arm" && arm_use_thumb && is_posix && |
| 763 !(is_mac || is_ios || is_nacl)) { |
| 764 cflags = [ "-mthumb" ] |
| 765 if (is_android && !is_clang) { |
| 766 # Clang doesn't support this option. |
| 767 cflags += [ "-mthumb-interwork" ] |
| 768 } |
| 769 } |
| 770 } |
| 771 |
| 768 # runtime_library ------------------------------------------------------------- | 772 # runtime_library ------------------------------------------------------------- |
| 769 # | 773 # |
| 770 # Sets the runtime library and associated options. | 774 # Sets the runtime library and associated options. |
| 771 # | 775 # |
| 772 # How do you determine what should go in here vs. "compiler" above? Consider if | 776 # How do you determine what should go in here vs. "compiler" above? Consider if |
| 773 # a target might choose to use a different runtime library (ignore for a moment | 777 # a target might choose to use a different runtime library (ignore for a moment |
| 774 # if this is possible or reasonable on your system). If such a target would want | 778 # if this is possible or reasonable on your system). If such a target would want |
| 775 # to change or remove your option, put it in the runtime_library config. If a | 779 # to change or remove your option, put it in the runtime_library config. If a |
| 776 # target wants the option regardless, put it in the compiler config. | 780 # target wants the option regardless, put it in the compiler config. |
| 777 | 781 |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1607 | 1611 |
| 1608 if (is_ios || is_mac) { | 1612 if (is_ios || is_mac) { |
| 1609 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1613 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1610 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1614 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1611 config("enable_arc") { | 1615 config("enable_arc") { |
| 1612 common_flags = [ "-fobjc-arc" ] | 1616 common_flags = [ "-fobjc-arc" ] |
| 1613 cflags_objc = common_flags | 1617 cflags_objc = common_flags |
| 1614 cflags_objcc = common_flags | 1618 cflags_objcc = common_flags |
| 1615 } | 1619 } |
| 1616 } | 1620 } |
| OLD | NEW |