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

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

Issue 1395573003: Build nacl_helper_nonsfi with GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup the compiler configuration Created 5 years, 2 months 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
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/ccache.gni") 9 import("//build/toolchain/ccache.gni")
10 10
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
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",
Mark Seaborn 2015/10/22 21:48:30 I assume the GN formatter wants to put this on a s
Petr Hosek 2015/10/23 03:01:15 Yes.
458 "--pnacl-bias=x86-32-nonsfi",
459 "--target=i686-unknown-nacl",
460 ]
461 ldflags += [
462 "-arch",
463 "x86-32-nonsfi",
464 ]
465 } else if (target_cpu == "arm") {
466 cflags += [
467 "-arch",
468 "arm-nonsfi",
469 "--pnacl-bias=arm-nonsfi",
470 ]
471 ldflags += [
472 "-arch",
473 "arm-nonsfi",
474 ]
475 }
453 } 476 }
454 } 477 }
455 478
456 asmflags = cflags 479 asmflags = cflags
457 } 480 }
458 481
459 # This provides options to tweak code generation that are necessary 482 # This provides options to tweak code generation that are necessary
460 # for particular Chromium code or for working around particular 483 # for particular Chromium code or for working around particular
461 # compiler bugs (or the combination of the two). 484 # compiler bugs (or the combination of the two).
462 config("compiler_codegen") { 485 config("compiler_codegen") {
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 if (!is_nacl) { 774 if (!is_nacl) {
752 # Flags NaCl (Clang 3.7) does not recognize. 775 # Flags NaCl (Clang 3.7) does not recognize.
753 cflags += [ 776 cflags += [
754 # TODO(thakis): Enable this, crbug.com/507717 777 # TODO(thakis): Enable this, crbug.com/507717
755 "-Wno-shift-negative-value", 778 "-Wno-shift-negative-value",
756 779
757 # TODO(thakis): Consider enabling this? 780 # TODO(thakis): Consider enabling this?
758 "-Wno-bitfield-width", 781 "-Wno-bitfield-width",
759 ] 782 ]
760 } 783 }
784
785 if (is_nacl_nonsfi) {
786 cflags += [
787 # Disables
788 "-Wno-c++11-extensions",
789 "-Wno-char-subscripts",
790 "-Wno-extra-semi",
791 "-Wno-unnamed-type-template-args",
792 "-Wno-unused-private-field",
793 "-Wno-unused-function",
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698