| 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 ldflags += [ "-m32" ] | 498 ldflags += [ "-m32" ] |
| 499 if (!is_nacl) { | 499 if (!is_nacl) { |
| 500 cflags += [ | 500 cflags += [ |
| 501 "-msse2", | 501 "-msse2", |
| 502 "-mfpmath=sse", | 502 "-mfpmath=sse", |
| 503 "-mmmx", | 503 "-mmmx", |
| 504 ] | 504 ] |
| 505 } | 505 } |
| 506 } else if (current_cpu == "arm") { | 506 } else if (current_cpu == "arm") { |
| 507 if (is_clang && !is_android && !is_nacl) { | 507 if (is_clang && !is_android && !is_nacl) { |
| 508 cflags += [ | 508 cflags += [ "--target=arm-linux-gnueabihf" ] |
| 509 "-target", | 509 ldflags += [ "--target=arm-linux-gnueabihf" ] |
| 510 "arm-linux-gnueabihf", | |
| 511 ] | |
| 512 ldflags += [ | |
| 513 "-target", | |
| 514 "arm-linux-gnueabihf", | |
| 515 ] | |
| 516 } | 510 } |
| 517 if (!is_nacl) { | 511 if (!is_nacl) { |
| 518 cflags += [ | 512 cflags += [ |
| 519 "-march=$arm_arch", | 513 "-march=$arm_arch", |
| 520 "-mfloat-abi=$arm_float_abi", | 514 "-mfloat-abi=$arm_float_abi", |
| 521 ] | 515 ] |
| 522 if (arm_use_thumb) { | 516 if (arm_use_thumb) { |
| 523 cflags += [ "-mthumb" ] | 517 cflags += [ "-mthumb" ] |
| 524 if (is_android && !is_clang) { | 518 if (is_android && !is_clang) { |
| 525 # Clang doesn't support this option. | 519 # Clang doesn't support this option. |
| 526 cflags += [ "-mthumb-interwork" ] | 520 cflags += [ "-mthumb-interwork" ] |
| 527 } | 521 } |
| 528 } | 522 } |
| 529 } | 523 } |
| 530 if (arm_tune != "") { | 524 if (arm_tune != "") { |
| 531 cflags += [ "-mtune=$arm_tune" ] | 525 cflags += [ "-mtune=$arm_tune" ] |
| 532 } | 526 } |
| 533 } else if (current_cpu == "mipsel") { | 527 } else if (current_cpu == "mipsel") { |
| 534 if (mips_arch_variant == "r6") { | 528 if (mips_arch_variant == "r6") { |
| 535 if (is_clang) { | 529 if (is_clang) { |
| 536 cflags += [ | 530 cflags += [ |
| 537 "-target", | 531 "--target=mipsel-linux-gnu", |
| 538 "mipsel-linux-gnu", | |
| 539 "-march=mips32r6", | 532 "-march=mips32r6", |
| 540 ] | 533 ] |
| 541 ldflags += [ | 534 ldflags += [ "--target=mipsel-linux-gnu" ] |
| 542 "-target", | |
| 543 "mipsel-linux-gnu", | |
| 544 ] | |
| 545 } else { | 535 } else { |
| 546 cflags += [ | 536 cflags += [ |
| 547 "-mips32r6", | 537 "-mips32r6", |
| 548 "-Wa,-mips32r6", | 538 "-Wa,-mips32r6", |
| 549 ] | 539 ] |
| 550 if (is_android) { | 540 if (is_android) { |
| 551 ldflags += [ | 541 ldflags += [ |
| 552 "-mips32r6", | 542 "-mips32r6", |
| 553 "-Wl,-melf32ltsmip", | 543 "-Wl,-melf32ltsmip", |
| 554 ] | 544 ] |
| 555 } | 545 } |
| 556 } | 546 } |
| 557 } else if (mips_arch_variant == "r2") { | 547 } else if (mips_arch_variant == "r2") { |
| 558 if (is_clang) { | 548 if (is_clang) { |
| 559 if (is_android) { | 549 if (is_android) { |
| 560 cflags += [ | 550 cflags += [ |
| 561 "-target", | 551 "--target=mipsel-linux-android", |
| 562 "mipsel-linux-android", | |
| 563 "-march=mipsel", | 552 "-march=mipsel", |
| 564 "-mcpu=mips32r2", | 553 "-mcpu=mips32r2", |
| 565 ] | 554 ] |
| 566 ldflags += [ | 555 ldflags += [ "--target=mipsel-linux-android" ] |
| 567 "-target", | |
| 568 "mipsel-linux-android", | |
| 569 ] | |
| 570 } else { | 556 } else { |
| 571 cflags += [ | 557 cflags += [ |
| 572 "-target", | 558 "--target=mipsel-linux-gnu", |
| 573 "mipsel-linux-gnu", | |
| 574 "-march=mipsel", | 559 "-march=mipsel", |
| 575 "-mcpu=mips32r2", | 560 "-mcpu=mips32r2", |
| 576 ] | 561 ] |
| 577 ldflags += [ | 562 ldflags += [ "--target=mipsel-linux-gnu" ] |
| 578 "-target", | |
| 579 "mipsel-linux-gnu", | |
| 580 ] | |
| 581 } | 563 } |
| 582 } else { | 564 } else { |
| 583 cflags += [ | 565 cflags += [ |
| 584 "-mips32r2", | 566 "-mips32r2", |
| 585 "-Wa,-mips32r2", | 567 "-Wa,-mips32r2", |
| 586 ] | 568 ] |
| 587 if (mips_float_abi == "hard" && mips_fpu_mode != "") { | 569 if (mips_float_abi == "hard" && mips_fpu_mode != "") { |
| 588 cflags += [ "-m$mips_fpu_mode" ] | 570 cflags += [ "-m$mips_fpu_mode" ] |
| 589 } | 571 } |
| 590 } | 572 } |
| 591 } else if (mips_arch_variant == "r1") { | 573 } else if (mips_arch_variant == "r1") { |
| 592 if (is_clang) { | 574 if (is_clang) { |
| 593 if (is_android) { | 575 if (is_android) { |
| 594 cflags += [ | 576 cflags += [ |
| 595 "-target", | 577 "--target=mipsel-linux-android", |
| 596 "mipsel-linux-android", | |
| 597 "-march=mipsel", | 578 "-march=mipsel", |
| 598 "-mcpu=mips32", | 579 "-mcpu=mips32", |
| 599 ] | 580 ] |
| 600 ldflags += [ | 581 ldflags += [ "--target=mipsel-linux-android" ] |
| 601 "-target", | |
| 602 "mipsel-linux-android", | |
| 603 ] | |
| 604 } else { | 582 } else { |
| 605 cflags += [ | 583 cflags += [ |
| 606 "-target", | 584 "--target=mipsel-linux-gnu", |
| 607 "mipsel-linux-gnu", | |
| 608 "-march=mipsel", | 585 "-march=mipsel", |
| 609 "-mcpu=mips32", | 586 "-mcpu=mips32", |
| 610 ] | 587 ] |
| 611 ldflags += [ | 588 ldflags += [ "--target=mipsel-linux-gnu" ] |
| 612 "-target", | |
| 613 "mipsel-linux-gnu", | |
| 614 ] | |
| 615 } | 589 } |
| 616 } else { | 590 } else { |
| 617 cflags += [ | 591 cflags += [ |
| 618 "-mips32", | 592 "-mips32", |
| 619 "-Wa,-mips32", | 593 "-Wa,-mips32", |
| 620 ] | 594 ] |
| 621 } | 595 } |
| 622 } | 596 } |
| 623 | 597 |
| 624 if (mips_dsp_rev == 1) { | 598 if (mips_dsp_rev == 1) { |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1465 | 1439 |
| 1466 if (is_ios || is_mac) { | 1440 if (is_ios || is_mac) { |
| 1467 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1441 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1468 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1442 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1469 config("enable_arc") { | 1443 config("enable_arc") { |
| 1470 common_flags = [ "-fobjc-arc" ] | 1444 common_flags = [ "-fobjc-arc" ] |
| 1471 cflags_objc = common_flags | 1445 cflags_objc = common_flags |
| 1472 cflags_objcc = common_flags | 1446 cflags_objcc = common_flags |
| 1473 } | 1447 } |
| 1474 } | 1448 } |
| OLD | NEW |