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 declare_args() { | 5 declare_args() { |
6 # The optimization level to use for debug builds. | 6 # The optimization level to use for debug builds. |
7 if (is_android) { | 7 if (is_android) { |
8 # On Android we kind of optimize some things that don't affect debugging | 8 # On Android we kind of optimize some things that don't affect debugging |
9 # much even when optimization is disabled to get the binary size down. | 9 # much even when optimization is disabled to get the binary size down. |
10 debug_optimization_level = "s" | 10 debug_optimization_level = "s" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 # Without this, the constructors and destructors of a C++ object inside | 158 # Without this, the constructors and destructors of a C++ object inside |
159 # an Objective C struct won't be called, which is very bad. | 159 # an Objective C struct won't be called, which is very bad. |
160 cflags_objcc += [ "-fobjc-call-cxx-cdtors" ] | 160 cflags_objcc += [ "-fobjc-call-cxx-cdtors" ] |
161 | 161 |
162 cflags_c += [ "-std=c99" ] | 162 cflags_c += [ "-std=c99" ] |
163 | 163 |
164 ldflags += common_mac_flags | 164 ldflags += common_mac_flags |
165 } else if (is_posix) { | 165 } else if (is_posix) { |
166 # CPU architecture. We may or may not be doing a cross compile now, so for | 166 # CPU architecture. We may or may not be doing a cross compile now, so for |
167 # simplicity we always explicitly set the architecture. | 167 # simplicitly we always explicitly set the architecture. |
168 if (current_cpu == "x64") { | 168 if (current_cpu == "x64") { |
169 cflags += [ | 169 cflags += [ |
170 "-m64", | 170 "-m64", |
171 "-march=x86-64", | 171 "-march=x86-64", |
172 "-msse2", | 172 "-msse2", |
173 ] | 173 ] |
174 ldflags += [ "-m64" ] | 174 ldflags += [ "-m64" ] |
175 } else if (current_cpu == "x86") { | 175 } else if (current_cpu == "x86") { |
176 cflags += [ | 176 cflags += [ |
177 "-m32", | 177 "-m32", |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. | 696 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. |
697 } | 697 } |
698 ldflags = [ "/DEBUG" ] | 698 ldflags = [ "/DEBUG" ] |
699 } else { | 699 } else { |
700 cflags = [ | 700 cflags = [ |
701 "-g3", | 701 "-g3", |
702 "-ggdb3", | 702 "-ggdb3", |
703 ] | 703 ] |
704 } | 704 } |
705 } | 705 } |
OLD | NEW |