Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: build/common.gypi

Issue 14597007: Support target/host architecture with ninja iOS builds (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rsleevei space Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 'use_system_sqlite%': 0, # '<(android_webview_build)', 1293 'use_system_sqlite%': 0, # '<(android_webview_build)',
1294 'use_system_expat%': '<(android_webview_build)', 1294 'use_system_expat%': '<(android_webview_build)',
1295 'use_system_icu%': '<(android_webview_build)', 1295 'use_system_icu%': '<(android_webview_build)',
1296 'use_system_stlport%': '<(android_webview_build)', 1296 'use_system_stlport%': '<(android_webview_build)',
1297 1297
1298 'enable_managed_users%': 0, 1298 'enable_managed_users%': 0,
1299 1299
1300 # Copy it out one scope. 1300 # Copy it out one scope.
1301 'android_webview_build%': '<(android_webview_build)', 1301 'android_webview_build%': '<(android_webview_build)',
1302 }], # OS=="android" 1302 }], # OS=="android"
1303 ['OS=="mac"', { 1303 ['OS=="mac" or OS=="ios"', {
1304 'variables': { 1304 'variables': {
1305 # Mac OS X SDK and deployment target support. The SDK identifies 1305 # Mac OS X SDK and deployment target support. The SDK identifies
1306 # the version of the system headers that will be used, and 1306 # the version of the system headers that will be used, and
1307 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time 1307 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1308 # macro. "Maximum allowed" refers to the operating system version 1308 # macro. "Maximum allowed" refers to the operating system version
1309 # whose APIs are available in the headers. The deployment target 1309 # whose APIs are available in the headers. The deployment target
1310 # identifies the minimum system version that the built products are 1310 # identifies the minimum system version that the built products are
1311 # expected to function on. It corresponds to the 1311 # expected to function on. It corresponds to the
1312 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these 1312 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1313 # macros are available, #include <AvailabilityMacros.h>. Additional 1313 # macros are available, #include <AvailabilityMacros.h>. Additional
(...skipping 12 matching lines...) Expand all
1326 'mac_sdk_min%': '10.6', 1326 'mac_sdk_min%': '10.6',
1327 'mac_sdk_path%': '', 1327 'mac_sdk_path%': '',
1328 1328
1329 'mac_deployment_target%': '10.6', 1329 'mac_deployment_target%': '10.6',
1330 }, 1330 },
1331 1331
1332 'mac_sdk_min': '<(mac_sdk_min)', 1332 'mac_sdk_min': '<(mac_sdk_min)',
1333 'mac_sdk_path': '<(mac_sdk_path)', 1333 'mac_sdk_path': '<(mac_sdk_path)',
1334 'mac_deployment_target': '<(mac_deployment_target)', 1334 'mac_deployment_target': '<(mac_deployment_target)',
1335 1335
1336 # Enable clang on mac by default! 1336 'conditions': [
stuartmorgan 2013/05/07 13:14:46 Probably clearer if you just make the mac section
justincohen 2013/05/07 14:50:57 Yeah, it ended up looking like this because of var
1337 'clang%': 1, 1337 ['OS=="mac"', {
1338 # Enable clang on mac by default!
1339 'clang%': 1,
1338 1340
1339 # Compile in Breakpad support by default so that it can be 1341 # Compile in Breakpad support by default so that it can be
1340 # tested, even if it is not enabled by default at runtime. 1342 # tested, even if it is not enabled by default at runtime.
1341 'mac_breakpad_compiled_in%': 1, 1343 'mac_breakpad_compiled_in%': 1,
1342 'conditions': [ 1344 'conditions': [
1343 # mac_product_name is set to the name of the .app bundle as it should 1345 # mac_product_name is set to the name of the .app bundle as it sho uld
1344 # appear on disk. This duplicates data from 1346 # appear on disk. This duplicates data from
1345 # chrome/app/theme/chromium/BRANDING and 1347 # chrome/app/theme/chromium/BRANDING and
1346 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get 1348 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1347 # these names into the build system. 1349 # these names into the build system.
1348 ['branding=="Chrome"', { 1350 ['branding=="Chrome"', {
1349 'mac_product_name%': 'Google Chrome', 1351 'mac_product_name%': 'Google Chrome',
1350 }, { # else: branding!="Chrome" 1352 }, { # else: branding!="Chrome"
1351 'mac_product_name%': 'Chromium', 1353 'mac_product_name%': 'Chromium',
1352 }], 1354 }],
1353 1355
1354 ['branding=="Chrome" and buildtype=="Official"', { 1356 ['branding=="Chrome" and buildtype=="Official"', {
1355 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac _sdk_min) --sdk_path=<(mac_sdk_path))', 1357 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify < (mac_sdk_min) --sdk_path=<(mac_sdk_path))',
1356 # Enable uploading crash dumps. 1358 # Enable uploading crash dumps.
1357 'mac_breakpad_uploads%': 1, 1359 'mac_breakpad_uploads%': 1,
1358 # Enable dumping symbols at build time for use by Mac Breakpad. 1360 # Enable dumping symbols at build time for use by Mac Breakpad.
1359 'mac_breakpad%': 1, 1361 'mac_breakpad%': 1,
1360 # Enable Keystone auto-update support. 1362 # Enable Keystone auto-update support.
1361 'mac_keystone%': 1, 1363 'mac_keystone%': 1,
1362 }, { # else: branding!="Chrome" or buildtype!="Official" 1364 }, { # else: branding!="Chrome" or buildtype!="Official"
1363 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min) )', 1365 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_ min))',
1364 'mac_breakpad_uploads%': 0, 1366 'mac_breakpad_uploads%': 0,
1365 'mac_breakpad%': 0, 1367 'mac_breakpad%': 0,
1366 'mac_keystone%': 0, 1368 'mac_keystone%': 0,
1369 }],
1370 ],
1367 }], 1371 }],
1368 ], 1372 ],
1369 }], # OS=="mac" 1373 }], # OS=="mac"
stuartmorgan 2013/05/07 13:14:46 If you do have to keep the nested structure for va
justincohen 2013/05/07 14:50:57 Done.
1370 ['OS=="win"', { 1374 ['OS=="win"', {
1371 'conditions': [ 1375 'conditions': [
1372 ['component=="shared_library"', { 1376 ['component=="shared_library"', {
1373 'win_use_allocator_shim%': 0, 1377 'win_use_allocator_shim%': 0,
1374 }], 1378 }],
1375 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { 1379 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
1376 # Only enabled by default for ninja because it's buggy in VS. 1380 # Only enabled by default for ninja because it's buggy in VS.
1377 # Not enabled for component=static_library because some targets 1381 # Not enabled for component=static_library because some targets
1378 # are too large and the toolchain fails due to the size of the 1382 # are too large and the toolchain fails due to the size of the
1379 # .obj files. 1383 # .obj files.
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
3061 # See the comment in the Mac section for what it takes to move 3065 # See the comment in the Mac section for what it takes to move
3062 # this to -std=c++11. 3066 # this to -std=c++11.
3063 '-std=gnu++11', 3067 '-std=gnu++11',
3064 ], 3068 ],
3065 }], 3069 }],
3066 ['clang==1 and (OS=="android" or chromeos==1)', { 3070 ['clang==1 and (OS=="android" or chromeos==1)', {
3067 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's 3071 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
3068 # libstdc++ in C++11 mode. So no C++11 mode for Android yet. 3072 # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
3069 # Doesn't work with asan for some reason either: crbug.com/233464 3073 # Doesn't work with asan for some reason either: crbug.com/233464
3070 'cflags': [ 3074 'cflags': [
3071 # Especially needed for gtest macros using enum values from Mac» 3075 # Especially needed for gtest macros using enum values from Mac
3072 # system headers.» 3076 # system headers.
3073 # TODO(pkasting): In C++11 this is legal, so this should be» 3077 # TODO(pkasting): In C++11 this is legal, so this should be
3074 # removed when we change to that. (This is also why we don't» 3078 # removed when we change to that. (This is also why we don't
3075 # bother fixing all these cases today.)» 3079 # bother fixing all these cases today.)
3076 '-Wno-unnamed-type-template-args',» 3080 '-Wno-unnamed-type-template-args',
3077 # This (rightfully) complains about 'override', which we use» 3081 # This (rightfully) complains about 'override', which we use
3078 # heavily.» 3082 # heavily.
3079 '-Wno-c++11-extensions', 3083 '-Wno-c++11-extensions',
3080 ], 3084 ],
3081 }], 3085 }],
3082 ['clang==1 and clang_use_chrome_plugins==1', { 3086 ['clang==1 and clang_use_chrome_plugins==1', {
3083 'cflags': [ 3087 'cflags': [
3084 '<@(clang_chrome_plugins_flags)', 3088 '<@(clang_chrome_plugins_flags)',
3085 ], 3089 ],
3086 }], 3090 }],
3087 ['clang==1 and clang_load!=""', { 3091 ['clang==1 and clang_load!=""', {
3088 'cflags': [ 3092 'cflags': [
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
4011 # Clang spots more unused functions. 4015 # Clang spots more unused functions.
4012 '-Wno-unused-function', 4016 '-Wno-unused-function',
4013 # See comments on this flag higher up in this file. 4017 # See comments on this flag higher up in this file.
4014 '-Wno-unnamed-type-template-args', 4018 '-Wno-unnamed-type-template-args',
4015 # This (rightfully) complains about 'override', which we use 4019 # This (rightfully) complains about 'override', which we use
4016 # heavily. 4020 # heavily.
4017 '-Wno-c++11-extensions', 4021 '-Wno-c++11-extensions',
4018 ], 4022 ],
4019 }, 4023 },
4020 'target_conditions': [ 4024 'target_conditions': [
4025 ['_toolset=="host"', {
4026 'xcode_settings': {
4027 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4028 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4029 },
4030 }],
4031 ['_toolset=="target"', {
4032 'xcode_settings': {
4033 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4034 },
4035 }],
4021 ['_type=="executable"', { 4036 ['_type=="executable"', {
4022 'configurations': { 4037 'configurations': {
4023 'Release_Base': { 4038 'Release_Base': {
4024 'xcode_settings': { 4039 'xcode_settings': {
4025 'DEPLOYMENT_POSTPROCESSING': 'YES', 4040 'DEPLOYMENT_POSTPROCESSING': 'YES',
4026 'STRIP_INSTALLED_PRODUCT': 'YES', 4041 'STRIP_INSTALLED_PRODUCT': 'YES',
4027 }, 4042 },
4028 }, 4043 },
4029 'Debug_Base': { 4044 'Debug_Base': {
4030 'xcode_settings': { 4045 'xcode_settings': {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
4414 ], 4429 ],
4415 }, { 4430 }, {
4416 'SDKROOT': '<(ios_sdk_path)', # -isysroot 4431 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4417 }], 4432 }],
4418 ], 4433 ],
4419 }], 4434 }],
4420 ['OS=="ios"', { 4435 ['OS=="ios"', {
4421 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)', 4436 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
4422 # Just build armv7, until armv7s is correctly tested. 4437 # Just build armv7, until armv7s is correctly tested.
4423 'VALID_ARCHS': 'armv7 i386', 4438 'VALID_ARCHS': 'armv7 i386',
4424 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4425 # Target both iPhone and iPad. 4439 # Target both iPhone and iPad.
4426 'TARGETED_DEVICE_FAMILY': '1,2', 4440 'TARGETED_DEVICE_FAMILY': '1,2',
4427 }], 4441 }],
4428 ['target_arch=="x64"', { 4442 ['target_arch=="x64"', {
4429 'ARCHS': [ 4443 'ARCHS': [
4430 'x86_64' 4444 'x86_64'
4431 ], 4445 ],
4432 }], 4446 }],
4433 ], 4447 ],
4434 4448
4435 # The Xcode generator will look for an xcode_settings section at the root 4449 # The Xcode generator will look for an xcode_settings section at the root
4436 # of each dict and use it to apply settings on a file-wide basis. Most 4450 # of each dict and use it to apply settings on a file-wide basis. Most
4437 # settings should not be here, they should be in target-specific 4451 # settings should not be here, they should be in target-specific
4438 # xcode_settings sections, or better yet, should use non-Xcode-specific 4452 # xcode_settings sections, or better yet, should use non-Xcode-specific
4439 # settings in target dicts. SYMROOT is a special case, because many other 4453 # settings in target dicts. SYMROOT is a special case, because many other
4440 # Xcode variables depend on it, including variables such as 4454 # Xcode variables depend on it, including variables such as
4441 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 4455 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4442 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 4456 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4443 # files to appear (when present) in the UI as actual files and not red 4457 # files to appear (when present) in the UI as actual files and not red
4444 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 4458 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4445 # and therefore SYMROOT, needs to be set at the project level. 4459 # and therefore SYMROOT, needs to be set at the project level.
4446 'SYMROOT': '<(DEPTH)/xcodebuild', 4460 'SYMROOT': '<(DEPTH)/xcodebuild',
4447 }, 4461 },
4448 } 4462 }
OLDNEW
« base/base.gypi ('K') | « breakpad/breakpad.gyp ('k') | testing/gtest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698