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 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 Loading... |
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 && !is_win) { |
| 107 # 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, |
| 109 # and build system rebuild things when their commandline changes). Nothing |
| 110 # should ever read this define. |
| 111 defines += [ |
| 112 "CR_CLANG_REVISION=" + |
| 113 exec_script( |
| 114 "//tools/clang/scripts/posix-print-revision.py", [], "value") |
| 115 ] |
| 116 } |
| 117 |
106 # Mac-specific compiler flags setup. | 118 # Mac-specific compiler flags setup. |
107 # ---------------------------------- | 119 # ---------------------------------- |
108 if (is_mac || is_ios) { | 120 if (is_mac || is_ios) { |
109 # These flags are shared between the C compiler and linker. | 121 # These flags are shared between the C compiler and linker. |
110 common_mac_flags = [] | 122 common_mac_flags = [] |
111 | 123 |
112 # CPU architecture. | 124 # CPU architecture. |
113 if (cpu_arch == "x64") { | 125 if (cpu_arch == "x64") { |
114 common_mac_flags += [ "-arch", "x86_64" ] | 126 common_mac_flags += [ "-arch", "x86_64" ] |
115 } else if (cpu_arch == "x86") { | 127 } else if (cpu_arch == "x86") { |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 cflags += [ "-gsplit-dwarf" ] | 916 cflags += [ "-gsplit-dwarf" ] |
905 } | 917 } |
906 } | 918 } |
907 } | 919 } |
908 | 920 |
909 config("no_symbols") { | 921 config("no_symbols") { |
910 if (!is_win) { | 922 if (!is_win) { |
911 cflags = [ "-g0" ] | 923 cflags = [ "-g0" ] |
912 } | 924 } |
913 } | 925 } |
OLD | NEW |