2011-09-15 18:24:33 +04:00
|
|
|
# conditions used in both common.gypi and skia.gyp in chromium
|
|
|
|
#
|
|
|
|
{
|
|
|
|
'conditions' : [
|
|
|
|
|
|
|
|
['skia_os == "win"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_WIN32',
|
|
|
|
'SK_IGNORE_STDINT_DOT_H',
|
2011-09-28 18:32:01 +04:00
|
|
|
'_CRT_SECURE_NO_WARNINGS',
|
2011-09-15 18:24:33 +04:00
|
|
|
],
|
|
|
|
'msvs_cygwin_shell': 0,
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'WarningLevel': '1',
|
|
|
|
'WarnAsError': 'false',
|
|
|
|
'DebugInformationFormat': '3',
|
2011-09-16 19:47:33 +04:00
|
|
|
'AdditionalOptions': [ '/MP' ],
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
|
|
|
'OpenGL32.lib',
|
|
|
|
'usp10.lib',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2011-09-28 18:32:01 +04:00
|
|
|
'DebugInformationFormat': '4', # editAndContiue (/ZI)
|
2011-10-04 00:15:13 +04:00
|
|
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
2011-09-15 18:24:33 +04:00
|
|
|
'Optimization': '0', # optimizeDisabled (/Od)
|
|
|
|
'PreprocessorDefinitions': ['_DEBUG'],
|
|
|
|
'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
|
2011-09-28 18:32:01 +04:00
|
|
|
'ExceptionHandling': '0',
|
|
|
|
'RuntimeTypeInfo': 'false', # /GR-
|
|
|
|
'WarningLevel': '3', # level3 (/W3)
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2011-09-28 18:32:01 +04:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
|
|
|
'LinkIncremental': '2', # /INCREMENTAL
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2011-09-28 18:32:01 +04:00
|
|
|
'DebugInformationFormat': '3', # programDatabase (/Zi)
|
2011-10-04 00:15:13 +04:00
|
|
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
2011-09-28 18:32:01 +04:00
|
|
|
'Optimization': '3', # full (/Ox)
|
|
|
|
'WholeProgramOptimization': 'true', #/GL
|
|
|
|
# Changing the floating point model requires rebaseling gm images
|
|
|
|
#'FloatingPointModel': '2', # fast (/fp:fast)
|
|
|
|
'FavorSizeOrSpeed': '1', # speed (/Ot)
|
2011-09-15 18:24:33 +04:00
|
|
|
'PreprocessorDefinitions': ['NDEBUG'],
|
2011-09-28 18:32:01 +04:00
|
|
|
'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
|
|
|
|
'ExceptionHandling': '0',
|
|
|
|
'RuntimeTypeInfo': 'false', # /GR-
|
|
|
|
'WarningLevel': '3', # level3 (/W3)
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2011-09-28 18:32:01 +04:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
|
|
|
'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
2011-10-03 23:36:51 +04:00
|
|
|
'VCLibrarianTool': {
|
|
|
|
'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
|
|
|
|
},
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
['skia_os in ["linux", "freebsd", "openbsd", "solaris"]',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_SAMPLES_FOR_X',
|
|
|
|
'SK_BUILD_FOR_UNIX',
|
2012-02-28 21:06:02 +04:00
|
|
|
'SK_USE_COLOR_LUMINANCE',
|
|
|
|
'SK_GAMMA_APPLY_TO_A8',
|
2011-09-15 18:24:33 +04:00
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'cflags': ['-g']
|
|
|
|
},
|
|
|
|
'Release': {
|
2012-05-17 17:58:26 +04:00
|
|
|
'cflags': ['-O3'],
|
2012-01-19 23:59:22 +04:00
|
|
|
'defines': [ 'NDEBUG' ],
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
},
|
2012-01-06 23:22:11 +04:00
|
|
|
'cflags': [
|
|
|
|
# TODO(tony): Enable -Werror once all the strict-aliasing problems
|
|
|
|
# are fixed.
|
|
|
|
#'-Werror',
|
2011-11-23 19:01:08 +04:00
|
|
|
'-Wall',
|
|
|
|
'-Wextra',
|
|
|
|
'-Wno-unused',
|
|
|
|
# suppressions below here were added for clang
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-c++11-extensions'
|
|
|
|
],
|
2011-09-15 18:24:33 +04:00
|
|
|
'include_dirs' : [
|
|
|
|
'/usr/include/freetype2',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
['skia_os == "mac"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_MAC',
|
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
},
|
2011-10-10 18:19:40 +04:00
|
|
|
'Release': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '3',
|
|
|
|
},
|
2012-01-19 23:59:22 +04:00
|
|
|
'defines': [ 'NDEBUG' ],
|
2011-10-10 18:19:40 +04:00
|
|
|
},
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
'xcode_settings': {
|
2012-04-05 23:29:04 +04:00
|
|
|
'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
|
2011-09-15 18:24:33 +04:00
|
|
|
'SYMROOT': '<(DEPTH)/xcodebuild',
|
2011-10-12 22:12:11 +04:00
|
|
|
'SDKROOT': 'macosx10.6',
|
2011-11-17 19:35:47 +04:00
|
|
|
# trying to get this to work, but it needs clang I think...
|
|
|
|
# 'WARNING_CFLAGS': '-Wexit-time-destructors',
|
2011-12-10 23:36:56 +04:00
|
|
|
'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
|
2011-09-15 18:24:33 +04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
['skia_os == "ios"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_IOS',
|
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'xcode_settings': {
|
|
|
|
'SYMROOT': '<(DEPTH)/xcodebuild',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2011-11-03 17:08:29 +04:00
|
|
|
|
|
|
|
['skia_os == "android"',
|
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_ANDROID',
|
|
|
|
'SK_BUILD_FOR_ANDROID_NDK',
|
2012-01-10 14:28:30 +04:00
|
|
|
'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0',
|
2011-11-03 17:08:29 +04:00
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'cflags': ['-g']
|
|
|
|
},
|
|
|
|
'Release': {
|
2012-01-19 23:59:22 +04:00
|
|
|
'cflags': ['-O2'],
|
|
|
|
'defines': [ 'NDEBUG' ],
|
2011-11-03 17:08:29 +04:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'libraries': [
|
|
|
|
'-lstdc++',
|
|
|
|
'-lm',
|
2011-11-08 23:03:43 +04:00
|
|
|
'-llog',
|
2011-11-03 17:08:29 +04:00
|
|
|
],
|
2011-12-05 17:55:55 +04:00
|
|
|
'cflags': [
|
|
|
|
'-fno-exceptions',
|
|
|
|
'-fno-rtti',
|
|
|
|
],
|
2011-11-03 17:08:29 +04:00
|
|
|
'conditions': [
|
2012-02-24 18:10:44 +04:00
|
|
|
[ 'skia_target_arch == "arm"', {
|
2012-02-24 18:09:02 +04:00
|
|
|
'ldflags': [
|
|
|
|
'-Wl',
|
|
|
|
'--fix-cortex-a8',
|
|
|
|
],
|
|
|
|
}],
|
2011-11-03 21:31:41 +04:00
|
|
|
[ 'skia_target_arch == "arm" and arm_thumb == 1', {
|
|
|
|
'cflags': [
|
|
|
|
'-mthumb',
|
|
|
|
],
|
|
|
|
}],
|
2011-11-03 17:08:29 +04:00
|
|
|
[ 'skia_target_arch == "arm" and armv7 == 1', {
|
|
|
|
'defines': [
|
|
|
|
'__ARM_ARCH__=7',
|
|
|
|
],
|
|
|
|
'cflags': [
|
|
|
|
'-march=armv7-a',
|
2012-02-24 18:09:02 +04:00
|
|
|
'-mfloat-abi=softfp',
|
2011-11-03 17:08:29 +04:00
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
[ 'arm_neon == 1', {
|
|
|
|
'defines': [
|
|
|
|
'__ARM_HAVE_NEON',
|
|
|
|
],
|
|
|
|
'cflags': [
|
|
|
|
'-mfpu=neon',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2011-09-15 18:24:33 +04:00
|
|
|
|
2012-01-27 01:26:40 +04:00
|
|
|
# We can POD-style initialization of static mutexes to avoid generating
|
|
|
|
# static initializers if we're using a pthread-compatible thread interface.
|
|
|
|
[ 'skia_os != "win"', {
|
|
|
|
'defines': [
|
|
|
|
'SK_USE_POSIX_THREADS'
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
|
2011-09-15 18:24:33 +04:00
|
|
|
], # end 'conditions'
|
|
|
|
}
|
|
|
|
|
|
|
|
# Local Variables:
|
|
|
|
# tab-width:2
|
|
|
|
# indent-tabs-mode:nil
|
|
|
|
# End:
|
|
|
|
# vim: set expandtab tabstop=2 shiftwidth=2:
|