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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 "/FS", # Preserve previous PDB behavior. | 68 "/FS", # Preserve previous PDB behavior. |
69 ] | 69 ] |
70 } else { | 70 } else { |
71 # Common GCC compiler flags setup. | 71 # Common GCC compiler flags setup. |
72 # -------------------------------- | 72 # -------------------------------- |
73 common_flags = [ | 73 common_flags = [ |
74 # Not exporting C++ inline functions can generally be applied anywhere | 74 # Not exporting C++ inline functions can generally be applied anywhere |
75 # so we do so here. Normal function visibility is controlled by | 75 # so we do so here. Normal function visibility is controlled by |
76 # //build/config/gcc:symbol_visibility_hidden. | 76 # //build/config/gcc:symbol_visibility_hidden. |
77 "-fvisibility-inlines-hidden", | 77 "-fvisibility-inlines-hidden", |
78 | |
79 # We need the frame pointer for CPU and heap profiling. | |
80 "-fno-omit-frame-pointer", | |
81 ] | 78 ] |
| 79 if (!is_product) { |
| 80 common_flags += [ |
| 81 # We need the frame pointer for CPU and heap profiling. |
| 82 "-fno-omit-frame-pointer", |
| 83 ] |
| 84 } |
82 cflags_cc += common_flags | 85 cflags_cc += common_flags |
83 cflags_objcc += common_flags | 86 cflags_objcc += common_flags |
84 | 87 |
85 # Linker warnings. | 88 # Linker warnings. |
86 if (current_cpu != "arm" && !is_mac) { | 89 if (current_cpu != "arm" && !is_mac) { |
87 # TODO(jochen): Enable this on ChromeOS on arm. http://crbug.com/356580 | 90 # TODO(jochen): Enable this on ChromeOS on arm. http://crbug.com/356580 |
88 ldflags += [ "-Wl,--fatal-warnings" ] | 91 ldflags += [ "-Wl,--fatal-warnings" ] |
89 } | 92 } |
90 | 93 |
91 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer and | 94 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer and |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. | 699 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. |
697 } | 700 } |
698 ldflags = [ "/DEBUG" ] | 701 ldflags = [ "/DEBUG" ] |
699 } else { | 702 } else { |
700 cflags = [ | 703 cflags = [ |
701 "-g3", | 704 "-g3", |
702 "-ggdb3", | 705 "-ggdb3", |
703 ] | 706 ] |
704 } | 707 } |
705 } | 708 } |
OLD | NEW |