Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2518423002: Fix tcmalloc arm clang build (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« base/allocator/BUILD.gn ('K') | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } else if (current_cpu == "arm") { 530 } else if (current_cpu == "arm") {
531 if (is_clang && !is_android && !is_nacl) { 531 if (is_clang && !is_android && !is_nacl) {
532 cflags += [ "--target=arm-linux-gnueabihf" ] 532 cflags += [ "--target=arm-linux-gnueabihf" ]
533 ldflags += [ "--target=arm-linux-gnueabihf" ] 533 ldflags += [ "--target=arm-linux-gnueabihf" ]
534 } 534 }
535 if (!is_nacl) { 535 if (!is_nacl) {
536 cflags += [ 536 cflags += [
537 "-march=$arm_arch", 537 "-march=$arm_arch",
538 "-mfloat-abi=$arm_float_abi", 538 "-mfloat-abi=$arm_float_abi",
539 ] 539 ]
540 if (arm_use_thumb) {
541 cflags += [ "-mthumb" ]
542 if (is_android && !is_clang) {
543 # Clang doesn't support this option.
544 cflags += [ "-mthumb-interwork" ]
545 }
546 }
540 } 547 }
541 if (arm_tune != "") { 548 if (arm_tune != "") {
542 cflags += [ "-mtune=$arm_tune" ] 549 cflags += [ "-mtune=$arm_tune" ]
543 } 550 }
544 } else if (current_cpu == "arm64") { 551 } else if (current_cpu == "arm64") {
545 if (is_clang && !is_android && !is_nacl) { 552 if (is_clang && !is_android && !is_nacl) {
546 cflags += [ "--target=aarch64-linux-gnu" ] 553 cflags += [ "--target=aarch64-linux-gnu" ]
547 ldflags += [ "--target=aarch64-linux-gnu" ] 554 ldflags += [ "--target=aarch64-linux-gnu" ]
548 } 555 }
549 } else if (current_cpu == "mipsel" && !is_nacl) { 556 } else if (current_cpu == "mipsel" && !is_nacl) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 } 761 }
755 } 762 }
756 763
757 config("compiler_arm_fpu") { 764 config("compiler_arm_fpu") {
758 if (current_cpu == "arm" && !is_ios && !is_nacl) { 765 if (current_cpu == "arm" && !is_ios && !is_nacl) {
759 cflags = [ "-mfpu=$arm_fpu" ] 766 cflags = [ "-mfpu=$arm_fpu" ]
760 asmflags = cflags 767 asmflags = cflags
761 } 768 }
762 } 769 }
763 770
764 config("compiler_arm_thumb") {
765 if (current_cpu == "arm" && arm_use_thumb && is_posix &&
766 !(is_mac || is_ios || is_nacl)) {
767 cflags = [ "-mthumb" ]
768 if (is_android && !is_clang) {
769 # Clang doesn't support this option.
770 cflags += [ "-mthumb-interwork" ]
771 }
772 }
773 }
774
775 # runtime_library ------------------------------------------------------------- 771 # runtime_library -------------------------------------------------------------
776 # 772 #
777 # Sets the runtime library and associated options. 773 # Sets the runtime library and associated options.
778 # 774 #
779 # How do you determine what should go in here vs. "compiler" above? Consider if 775 # How do you determine what should go in here vs. "compiler" above? Consider if
780 # a target might choose to use a different runtime library (ignore for a moment 776 # a target might choose to use a different runtime library (ignore for a moment
781 # if this is possible or reasonable on your system). If such a target would want 777 # if this is possible or reasonable on your system). If such a target would want
782 # to change or remove your option, put it in the runtime_library config. If a 778 # to change or remove your option, put it in the runtime_library config. If a
783 # target wants the option regardless, put it in the compiler config. 779 # target wants the option regardless, put it in the compiler config.
784 780
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 1610
1615 if (is_ios || is_mac) { 1611 if (is_ios || is_mac) {
1616 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1612 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1617 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1613 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1618 config("enable_arc") { 1614 config("enable_arc") {
1619 common_flags = [ "-fobjc-arc" ] 1615 common_flags = [ "-fobjc-arc" ]
1620 cflags_objc = common_flags 1616 cflags_objc = common_flags
1621 cflags_objcc = common_flags 1617 cflags_objcc = common_flags
1622 } 1618 }
1623 } 1619 }
OLDNEW
« base/allocator/BUILD.gn ('K') | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698