Chromium Code Reviews| 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 if (cpu_arch == "arm") { | 7 if (cpu_arch == "arm") { |
| 8 import("//build/config/arm.gni") | 8 import("//build/config/arm.gni") |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 # Stack protection. | 54 # Stack protection. |
| 55 if (is_mac) { | 55 if (is_mac) { |
| 56 cflags += [ "-fstack-protector-all" ] | 56 cflags += [ "-fstack-protector-all" ] |
| 57 } else if (is_linux) { | 57 } else if (is_linux) { |
| 58 cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ] | 58 cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ] |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 # Mac-specific compiler flags setup. | 62 # Mac-specific compiler flags setup. |
| 63 # ---------------------------------- | 63 # ---------------------------------- |
| 64 if (is_mac) { | 64 if (is_mac || is_ios) { |
| 65 # These flags are shared between the C compiler and linker. | 65 # These flags are shared between the C compiler and linker. |
| 66 common_mac_flags = [ | 66 common_mac_flags = [ "-isysroot", sysroot ] |
| 67 "-isysroot", sysroot, | 67 if (is_mac) { |
| 68 "-mmacosx-version-min=10.6", | 68 common_mac_flags += [ "-mmacosx-version-min=10.6" ] |
| 69 ] | 69 } else { |
| 70 cflags += [ "-mios-simulator-version-min=6.0" ] | |
|
Nico
2014/01/27 19:42:27
I'm not sure if this is good enough: While the ios
| |
| 71 } | |
| 70 | 72 |
| 71 # CPU architecture. | 73 # CPU architecture. |
| 72 if (cpu_arch == "x64") { | 74 if (cpu_arch == "x64") { |
| 73 common_mac_flags += [ "-arch x86_64" ] | 75 common_mac_flags += [ "-arch x86_64" ] |
| 74 } else if (cpu_arch == "x86") { | 76 } else if (cpu_arch == "x86") { |
| 75 common_mac_flags += [ "-arch i386" ] | 77 common_mac_flags += [ "-arch i386" ] |
| 76 } | 78 } |
| 77 | 79 |
| 78 cflags += common_mac_flags + [ | 80 cflags += common_mac_flags + [ |
| 79 # Without this, the constructors and destructors of a C++ object inside | 81 # Without this, the constructors and destructors of a C++ object inside |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 679 cflags = [ "-g1" ] | 681 cflags = [ "-g1" ] |
| 680 } | 682 } |
| 681 } | 683 } |
| 682 | 684 |
| 683 config("no_symbols") { | 685 config("no_symbols") { |
| 684 if (!is_win) { | 686 if (!is_win) { |
| 685 cflags = [ "-g0" ] | 687 cflags = [ "-g0" ] |
| 686 } | 688 } |
| 687 } | 689 } |
| 688 | 690 |
| OLD | NEW |