| 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/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 if (current_cpu == "arm") { | 7 if (current_cpu == "arm") { |
| 8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
| 9 } | 9 } |
| 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 # Allow comparing the address of references and 'this' against 0 | 151 # Allow comparing the address of references and 'this' against 0 |
| 152 # in debug builds. Technically, these can never be null in | 152 # in debug builds. Technically, these can never be null in |
| 153 # well-defined C/C++ and Clang can optimize such checks away in | 153 # well-defined C/C++ and Clang can optimize such checks away in |
| 154 # release builds, but they may be used in asserts in debug builds. | 154 # release builds, but they may be used in asserts in debug builds. |
| 155 cflags_cc += [ | 155 cflags_cc += [ |
| 156 "-Wno-undefined-bool-conversion", | 156 "-Wno-undefined-bool-conversion", |
| 157 "-Wno-tautological-undefined-compare", | 157 "-Wno-tautological-undefined-compare", |
| 158 ] | 158 ] |
| 159 } | 159 } |
| 160 | 160 |
| 161 if (is_clang && !is_nacl) { | 161 if (is_clang && !is_win && !is_nacl) { |
| 162 # This is here so that all files get recompiled after a clang roll and | 162 # This is here so that all files get recompiled after a clang roll and |
| 163 # when turning clang on or off. (defines are passed via the command line, | 163 # when turning clang on or off. (defines are passed via the command line, |
| 164 # and build system rebuild things when their commandline changes). Nothing | 164 # and build system rebuild things when their commandline changes). Nothing |
| 165 # should ever read this define. | 165 # should ever read this define. |
| 166 defines += | 166 defines += [ "CR_CLANG_REVISION=" + |
| 167 [ "CR_CLANG_REVISION=" + exec_script("//tools/clang/scripts/update.py", | 167 exec_script("//tools/clang/scripts/posix-print-revision.py", |
| 168 [ "--print-revision" ], | 168 [], |
| 169 "trim string") ] | 169 "trim string") ] |
| 170 } | 170 } |
| 171 | 171 |
| 172 # Mac-specific compiler flags setup. | 172 # Mac-specific compiler flags setup. |
| 173 # ---------------------------------- | 173 # ---------------------------------- |
| 174 if (is_mac || is_ios) { | 174 if (is_mac || is_ios) { |
| 175 # These flags are shared between the C compiler and linker. | 175 # These flags are shared between the C compiler and linker. |
| 176 common_mac_flags = [] | 176 common_mac_flags = [] |
| 177 | 177 |
| 178 # CPU architecture. | 178 # CPU architecture. |
| 179 if (current_cpu == "x64") { | 179 if (current_cpu == "x64") { |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 cflags += [ "-gsplit-dwarf" ] | 1087 cflags += [ "-gsplit-dwarf" ] |
| 1088 } | 1088 } |
| 1089 } | 1089 } |
| 1090 } | 1090 } |
| 1091 | 1091 |
| 1092 config("no_symbols") { | 1092 config("no_symbols") { |
| 1093 if (!is_win) { | 1093 if (!is_win) { |
| 1094 cflags = [ "-g0" ] | 1094 cflags = [ "-g0" ] |
| 1095 } | 1095 } |
| 1096 } | 1096 } |
| OLD | NEW |