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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 "-Wa,-mips64r6", | 443 "-Wa,-mips64r6", |
444 ] | 444 ] |
445 ldflags += [ "-mips64r6" ] | 445 ldflags += [ "-mips64r6" ] |
446 } else if (mips_arch_variant == "r2") { | 446 } else if (mips_arch_variant == "r2") { |
447 cflags += [ | 447 cflags += [ |
448 "-mips64r2", | 448 "-mips64r2", |
449 "-Wa,-mips64r2", | 449 "-Wa,-mips64r2", |
450 ] | 450 ] |
451 ldflags += [ "-mips64r2" ] | 451 ldflags += [ "-mips64r2" ] |
452 } | 452 } |
| 453 } else if (current_cpu == "pnacl" && is_nacl_nonsfi) { |
| 454 if (target_cpu == "x86" || target_cpu == "x64") { |
| 455 cflags += [ |
| 456 "-arch", |
| 457 "x86-32-nonsfi", |
| 458 "--pnacl-bias=x86-32-nonsfi", |
| 459 "--target=i686-unknown-nacl", |
| 460 ] |
| 461 ldflags += [ |
| 462 "-arch", |
| 463 "x86-32-nonsfi", |
| 464 "--target=i686-unknown-nacl", |
| 465 ] |
| 466 } else if (target_cpu == "arm") { |
| 467 cflags += [ |
| 468 "-arch", |
| 469 "arm-nonsfi", |
| 470 "--pnacl-bias=arm-nonsfi", |
| 471 ] |
| 472 ldflags += [ |
| 473 "-arch", |
| 474 "arm-nonsfi", |
| 475 ] |
| 476 } |
453 } | 477 } |
454 } | 478 } |
455 | 479 |
456 asmflags = cflags | 480 asmflags = cflags |
457 } | 481 } |
458 | 482 |
459 # This provides options to tweak code generation that are necessary | 483 # This provides options to tweak code generation that are necessary |
460 # for particular Chromium code or for working around particular | 484 # for particular Chromium code or for working around particular |
461 # compiler bugs (or the combination of the two). | 485 # compiler bugs (or the combination of the two). |
462 config("compiler_codegen") { | 486 config("compiler_codegen") { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 if (!is_nacl) { | 775 if (!is_nacl) { |
752 # Flags NaCl (Clang 3.7) does not recognize. | 776 # Flags NaCl (Clang 3.7) does not recognize. |
753 cflags += [ | 777 cflags += [ |
754 # TODO(thakis): Enable this, crbug.com/507717 | 778 # TODO(thakis): Enable this, crbug.com/507717 |
755 "-Wno-shift-negative-value", | 779 "-Wno-shift-negative-value", |
756 | 780 |
757 # TODO(thakis): Consider enabling this? | 781 # TODO(thakis): Consider enabling this? |
758 "-Wno-bitfield-width", | 782 "-Wno-bitfield-width", |
759 ] | 783 ] |
760 } | 784 } |
| 785 |
| 786 if (is_nacl_nonsfi) { |
| 787 cflags += [ |
| 788 # TODO(phosek): There are number of platform specific functions in |
| 789 # seccomp-bpf syscall helpers which need to be wrapped in appropriate |
| 790 # macro checks. |
| 791 "-Wno-unused-function", |
| 792 |
| 793 # TODO(phosek): Enable this after fixing NaCl IRT. |
| 794 "-Wno-sign-compare", |
| 795 ] |
| 796 } |
761 } | 797 } |
762 } | 798 } |
763 | 799 |
764 # chromium_code --------------------------------------------------------------- | 800 # chromium_code --------------------------------------------------------------- |
765 # | 801 # |
766 # Toggles between higher and lower warnings for code that is (or isn't) | 802 # Toggles between higher and lower warnings for code that is (or isn't) |
767 # part of Chromium. | 803 # part of Chromium. |
768 | 804 |
769 config("chromium_code") { | 805 config("chromium_code") { |
770 if (is_win) { | 806 if (is_win) { |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 if (symbol_level == 0) { | 1219 if (symbol_level == 0) { |
1184 configs = [ ":no_symbols" ] | 1220 configs = [ ":no_symbols" ] |
1185 } else if (symbol_level == 1) { | 1221 } else if (symbol_level == 1) { |
1186 configs = [ ":minimal_symbols" ] | 1222 configs = [ ":minimal_symbols" ] |
1187 } else if (symbol_level == 2) { | 1223 } else if (symbol_level == 2) { |
1188 configs = [ ":symbols" ] | 1224 configs = [ ":symbols" ] |
1189 } else { | 1225 } else { |
1190 assert(false) | 1226 assert(false) |
1191 } | 1227 } |
1192 } | 1228 } |
OLD | NEW |