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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 # http://crbug.com/427584 | 319 # http://crbug.com/427584 |
320 cflags_cc += [ "-std=gnu++11" ] | 320 cflags_cc += [ "-std=gnu++11" ] |
321 } else if (!is_win && !is_nacl) { | 321 } else if (!is_win && !is_nacl) { |
322 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | 322 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 |
323 # or c++11; we technically don't need this toolchain any more, but there | 323 # or c++11; we technically don't need this toolchain any more, but there |
324 # are still a few buildbots using it, so until those are turned off | 324 # are still a few buildbots using it, so until those are turned off |
325 # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. | 325 # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. |
326 cflags_cc += [ "-std=c++11" ] | 326 cflags_cc += [ "-std=c++11" ] |
327 } | 327 } |
328 | 328 |
| 329 if (is_nacl_nonsfi) { |
| 330 cflags += [ |
| 331 "--target=i686-unknown-nacl", |
| 332 "--pnacl-bias=x86-32-nonsfi", |
| 333 "-arch", |
| 334 "x86-32-nonsfi", |
| 335 "--pnacl-allow-native", |
| 336 "--pnacl-allow-translate", |
| 337 ] |
| 338 |
| 339 ldflags += [ |
| 340 "-arch", |
| 341 "x86-32-nonsfi", |
| 342 "--pnacl-allow-native", |
| 343 ] |
| 344 |
| 345 include_dirs = [ "//native_client/src/public/linux_syscalls" ] |
| 346 } |
| 347 |
329 # Pass the same C/C++ flags to the objective C/C++ compiler. | 348 # Pass the same C/C++ flags to the objective C/C++ compiler. |
330 cflags_objc += cflags_c | 349 cflags_objc += cflags_c |
331 cflags_objcc += cflags_cc | 350 cflags_objcc += cflags_cc |
332 | 351 |
333 # Assign any flags set for the C compiler to asmflags so that they are sent | 352 # Assign any flags set for the C compiler to asmflags so that they are sent |
334 # to the assembler. The Windows assembler takes different types of flags | 353 # to the assembler. The Windows assembler takes different types of flags |
335 # so only do so for posix platforms. | 354 # so only do so for posix platforms. |
336 if (is_posix) { | 355 if (is_posix) { |
337 asmflags += cflags | 356 asmflags += cflags |
338 asmflags += cflags_c | 357 asmflags += cflags_c |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 if (!is_nacl) { | 755 if (!is_nacl) { |
737 # Flags NaCl (Clang 3.7) does not recognize. | 756 # Flags NaCl (Clang 3.7) does not recognize. |
738 cflags += [ | 757 cflags += [ |
739 # TODO(thakis): Enable this, crbug.com/507717 | 758 # TODO(thakis): Enable this, crbug.com/507717 |
740 "-Wno-shift-negative-value", | 759 "-Wno-shift-negative-value", |
741 | 760 |
742 # TODO(thakis): Consider enabling this? | 761 # TODO(thakis): Consider enabling this? |
743 "-Wno-bitfield-width", | 762 "-Wno-bitfield-width", |
744 ] | 763 ] |
745 } | 764 } |
| 765 |
| 766 if (is_nacl_nonsfi) { |
| 767 cflags += [ |
| 768 # Disables |
| 769 "-Wno-c++11-extensions", |
| 770 "-Wno-char-subscripts", |
| 771 "-Wno-extra-semi", |
| 772 "-Wno-unnamed-type-template-args", |
| 773 "-Wno-unused-private-field", |
| 774 "-Wno-unused-function", |
| 775 "-Wno-sign-compare", |
| 776 ] |
| 777 } |
746 } | 778 } |
747 } | 779 } |
748 | 780 |
749 # chromium_code --------------------------------------------------------------- | 781 # chromium_code --------------------------------------------------------------- |
750 # | 782 # |
751 # Toggles between higher and lower warnings for code that is (or isn't) | 783 # Toggles between higher and lower warnings for code that is (or isn't) |
752 # part of Chromium. | 784 # part of Chromium. |
753 | 785 |
754 config("chromium_code") { | 786 config("chromium_code") { |
755 if (is_win) { | 787 if (is_win) { |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 if (symbol_level == 0) { | 1200 if (symbol_level == 0) { |
1169 configs = [ ":no_symbols" ] | 1201 configs = [ ":no_symbols" ] |
1170 } else if (symbol_level == 1) { | 1202 } else if (symbol_level == 1) { |
1171 configs = [ ":minimal_symbols" ] | 1203 configs = [ ":minimal_symbols" ] |
1172 } else if (symbol_level == 2) { | 1204 } else if (symbol_level == 2) { |
1173 configs = [ ":symbols" ] | 1205 configs = [ ":symbols" ] |
1174 } else { | 1206 } else { |
1175 assert(false) | 1207 assert(false) |
1176 } | 1208 } |
1177 } | 1209 } |
OLD | NEW |