| 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 if (current_cpu == "arm") { | 7 if (current_cpu == "arm") { |
| 8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
| 9 } | 9 } |
| 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 # Else building libyuv gives clang's register allocator issues, | 396 # Else building libyuv gives clang's register allocator issues, |
| 397 # see llvm.org/PR15798 / crbug.com/233709 | 397 # see llvm.org/PR15798 / crbug.com/233709 |
| 398 "-momit-leaf-frame-pointer", | 398 "-momit-leaf-frame-pointer", |
| 399 | 399 |
| 400 # Align the stack on 16-byte boundaries, http://crbug.com/418554. | 400 # Align the stack on 16-byte boundaries, http://crbug.com/418554. |
| 401 "-mstack-alignment=16", | 401 "-mstack-alignment=16", |
| 402 "-mstackrealign", | 402 "-mstackrealign", |
| 403 ] | 403 ] |
| 404 } | 404 } |
| 405 } else if (current_cpu == "arm") { | 405 } else if (current_cpu == "arm") { |
| 406 cflags += [ | 406 if (!is_nacl) { |
| 407 "-march=$arm_arch", | 407 cflags += [ |
| 408 "-mfloat-abi=$arm_float_abi", | 408 "-march=$arm_arch", |
| 409 ] | 409 "-mfloat-abi=$arm_float_abi", |
| 410 ] |
| 411 if (arm_use_thumb) { |
| 412 cflags += [ "-mthumb" ] |
| 413 if (is_android && !is_clang) { |
| 414 # Clang doesn't support this option. |
| 415 cflags += [ "-mthumb-interwork" ] |
| 416 } |
| 417 } |
| 418 } |
| 410 if (arm_tune != "") { | 419 if (arm_tune != "") { |
| 411 cflags += [ "-mtune=$arm_tune" ] | 420 cflags += [ "-mtune=$arm_tune" ] |
| 412 } | 421 } |
| 413 if (arm_use_thumb) { | |
| 414 cflags += [ "-mthumb" ] | |
| 415 if (is_android && !is_clang) { # Clang doesn't support this option. | |
| 416 cflags += [ "-mthumb-interwork" ] | |
| 417 } | |
| 418 } | |
| 419 if (!is_clang) { | 422 if (!is_clang) { |
| 420 # Clang doesn't support these flags. | 423 # Clang doesn't support these flags. |
| 421 cflags += [ | 424 cflags += [ |
| 422 # The tree-sra optimization (scalar replacement for | 425 # The tree-sra optimization (scalar replacement for |
| 423 # aggregates enabling subsequent optimizations) leads to | 426 # aggregates enabling subsequent optimizations) leads to |
| 424 # invalid code generation when using the Android NDK's | 427 # invalid code generation when using the Android NDK's |
| 425 # compiler (r5-r7). This can be verified using | 428 # compiler (r5-r7). This can be verified using |
| 426 # webkit_unit_tests' WTF.Checked_int8_t test. | 429 # webkit_unit_tests' WTF.Checked_int8_t test. |
| 427 "-fno-tree-sra", | 430 "-fno-tree-sra", |
| 428 | 431 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 ] | 693 ] |
| 691 } | 694 } |
| 692 } | 695 } |
| 693 | 696 |
| 694 # Pass the same C/C++ flags to the objective C/C++ compiler. | 697 # Pass the same C/C++ flags to the objective C/C++ compiler. |
| 695 cflags_objc += cflags_c | 698 cflags_objc += cflags_c |
| 696 cflags_objcc += cflags_cc | 699 cflags_objcc += cflags_cc |
| 697 } | 700 } |
| 698 | 701 |
| 699 config("compiler_arm_fpu") { | 702 config("compiler_arm_fpu") { |
| 700 if (current_cpu == "arm" && !is_ios) { | 703 if (current_cpu == "arm" && !is_ios && !is_nacl) { |
| 701 cflags = [ "-mfpu=$arm_fpu" ] | 704 cflags = [ "-mfpu=$arm_fpu" ] |
| 702 } | 705 } |
| 703 } | 706 } |
| 704 | 707 |
| 705 # runtime_library ------------------------------------------------------------- | 708 # runtime_library ------------------------------------------------------------- |
| 706 # | 709 # |
| 707 # Sets the runtime library and associated options. | 710 # Sets the runtime library and associated options. |
| 708 # | 711 # |
| 709 # How do you determine what should go in here vs. "compiler" above? Consider if | 712 # How do you determine what should go in here vs. "compiler" above? Consider if |
| 710 # a target might choose to use a different runtime library (ignore for a moment | 713 # a target might choose to use a different runtime library (ignore for a moment |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 cflags += [ "-gsplit-dwarf" ] | 1414 cflags += [ "-gsplit-dwarf" ] |
| 1412 } | 1415 } |
| 1413 } | 1416 } |
| 1414 } | 1417 } |
| 1415 | 1418 |
| 1416 config("no_symbols") { | 1419 config("no_symbols") { |
| 1417 if (!is_win) { | 1420 if (!is_win) { |
| 1418 cflags = [ "-g0" ] | 1421 cflags = [ "-g0" ] |
| 1419 } | 1422 } |
| 1420 } | 1423 } |
| OLD | NEW |