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

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

Issue 562383002: gn: various flag matching for 'base' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default off only for linux Created 6 years, 3 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
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | tools/gn/bin/gyp_flag_compare.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (cpu_arch == "arm") { 6 if (cpu_arch == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 if (is_posix) { 9 if (is_posix) {
10 import("//build/config/gcc/gcc_version.gni") 10 import("//build/config/gcc/gcc_version.gni")
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ] 96 cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ]
97 } 97 }
98 98
99 # Linker warnings. 99 # Linker warnings.
100 if (!(is_chromeos && cpu_arch == "arm") && !is_mac) { 100 if (!(is_chromeos && cpu_arch == "arm") && !is_mac) {
101 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 101 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
102 ldflags += [ "-Wl,--fatal-warnings" ] 102 ldflags += [ "-Wl,--fatal-warnings" ]
103 } 103 }
104 } 104 }
105 105
106 if (is_clang) {
107 cflags += [
108 # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed
109 # and the fix is in chromium.
110 "-fno-slp-vectorize",
111 ]
112 }
113
106 if (is_clang && !is_win) { 114 if (is_clang && !is_win) {
107 # This is here so that all files get recompiled after a clang roll and 115 # This is here so that all files get recompiled after a clang roll and
108 # when turning clang on or off. (defines are passed via the command line, 116 # when turning clang on or off. (defines are passed via the command line,
109 # and build system rebuild things when their commandline changes). Nothing 117 # and build system rebuild things when their commandline changes). Nothing
110 # should ever read this define. 118 # should ever read this define.
111 defines += [ 119 defines += [
112 "CR_CLANG_REVISION=" + 120 "CR_CLANG_REVISION=" +
113 exec_script( 121 exec_script(
114 "//tools/clang/scripts/posix-print-revision.py", [], "value") 122 "//tools/clang/scripts/posix-print-revision.py", [], "value")
115 ] 123 ]
(...skipping 27 matching lines...) Expand all
143 # ----------------------------------- 151 # -----------------------------------
144 if (gcc_version >= 48) { 152 if (gcc_version >= 48) {
145 cflags_cc += [ 153 cflags_cc += [
146 "-std=gnu++11", 154 "-std=gnu++11",
147 ] 155 ]
148 } 156 }
149 157
150 # CPU architecture. We may or may not be doing a cross compile now, so for 158 # CPU architecture. We may or may not be doing a cross compile now, so for
151 # simplicity we always explicitly set the architecture. 159 # simplicity we always explicitly set the architecture.
152 if (cpu_arch == "x64") { 160 if (cpu_arch == "x64") {
153 cflags += [ "-m64" ] 161 cflags += [ "-m64", "-march=x86-64", ]
154 ldflags += [ "-m64" ] 162 ldflags += [ "-m64" ]
155 } else if (cpu_arch == "x86") { 163 } else if (cpu_arch == "x86") {
156 cflags += [ "-m32" ] 164 cflags += [ "-m32" ]
157 ldflags += [ "-m32" ] 165 ldflags += [ "-m32" ]
158 } else if (cpu_arch == "arm") { 166 } else if (cpu_arch == "arm") {
159 # Don't set the compiler flags for the WebView build. These will come 167 # Don't set the compiler flags for the WebView build. These will come
160 # from the Android build system. 168 # from the Android build system.
161 if (!is_android_webview_build) { 169 if (!is_android_webview_build) {
162 cflags += [ 170 cflags += [
163 "-march=$arm_arch", 171 "-march=$arm_arch",
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 705
698 # Clang considers the `register` keyword as deprecated, but e.g. 706 # Clang considers the `register` keyword as deprecated, but e.g.
699 # code generated by flex (used in angle) contains that keyword. 707 # code generated by flex (used in angle) contains that keyword.
700 # http://crbug.com/255186 708 # http://crbug.com/255186
701 "-Wno-deprecated-register", 709 "-Wno-deprecated-register",
702 710
703 # TODO(thakis): This used to be implied by -Wno-unused-function, 711 # TODO(thakis): This used to be implied by -Wno-unused-function,
704 # which we no longer use. Check if it makes sense to remove 712 # which we no longer use. Check if it makes sense to remove
705 # this as well. http://crbug.com/316352 713 # this as well. http://crbug.com/316352
706 "-Wno-unneeded-internal-declaration", 714 "-Wno-unneeded-internal-declaration",
715
716 # TODO(thakis): Remove, http://crbug.com/263960
717 "-Wno-reserved-user-defined-literal",
707 ] 718 ]
708
709 if (!is_mac && !is_ios) {
710 cflags_cc += [
711 "-Wno-reserved-user-defined-literal",
712 ]
713 }
714 } 719 }
715 if (gcc_version >= 48) { 720 if (gcc_version >= 48) {
716 cflags_cc += [ 721 cflags_cc += [
717 # See comment for -Wno-c++11-narrowing. 722 # See comment for -Wno-c++11-narrowing.
718 "-Wno-narrowing", 723 "-Wno-narrowing",
719 # TODO(thakis): Remove, http://crbug.com/263960 724 # TODO(thakis): Remove, http://crbug.com/263960
720 "-Wno-literal-suffix", 725 "-Wno-literal-suffix",
721 ] 726 ]
722 } 727 }
723 728
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 cflags += [ "-gsplit-dwarf" ] 923 cflags += [ "-gsplit-dwarf" ]
919 } 924 }
920 } 925 }
921 } 926 }
922 927
923 config("no_symbols") { 928 config("no_symbols") {
924 if (!is_win) { 929 if (!is_win) {
925 cflags = [ "-g0" ] 930 cflags = [ "-g0" ]
926 } 931 }
927 } 932 }
OLDNEW
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | tools/gn/bin/gyp_flag_compare.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698