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/sysroot.gni") | 6 import("//build/config/sysroot.gni") |
7 | 7 |
8 # compiler --------------------------------------------------------------------- | 8 # compiler --------------------------------------------------------------------- |
9 # | 9 # |
10 # Base compiler configuration. | 10 # Base compiler configuration. |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 ] | 166 ] |
167 } | 167 } |
168 | 168 |
169 # Android-specific flags setup. | 169 # Android-specific flags setup. |
170 # ----------------------------- | 170 # ----------------------------- |
171 if (is_android) { | 171 if (is_android) { |
172 cflags += [ | 172 cflags += [ |
173 "-ffunction-sections", | 173 "-ffunction-sections", |
174 "-funwind-tables", | 174 "-funwind-tables", |
175 "-fno-short-enums", | 175 "-fno-short-enums", |
176 "-finline-limit=64", | |
177 ] | 176 ] |
| 177 if (!is_clang) { |
| 178 # Clang doesn't support this one. |
| 179 cflags += [ "-finline-limit=64" ] |
| 180 } |
178 if (is_android_webview_build) { | 181 if (is_android_webview_build) { |
179 # Android predefines this as 1; undefine it here so Chromium can redefine | 182 # Android predefines this as 1; undefine it here so Chromium can redefine |
180 # it later to be 2 for chromium code and unset for third party code. This | 183 # it later to be 2 for chromium code and unset for third party code. This |
181 # works because cflags are added before defines. | 184 # works because cflags are added before defines. |
182 # TODO(brettw) the above comment seems incorrect. We specify defines | 185 # TODO(brettw) the above comment seems incorrect. We specify defines |
183 # before cflags on our compiler command lines. | 186 # before cflags on our compiler command lines. |
184 cflags += [ "-U_FORTIFY_SOURCE" ] | 187 cflags += [ "-U_FORTIFY_SOURCE" ] |
185 } | 188 } |
186 | 189 |
187 if (is_asan) { | 190 if (is_asan) { |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 } else { | 596 } else { |
594 cflags = [ "-g1" ] | 597 cflags = [ "-g1" ] |
595 } | 598 } |
596 } | 599 } |
597 | 600 |
598 config("no_symbols") { | 601 config("no_symbols") { |
599 if (!is_win) { | 602 if (!is_win) { |
600 cflags = [ "-g0" ] | 603 cflags = [ "-g0" ] |
601 } | 604 } |
602 } | 605 } |
OLD | NEW |