alokp@chromium.org | 29d56fb | 2010-04-06 15:42:22 +0000 | [diff] [blame] | 1 | # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | { |
Geoff Lang | d095bda | 2014-04-07 14:21:14 -0400 | [diff] [blame] | 6 | 'includes': [ 'common_defines.gypi', ], |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 7 | 'variables': |
| 8 | { |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 9 | 'angle_build_tests%': '1', |
| 10 | 'angle_build_samples%': '1', |
| 11 | # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp. |
| 12 | # angle_code is set to 0 for test code, sample code, and third party code. |
| 13 | # When angle_code is 1, we build with additional warning flags on Mac and Linux. |
| 14 | 'angle_code%': 0, |
Geoff Lang | 16851c8 | 2014-02-10 13:31:32 -0500 | [diff] [blame] | 15 | 'release_symbols%': 'true', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 16 | 'gcc_or_clang_warnings': |
| 17 | [ |
| 18 | '-Wall', |
| 19 | '-Wchar-subscripts', |
| 20 | '-Werror', |
| 21 | '-Wextra', |
| 22 | '-Wformat=2', |
| 23 | '-Winit-self', |
| 24 | '-Wno-sign-compare', |
| 25 | '-Wno-unused-function', |
| 26 | '-Wno-unused-parameter', |
| 27 | '-Wno-unknown-pragmas', |
| 28 | '-Wpacked', |
| 29 | '-Wpointer-arith', |
| 30 | '-Wundef', |
| 31 | '-Wwrite-strings', |
Jamie Madill | e78603b | 2014-02-19 16:27:39 -0500 | [diff] [blame] | 32 | '-Wno-reorder', |
| 33 | '-Wno-format-nonliteral', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 34 | ], |
apatrick@chromium.org | 9dc0a24 | 2012-01-24 21:45:37 +0000 | [diff] [blame] | 35 | }, |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 36 | 'target_defaults': |
| 37 | { |
| 38 | 'default_configuration': 'Debug', |
| 39 | 'variables': |
| 40 | { |
| 41 | 'warn_as_error%': 1, |
apatrick@chromium.org | 9dc0a24 | 2012-01-24 21:45:37 +0000 | [diff] [blame] | 42 | }, |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 43 | 'target_conditions': |
| 44 | [ |
| 45 | ['warn_as_error == 1', |
| 46 | { |
| 47 | 'msvs_settings': |
| 48 | { |
| 49 | 'VCCLCompilerTool': |
| 50 | { |
| 51 | 'WarnAsError': 'true', |
| 52 | }, |
| 53 | }, |
| 54 | }], |
shannon.woods@transgaming.com | 2001a0c | 2013-01-25 21:56:47 +0000 | [diff] [blame] | 55 | ], |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 56 | 'configurations': |
| 57 | { |
| 58 | 'Common_Base': |
| 59 | { |
| 60 | 'abstract': 1, |
| 61 | 'msvs_configuration_attributes': |
| 62 | { |
| 63 | 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)_$(Platform)', |
| 64 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
Geoff Lang | 5df9f52 | 2014-05-16 10:37:47 -0400 | [diff] [blame] | 65 | 'CharacterSet': '0', # ASCII |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 66 | }, |
| 67 | 'msvs_settings': |
| 68 | { |
| 69 | 'VCCLCompilerTool': |
| 70 | { |
| 71 | 'AdditionalOptions': ['/MP'], |
| 72 | 'BufferSecurityCheck': 'true', |
| 73 | 'DebugInformationFormat': '3', |
Geoff Lang | bfdea66 | 2014-07-23 14:16:32 -0400 | [diff] [blame] | 74 | 'ExceptionHandling': '0', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 75 | 'EnableFunctionLevelLinking': 'true', |
| 76 | 'MinimalRebuild': 'false', |
Geoff Lang | 6cec850 | 2014-04-19 12:39:25 -0400 | [diff] [blame] | 77 | 'RuntimeTypeInfo': 'true', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 78 | 'WarningLevel': '4', |
| 79 | }, |
| 80 | 'VCLinkerTool': |
| 81 | { |
| 82 | 'FixedBaseAddress': '1', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 83 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
| 84 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 85 | # Most of the executables we'll ever create are tests |
| 86 | # and utilities with console output. |
| 87 | 'SubSystem': '1', # /SUBSYSTEM:CONSOLE |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 88 | }, |
| 89 | 'VCResourceCompilerTool': |
| 90 | { |
| 91 | 'Culture': '1033', |
| 92 | }, |
| 93 | }, |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 94 | }, # Common_Base |
Geoff Lang | 7805990 | 2013-10-11 14:33:01 -0400 | [diff] [blame] | 95 | |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 96 | 'Debug_Base': |
| 97 | { |
| 98 | 'abstract': 1, |
| 99 | 'msvs_settings': |
| 100 | { |
| 101 | 'VCCLCompilerTool': |
| 102 | { |
| 103 | 'Optimization': '0', # /Od |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 104 | 'BasicRuntimeChecks': '3', |
| 105 | 'RuntimeLibrary': '1', # /MTd (debug static) |
| 106 | }, |
| 107 | 'VCLinkerTool': |
| 108 | { |
Geoff Lang | 16851c8 | 2014-02-10 13:31:32 -0500 | [diff] [blame] | 109 | 'GenerateDebugInformation': 'true', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 110 | 'LinkIncremental': '2', |
| 111 | }, |
| 112 | }, |
| 113 | 'xcode_settings': |
| 114 | { |
| 115 | 'COPY_PHASE_STRIP': 'NO', |
| 116 | 'GCC_OPTIMIZATION_LEVEL': '0', |
| 117 | }, |
| 118 | }, # Debug_Base |
Geoff Lang | 7805990 | 2013-10-11 14:33:01 -0400 | [diff] [blame] | 119 | |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 120 | 'Release_Base': |
| 121 | { |
| 122 | 'abstract': 1, |
| 123 | 'msvs_settings': |
| 124 | { |
| 125 | 'VCCLCompilerTool': |
| 126 | { |
| 127 | 'Optimization': '2', # /Os |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 128 | 'RuntimeLibrary': '0', # /MT (static) |
| 129 | }, |
| 130 | 'VCLinkerTool': |
| 131 | { |
Geoff Lang | 16851c8 | 2014-02-10 13:31:32 -0500 | [diff] [blame] | 132 | 'GenerateDebugInformation': '<(release_symbols)', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 133 | 'LinkIncremental': '1', |
| 134 | }, |
| 135 | }, |
| 136 | }, # Release_Base |
Geoff Lang | 7805990 | 2013-10-11 14:33:01 -0400 | [diff] [blame] | 137 | |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 138 | 'x86_Base': |
| 139 | { |
| 140 | 'abstract': 1, |
| 141 | 'msvs_configuration_platform': 'Win32', |
| 142 | 'msvs_settings': |
| 143 | { |
| 144 | 'VCLinkerTool': |
| 145 | { |
| 146 | 'TargetMachine': '1', |
| 147 | 'AdditionalLibraryDirectories': |
| 148 | [ |
| 149 | '<(windows_sdk_path)/Lib/win8/um/x86', |
| 150 | ], |
| 151 | }, |
| 152 | 'VCLibrarianTool': |
| 153 | { |
Jamie Madill | 58f7942 | 2014-09-04 10:38:30 -0400 | [diff] [blame] | 154 | 'TargetMachine': '1', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 155 | 'AdditionalLibraryDirectories': |
| 156 | [ |
| 157 | '<(windows_sdk_path)/Lib/win8/um/x86', |
| 158 | ], |
| 159 | }, |
| 160 | }, |
| 161 | }, # x86_Base |
| 162 | |
| 163 | 'x64_Base': |
| 164 | { |
| 165 | 'abstract': 1, |
| 166 | 'msvs_configuration_platform': 'x64', |
| 167 | 'msvs_settings': |
| 168 | { |
| 169 | 'VCLinkerTool': |
| 170 | { |
| 171 | 'TargetMachine': '17', # x86 - 64 |
| 172 | 'AdditionalLibraryDirectories': |
| 173 | [ |
| 174 | '<(windows_sdk_path)/Lib/win8/um/x64', |
| 175 | ], |
| 176 | }, |
Geoff Lang | d095bda | 2014-04-07 14:21:14 -0400 | [diff] [blame] | 177 | 'VCLibrarianTool': |
| 178 | { |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 179 | 'AdditionalLibraryDirectories': |
| 180 | [ |
| 181 | '<(windows_sdk_path)/Lib/win8/um/x64', |
| 182 | ], |
| 183 | }, |
| 184 | }, |
| 185 | }, # x64_Base |
| 186 | |
| 187 | # Concrete configurations |
| 188 | 'Debug': |
| 189 | { |
| 190 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 191 | }, |
| 192 | 'Release': |
| 193 | { |
| 194 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 195 | }, |
| 196 | 'conditions': |
| 197 | [ |
Geoff Lang | e744834 | 2014-08-04 11:12:07 -0400 | [diff] [blame] | 198 | [ 'OS == "win" and MSVS_VERSION != "2010e"', |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 199 | { |
| 200 | 'Debug_x64': |
| 201 | { |
| 202 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
| 203 | }, |
| 204 | 'Release_x64': |
| 205 | { |
| 206 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
| 207 | }, |
| 208 | }], |
Geoff Lang | 7805990 | 2013-10-11 14:33:01 -0400 | [diff] [blame] | 209 | ], |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 210 | }, # configurations |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 211 | }, # target_defaults |
| 212 | 'conditions': |
| 213 | [ |
| 214 | ['OS == "win"', |
| 215 | { |
| 216 | 'target_defaults': |
| 217 | { |
| 218 | 'msvs_cygwin_dirs': ['../third_party/cygwin'], |
| 219 | }, |
Jamie Madill | 37f77d2 | 2014-04-30 16:10:13 -0400 | [diff] [blame] | 220 | }, |
| 221 | { # OS != win |
| 222 | 'target_defaults': |
| 223 | { |
| 224 | 'cflags': [ '-fPIC' ], |
| 225 | }, |
Geoff Lang | 7805990 | 2013-10-11 14:33:01 -0400 | [diff] [blame] | 226 | }], |
Geoff Lang | 3cd50f7 | 2014-01-10 13:04:48 -0500 | [diff] [blame] | 227 | ['OS != "win" and OS != "mac"', |
| 228 | { |
| 229 | 'target_defaults': |
| 230 | { |
| 231 | 'cflags': |
| 232 | [ |
| 233 | '-pthread', |
| 234 | '-fno-exceptions', |
| 235 | ], |
| 236 | 'ldflags': |
| 237 | [ |
| 238 | '-pthread', |
| 239 | ], |
| 240 | 'configurations': |
| 241 | { |
| 242 | 'Debug': |
| 243 | { |
| 244 | 'variables': |
| 245 | { |
| 246 | 'debug_optimize%': '0', |
| 247 | }, |
| 248 | 'defines': |
| 249 | [ |
| 250 | '_DEBUG', |
| 251 | ], |
| 252 | 'cflags': |
| 253 | [ |
| 254 | '-O>(debug_optimize)', |
| 255 | '-g', |
| 256 | ], |
| 257 | } |
| 258 | }, |
| 259 | }, |
| 260 | }], |
| 261 | ['angle_code==1', |
| 262 | { |
| 263 | 'target_defaults': |
| 264 | { |
| 265 | 'conditions': |
| 266 | [ |
| 267 | ['OS == "mac"', |
| 268 | { |
| 269 | 'xcode_settings': |
| 270 | { |
| 271 | 'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)'] |
| 272 | }, |
| 273 | }], |
| 274 | ['OS != "win" and OS != "mac"', |
| 275 | { |
| 276 | 'cflags': ['<@(gcc_or_clang_warnings)'] |
| 277 | }], |
| 278 | ] |
| 279 | } |
| 280 | }], |
apatrick@chromium.org | 22eab92 | 2011-10-21 01:16:42 +0000 | [diff] [blame] | 281 | ], |
alokp@chromium.org | 29d56fb | 2010-04-06 15:42:22 +0000 | [diff] [blame] | 282 | } |