2011-09-15 14:24:33 +00:00
|
|
|
# conditions used in both common.gypi and skia.gyp in chromium
|
|
|
|
#
|
|
|
|
{
|
2012-08-13 14:26:36 +00:00
|
|
|
'defines': [
|
|
|
|
'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)',
|
2013-11-20 18:06:10 +00:00
|
|
|
'SK_SUPPORT_GPU=<(skia_gpu)',
|
|
|
|
'SK_SUPPORT_OPENCL=<(skia_opencl)',
|
2013-12-06 18:05:03 +00:00
|
|
|
'SK_DISTANCEFIELD_FONTS=<(skia_distancefield_fonts)',
|
2012-08-13 14:26:36 +00:00
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
'conditions' : [
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_os == "win"',
|
2011-09-15 14:24:33 +00:00
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_WIN32',
|
2011-09-28 14:32:01 +00:00
|
|
|
'_CRT_SECURE_NO_WARNINGS',
|
2012-07-12 00:34:39 +00:00
|
|
|
'GR_GL_FUNCTION_TYPE=__stdcall',
|
2011-09-15 14:24:33 +00:00
|
|
|
],
|
|
|
|
'msvs_cygwin_shell': 0,
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2013-03-21 20:29:05 +00:00
|
|
|
'WarningLevel': '3',
|
|
|
|
'ProgramDataBaseFileName': '$(OutDir)\\$(ProjectName).pdb',
|
2011-09-15 14:24:33 +00:00
|
|
|
'DebugInformationFormat': '3',
|
2013-03-21 20:29:05 +00:00
|
|
|
'ExceptionHandling': '0',
|
|
|
|
'AdditionalOptions': [ '/MP', ],
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'AdditionalDependencies': [
|
|
|
|
'OpenGL32.lib',
|
|
|
|
'usp10.lib',
|
2013-06-05 18:35:22 +00:00
|
|
|
|
|
|
|
# Prior to gyp r1584, the following were included automatically.
|
|
|
|
'kernel32.lib',
|
|
|
|
'gdi32.lib',
|
|
|
|
'winspool.lib',
|
|
|
|
'comdlg32.lib',
|
|
|
|
'advapi32.lib',
|
|
|
|
'shell32.lib',
|
|
|
|
'ole32.lib',
|
|
|
|
'oleaut32.lib',
|
|
|
|
'user32.lib',
|
|
|
|
'uuid.lib',
|
|
|
|
'odbc32.lib',
|
|
|
|
'odbccp32.lib',
|
2013-06-06 18:34:13 +00:00
|
|
|
'DelayImp.lib',
|
2011-09-15 14:24:33 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'DebugInformationFormat': '4', # editAndContiue (/ZI)
|
2011-09-15 14:24:33 +00:00
|
|
|
'Optimization': '0', # optimizeDisabled (/Od)
|
|
|
|
'PreprocessorDefinitions': ['_DEBUG'],
|
|
|
|
'RuntimeLibrary': '3', # rtMultiThreadedDebugDLL (/MDd)
|
2011-09-28 14:32:01 +00:00
|
|
|
'RuntimeTypeInfo': 'false', # /GR-
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
|
|
|
'LinkIncremental': '2', # /INCREMENTAL
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'Release': {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2012-05-31 14:12:46 +00:00
|
|
|
'DebugInformationFormat': '3', # programDatabase (/Zi)
|
2013-06-20 20:28:54 +00:00
|
|
|
'Optimization': '<(skia_release_optimization_level)',
|
2013-04-22 14:56:50 +00:00
|
|
|
'WholeProgramOptimization': 'true', #/GL
|
2011-09-28 14:32:01 +00:00
|
|
|
# Changing the floating point model requires rebaseling gm images
|
2012-05-31 14:12:46 +00:00
|
|
|
#'FloatingPointModel': '2', # fast (/fp:fast)
|
|
|
|
'FavorSizeOrSpeed': '1', # speed (/Ot)
|
2011-09-15 14:24:33 +00:00
|
|
|
'PreprocessorDefinitions': ['NDEBUG'],
|
2012-05-31 14:12:46 +00:00
|
|
|
'RuntimeLibrary': '2', # rtMultiThreadedDLL (/MD)
|
|
|
|
'EnableEnhancedInstructionSet': '2',# /arch:SSE2
|
|
|
|
'RuntimeTypeInfo': 'false', # /GR-
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
2011-09-28 14:32:01 +00:00
|
|
|
'GenerateDebugInformation': 'true', # /DEBUG
|
2013-04-22 14:56:50 +00:00
|
|
|
'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration /LTCG
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
2011-10-03 19:36:51 +00:00
|
|
|
'VCLibrarianTool': {
|
2013-04-22 14:56:50 +00:00
|
|
|
'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration /LTCG
|
2011-10-03 19:36:51 +00:00
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2012-08-20 18:58:26 +00:00
|
|
|
'conditions' : [
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_arch_width == 64', {
|
2013-01-08 20:40:22 +00:00
|
|
|
'msvs_configuration_platform': 'x64',
|
2013-03-22 13:16:06 +00:00
|
|
|
}],
|
|
|
|
[ 'skia_arch_width == 32', {
|
|
|
|
'msvs_configuration_platform': 'Win32',
|
|
|
|
}],
|
|
|
|
[ 'skia_warnings_as_errors', {
|
2013-01-08 20:40:22 +00:00
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2013-03-22 13:16:06 +00:00
|
|
|
'WarnAsError': 'true',
|
|
|
|
'AdditionalOptions': [
|
|
|
|
'/we4189', # initialized but unused var warning
|
|
|
|
],
|
2013-01-08 20:40:22 +00:00
|
|
|
},
|
|
|
|
},
|
2012-08-20 18:58:26 +00:00
|
|
|
}],
|
2013-06-14 17:10:09 +00:00
|
|
|
[ 'skia_win_exceptions', {
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
|
|
|
'AdditionalOptions': [
|
|
|
|
'/EHsc',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}],
|
2012-08-20 18:58:26 +00:00
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
|
2013-07-11 12:48:14 +00:00
|
|
|
# The following section is common to linux + derivatives and android
|
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos", "android"]',
|
|
|
|
{
|
2013-11-20 15:13:49 +00:00
|
|
|
'cflags': [
|
2013-11-20 18:06:10 +00:00
|
|
|
'-g',
|
2013-11-20 15:13:49 +00:00
|
|
|
'-fno-exceptions',
|
|
|
|
'-fstrict-aliasing',
|
2013-11-20 18:06:10 +00:00
|
|
|
|
2013-11-20 15:13:49 +00:00
|
|
|
'-Wall',
|
|
|
|
'-Wextra',
|
|
|
|
'-Winit-self',
|
|
|
|
'-Wpointer-arith',
|
|
|
|
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-c++11-extensions',
|
|
|
|
],
|
|
|
|
'cflags_cc': [
|
|
|
|
'-fno-rtti',
|
|
|
|
'-Wnon-virtual-dtor',
|
|
|
|
],
|
2013-07-11 12:48:14 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'skia_warnings_as_errors', {
|
|
|
|
'cflags': [
|
|
|
|
'-Werror',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'skia_arch_type == "arm" and arm_thumb == 1', {
|
|
|
|
'cflags': [
|
|
|
|
'-mthumb',
|
|
|
|
],
|
2013-07-31 12:57:27 +00:00
|
|
|
# The --fix-cortex-a8 switch enables a link-time workaround for
|
|
|
|
# an erratum in certain Cortex-A8 processors. The workaround is
|
|
|
|
# enabled by default if you target the ARM v7-A arch profile.
|
|
|
|
# It can be enabled otherwise by specifying --fix-cortex-a8, or
|
|
|
|
# disabled unconditionally by specifying --no-fix-cortex-a8.
|
|
|
|
#
|
|
|
|
# The erratum only affects Thumb-2 code.
|
|
|
|
'conditions': [
|
|
|
|
[ 'arm_version < 7', {
|
|
|
|
'ldflags': [
|
|
|
|
'-Wl,--fix-cortex-a8',
|
|
|
|
],
|
|
|
|
}],
|
2013-07-11 12:48:14 +00:00
|
|
|
],
|
2013-07-31 12:57:27 +00:00
|
|
|
}],
|
|
|
|
[ 'skia_arch_type == "arm" and arm_version >= 7', {
|
2013-07-11 12:48:14 +00:00
|
|
|
'cflags': [
|
|
|
|
'-march=armv7-a',
|
|
|
|
],
|
2013-07-31 12:57:27 +00:00
|
|
|
'ldflags': [
|
|
|
|
'-march=armv7-a',
|
|
|
|
],
|
2013-07-11 12:48:14 +00:00
|
|
|
'conditions': [
|
|
|
|
[ 'arm_neon == 1', {
|
|
|
|
'defines': [
|
|
|
|
'__ARM_HAVE_NEON',
|
|
|
|
],
|
|
|
|
'cflags': [
|
|
|
|
'-mfpu=neon',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
[ 'arm_neon_optional == 1', {
|
|
|
|
'defines': [
|
|
|
|
'__ARM_HAVE_OPTIONAL_NEON_SUPPORT',
|
|
|
|
],
|
|
|
|
}],
|
2013-07-11 18:46:30 +00:00
|
|
|
[ 'skia_os != "chromeos"', {
|
|
|
|
'cflags': [
|
|
|
|
'-mfloat-abi=softfp',
|
|
|
|
],
|
|
|
|
}],
|
2013-07-11 12:48:14 +00:00
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
|
2013-06-11 15:52:19 +00:00
|
|
|
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl", "chromeos"]',
|
2011-09-15 14:24:33 +00:00
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_SAMPLES_FOR_X',
|
|
|
|
'SK_BUILD_FOR_UNIX',
|
|
|
|
],
|
|
|
|
'configurations': {
|
2013-09-13 19:32:43 +00:00
|
|
|
'Coverage': {
|
2013-11-20 18:06:10 +00:00
|
|
|
'cflags': ['--coverage'],
|
2013-09-13 19:32:43 +00:00
|
|
|
'ldflags': ['--coverage'],
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
'Debug': {
|
|
|
|
},
|
|
|
|
'Release': {
|
2013-06-20 20:28:54 +00:00
|
|
|
'cflags': [
|
|
|
|
'-O<(skia_release_optimization_level)',
|
|
|
|
],
|
2012-01-19 19:59:22 +00:00
|
|
|
'defines': [ 'NDEBUG' ],
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
2012-08-09 20:44:32 +00:00
|
|
|
'conditions' : [
|
2013-06-20 17:15:05 +00:00
|
|
|
[ 'skia_shared_lib', {
|
|
|
|
'cflags': [
|
|
|
|
'-fPIC',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'SKIA_DLL',
|
|
|
|
'SKIA_IMPLEMENTATION=1',
|
|
|
|
],
|
|
|
|
}],
|
2012-11-01 17:43:44 +00:00
|
|
|
[ 'skia_os == "nacl"', {
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_NACL',
|
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lppapi',
|
|
|
|
'-lppapi_cpp',
|
|
|
|
'-lnosys',
|
|
|
|
'-pthread',
|
|
|
|
],
|
|
|
|
},
|
2013-08-19 18:26:04 +00:00
|
|
|
}, { # skia_os != "nacl"
|
|
|
|
'link_settings': {
|
|
|
|
'ldflags': [
|
|
|
|
'-lstdc++',
|
|
|
|
'-lm',
|
|
|
|
],
|
|
|
|
},
|
2012-11-01 17:43:44 +00:00
|
|
|
}],
|
2013-08-19 18:26:04 +00:00
|
|
|
[ 'skia_os != "chromeos"', {
|
2013-06-11 15:52:19 +00:00
|
|
|
'conditions': [
|
2013-07-11 12:48:14 +00:00
|
|
|
[ 'skia_arch_width == 64 and skia_arch_type == "x86"', {
|
2013-06-11 15:52:19 +00:00
|
|
|
'cflags': [
|
|
|
|
'-m64',
|
|
|
|
],
|
|
|
|
'ldflags': [
|
|
|
|
'-m64',
|
|
|
|
],
|
|
|
|
}],
|
2013-07-11 12:48:14 +00:00
|
|
|
[ 'skia_arch_width == 32 and skia_arch_type == "x86"', {
|
2013-06-11 15:52:19 +00:00
|
|
|
'cflags': [
|
|
|
|
'-m32',
|
|
|
|
],
|
|
|
|
'ldflags': [
|
|
|
|
'-m32',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
}],
|
2013-10-08 15:16:36 +00:00
|
|
|
# Enable asan, tsan, etc.
|
|
|
|
[ 'skia_sanitizer', {
|
2013-07-03 15:55:05 +00:00
|
|
|
'cflags': [
|
2013-10-08 15:16:36 +00:00
|
|
|
'-fsanitize=<(skia_sanitizer)',
|
2013-07-03 15:55:05 +00:00
|
|
|
],
|
|
|
|
'ldflags': [
|
2013-10-08 15:16:36 +00:00
|
|
|
'-fsanitize=<(skia_sanitizer)',
|
2013-09-25 22:39:22 +00:00
|
|
|
],
|
2013-10-09 16:12:23 +00:00
|
|
|
'conditions' : [
|
|
|
|
[ 'skia_sanitizer == "thread"', {
|
|
|
|
'defines': [ 'DYNAMIC_ANNOTATIONS_ENABLED=1' ],
|
2013-10-10 17:24:17 +00:00
|
|
|
'cflags': [ '-fPIC' ],
|
2013-10-10 17:09:49 +00:00
|
|
|
'target_conditions': [
|
|
|
|
[ '_type == "executable"', {
|
|
|
|
'cflags': [ '-fPIE' ],
|
|
|
|
'ldflags': [ '-pie' ],
|
|
|
|
}],
|
|
|
|
],
|
2013-10-09 16:12:23 +00:00
|
|
|
}],
|
|
|
|
],
|
2013-09-25 22:39:22 +00:00
|
|
|
}],
|
2013-08-21 18:02:50 +00:00
|
|
|
[ 'skia_clang_build', {
|
|
|
|
'cflags': [
|
2013-10-08 15:16:36 +00:00
|
|
|
# Extra warnings we like but that only Clang knows about.
|
2013-08-21 18:02:50 +00:00
|
|
|
'-Wstring-conversion',
|
|
|
|
],
|
|
|
|
}],
|
2013-10-25 18:14:54 +00:00
|
|
|
[ 'skia_keep_frame_pointer', {
|
|
|
|
'cflags': [ '-fno-omit-frame-pointer' ],
|
|
|
|
}],
|
2011-09-15 14:24:33 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_os == "mac"',
|
2011-09-15 14:24:33 +00:00
|
|
|
{
|
2013-02-08 21:45:33 +00:00
|
|
|
'variables': {
|
|
|
|
'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_MAC',
|
|
|
|
],
|
2012-06-28 16:08:05 +00:00
|
|
|
'conditions' : [
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_arch_width == 64', {
|
2012-06-28 16:08:05 +00:00
|
|
|
'xcode_settings': {
|
2013-04-22 20:26:44 +00:00
|
|
|
'ARCHS': ['x86_64'],
|
2012-06-28 16:08:05 +00:00
|
|
|
},
|
|
|
|
}],
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_arch_width == 32', {
|
2012-06-28 16:08:05 +00:00
|
|
|
'xcode_settings': {
|
2013-04-22 20:26:44 +00:00
|
|
|
'ARCHS': ['i386'],
|
2013-03-22 13:16:06 +00:00
|
|
|
},
|
|
|
|
}],
|
|
|
|
[ 'skia_warnings_as_errors', {
|
|
|
|
'xcode_settings': {
|
2013-01-07 20:28:16 +00:00
|
|
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
|
|
'-Werror',
|
2013-07-23 11:13:56 +00:00
|
|
|
'-Wall',
|
|
|
|
'-Wextra',
|
|
|
|
'-Wno-unused-parameter',
|
2013-01-07 20:28:16 +00:00
|
|
|
],
|
2012-06-28 16:08:05 +00:00
|
|
|
},
|
|
|
|
}],
|
2013-07-24 16:20:05 +00:00
|
|
|
# This old compiler is really bad at figuring out when things are uninitialized, so ignore it.
|
|
|
|
[ '<(mac_sdk)==10.6', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
|
|
'-Wno-uninitialized',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
2012-06-28 16:08:05 +00:00
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
'configurations': {
|
2013-11-21 17:04:29 +00:00
|
|
|
'Coverage': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES',
|
|
|
|
'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS' : 'YES',
|
|
|
|
},
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
'Debug': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
},
|
2011-10-10 14:19:40 +00:00
|
|
|
'Release': {
|
|
|
|
'xcode_settings': {
|
2013-06-20 20:28:54 +00:00
|
|
|
'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
|
2011-10-10 14:19:40 +00:00
|
|
|
},
|
2012-01-19 19:59:22 +00:00
|
|
|
'defines': [ 'NDEBUG' ],
|
2011-10-10 14:19:40 +00:00
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'xcode_settings': {
|
2012-04-05 19:29:04 +00:00
|
|
|
'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
|
2013-02-08 21:45:33 +00:00
|
|
|
'conditions': [
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_osx_sdkroot==""', {
|
2013-02-08 21:45:33 +00:00
|
|
|
'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
|
|
|
|
}, {
|
|
|
|
'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
|
|
|
|
}],
|
|
|
|
],
|
2011-11-17 15:35:47 +00:00
|
|
|
# trying to get this to work, but it needs clang I think...
|
|
|
|
# 'WARNING_CFLAGS': '-Wexit-time-destructors',
|
2011-12-10 19:36:56 +00:00
|
|
|
'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
|
2012-06-06 12:12:28 +00:00
|
|
|
'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES',
|
|
|
|
'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES',
|
|
|
|
'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'YES',
|
|
|
|
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES',
|
|
|
|
'GCC_WARN_ABOUT_MISSING_PROTOTYPES': 'YES',
|
|
|
|
'GCC_WARN_ABOUT_POINTER_SIGNEDNESS': 'YES',
|
|
|
|
'GCC_WARN_ABOUT_RETURN_TYPE': 'YES',
|
|
|
|
'GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL': 'YES',
|
|
|
|
'GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED': 'YES',
|
|
|
|
'GCC_WARN_MISSING_PARENTHESES': 'YES',
|
|
|
|
'GCC_WARN_PROTOTYPE_CONVERSION': 'YES',
|
|
|
|
'GCC_WARN_SIGN_COMPARE': 'YES',
|
|
|
|
'GCC_WARN_TYPECHECK_CALLS_TO_PRINTF': 'YES',
|
|
|
|
'GCC_WARN_UNKNOWN_PRAGMAS': 'YES',
|
|
|
|
'GCC_WARN_UNUSED_FUNCTION': 'YES',
|
|
|
|
'GCC_WARN_UNUSED_LABEL': 'YES',
|
|
|
|
'GCC_WARN_UNUSED_VALUE': 'YES',
|
|
|
|
'GCC_WARN_UNUSED_VARIABLE': 'YES',
|
2012-10-02 15:42:21 +00:00
|
|
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
|
|
'-mssse3',
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
'-fvisibility-inlines-hidden',
|
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_os == "ios"',
|
2011-09-15 14:24:33 +00:00
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_IOS',
|
|
|
|
],
|
2013-03-22 13:16:06 +00:00
|
|
|
'conditions' : [
|
|
|
|
[ 'skia_warnings_as_errors', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
|
|
'-Werror',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
},
|
2012-09-24 19:33:57 +00:00
|
|
|
'Release': {
|
|
|
|
'xcode_settings': {
|
2013-06-20 20:28:54 +00:00
|
|
|
'GCC_OPTIMIZATION_LEVEL': '<(skia_release_optimization_level)',
|
2012-09-24 19:33:57 +00:00
|
|
|
},
|
|
|
|
'defines': [ 'NDEBUG' ],
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
'xcode_settings': {
|
2013-04-22 20:26:44 +00:00
|
|
|
'ARCHS': ['armv6', 'armv7'],
|
2012-09-20 15:45:41 +00:00
|
|
|
'CODE_SIGNING_REQUIRED': 'NO',
|
|
|
|
'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
|
2012-09-24 19:33:57 +00:00
|
|
|
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
|
2012-09-20 15:45:41 +00:00
|
|
|
'SDKROOT': 'iphoneos',
|
2012-09-24 19:33:57 +00:00
|
|
|
'TARGETED_DEVICE_FAMILY': '1,2',
|
2013-03-22 13:16:06 +00:00
|
|
|
'OTHER_CPLUSPLUSFLAGS': [
|
|
|
|
'-fvisibility=hidden',
|
|
|
|
'-fvisibility-inlines-hidden',
|
|
|
|
],
|
2012-09-28 18:33:11 +00:00
|
|
|
'GCC_THUMB_SUPPORT': 'NO',
|
2011-09-15 14:24:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2012-08-13 14:26:36 +00:00
|
|
|
|
2013-03-22 13:16:06 +00:00
|
|
|
[ 'skia_os == "android"',
|
2011-11-03 13:08:29 +00:00
|
|
|
{
|
|
|
|
'defines': [
|
|
|
|
'SK_BUILD_FOR_ANDROID',
|
2013-11-11 18:36:46 +00:00
|
|
|
'SK_FONTHOST_DOES_NOT_USE_FONTMGR',
|
2011-11-03 13:08:29 +00:00
|
|
|
],
|
|
|
|
'configurations': {
|
|
|
|
'Debug': {
|
|
|
|
'cflags': ['-g']
|
|
|
|
},
|
|
|
|
'Release': {
|
2013-04-04 19:42:51 +00:00
|
|
|
'cflags': ['-O2'],
|
2012-01-19 19:59:22 +00:00
|
|
|
'defines': [ 'NDEBUG' ],
|
2011-11-03 13:08:29 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
'libraries': [
|
|
|
|
'-lstdc++',
|
|
|
|
'-lm',
|
2011-11-08 19:03:43 +00:00
|
|
|
'-llog',
|
2011-11-03 13:08:29 +00:00
|
|
|
],
|
2011-12-05 13:55:55 +00:00
|
|
|
'cflags': [
|
2012-07-25 15:17:03 +00:00
|
|
|
'-fuse-ld=gold',
|
2011-12-05 13:55:55 +00:00
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
'conditions': [
|
2013-06-03 12:10:19 +00:00
|
|
|
[ 'skia_shared_lib', {
|
|
|
|
'cflags': [
|
|
|
|
'-fPIC',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'SKIA_DLL',
|
|
|
|
'SKIA_IMPLEMENTATION=1',
|
|
|
|
],
|
|
|
|
}],
|
2013-07-11 12:48:14 +00:00
|
|
|
[ 'skia_profile_enabled == 1', {
|
|
|
|
'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'],
|
2011-11-03 17:31:41 +00:00
|
|
|
}],
|
2012-08-13 14:26:36 +00:00
|
|
|
],
|
2011-11-03 13:08:29 +00:00
|
|
|
},
|
|
|
|
],
|
2011-09-15 14:24:33 +00:00
|
|
|
|
2012-01-26 21:26:40 +00: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': [
|
2012-11-01 17:43:44 +00:00
|
|
|
'SK_USE_POSIX_THREADS',
|
2012-01-26 21:26:40 +00:00
|
|
|
],
|
|
|
|
}],
|
2011-09-15 14:24:33 +00:00
|
|
|
], # end 'conditions'
|
2012-09-26 15:48:43 +00:00
|
|
|
# The Xcode SYMROOT must be at the root. See build/common.gypi in chromium for more details
|
|
|
|
'xcode_settings': {
|
|
|
|
'SYMROOT': '<(DEPTH)/xcodebuild',
|
|
|
|
},
|
2011-09-15 14:24:33 +00:00
|
|
|
}
|