2013-03-13 19:12:05 +00:00
|
|
|
{
|
2015-04-02 06:05:43 +00:00
|
|
|
'includes': [
|
|
|
|
'vendor/download/libchromiumcontent/filenames.gypi',
|
|
|
|
],
|
2013-03-13 19:12:05 +00:00
|
|
|
'variables': {
|
2015-04-09 02:49:36 +00:00
|
|
|
# Build with clang on Linux and Mac.
|
|
|
|
'clang%': 1,
|
|
|
|
|
2015-04-05 14:51:38 +00:00
|
|
|
'libchromiumcontent_src_dir': '<(libchromiumcontent_root_dir)/src',
|
2015-04-02 14:14:18 +00:00
|
|
|
'libchromiumcontent_component%': 1,
|
|
|
|
'conditions': [
|
|
|
|
# The "libchromiumcontent_component" is defined when calling "gyp".
|
|
|
|
['libchromiumcontent_component', {
|
|
|
|
'libchromiumcontent_dir%': '<(libchromiumcontent_root_dir)/shared_library',
|
|
|
|
'libchromiumcontent_libraries%': '<(libchromiumcontent_shared_libraries)',
|
2015-04-09 12:47:47 +00:00
|
|
|
'libchromiumcontent_v8_libraries%': '<(libchromiumcontent_shared_v8_libraries)',
|
2015-04-02 14:14:18 +00:00
|
|
|
}, {
|
|
|
|
'libchromiumcontent_dir%': '<(libchromiumcontent_root_dir)/static_library',
|
|
|
|
'libchromiumcontent_libraries%': '<(libchromiumcontent_static_libraries)',
|
2015-04-09 12:47:47 +00:00
|
|
|
'libchromiumcontent_v8_libraries%': '<(libchromiumcontent_static_v8_libraries)',
|
2015-04-02 14:14:18 +00:00
|
|
|
}],
|
|
|
|
],
|
2013-03-13 19:12:05 +00:00
|
|
|
},
|
|
|
|
'target_defaults': {
|
2015-04-09 02:03:01 +00:00
|
|
|
'includes': [
|
|
|
|
# Rules for excluding e.g. foo_win.cc from the build on non-Windows.
|
|
|
|
'filename_rules.gypi',
|
|
|
|
],
|
2015-04-09 02:40:49 +00:00
|
|
|
# Putting this in "configurations" will make overrides not working.
|
2013-03-13 19:12:05 +00:00
|
|
|
'xcode_settings': {
|
2013-03-14 17:06:17 +00:00
|
|
|
'ALWAYS_SEARCH_USER_PATHS': 'NO',
|
2013-12-11 07:54:46 +00:00
|
|
|
'ARCHS': ['x86_64'],
|
2013-03-13 19:12:05 +00:00
|
|
|
'COMBINE_HIDPI_IMAGES': 'YES',
|
2013-04-26 18:13:45 +00:00
|
|
|
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
|
2013-03-13 19:12:05 +00:00
|
|
|
'GCC_ENABLE_CPP_RTTI': 'NO',
|
|
|
|
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES',
|
2015-04-09 02:40:49 +00:00
|
|
|
'MACOSX_DEPLOYMENT_TARGET': '10.8',
|
2013-03-13 19:12:05 +00:00
|
|
|
'RUN_CLANG_STATIC_ANALYZER': 'YES',
|
2015-04-09 02:40:49 +00:00
|
|
|
'SDKROOT': 'macosx',
|
2013-03-14 17:06:17 +00:00
|
|
|
'USE_HEADER_MAP': 'NO',
|
2013-03-13 19:12:05 +00:00
|
|
|
'WARNING_CFLAGS': [
|
|
|
|
'-Wall',
|
|
|
|
'-Wextra',
|
|
|
|
'-Wno-unused-parameter',
|
|
|
|
'-Wno-missing-field-initializers',
|
|
|
|
],
|
|
|
|
},
|
2015-04-09 06:03:42 +00:00
|
|
|
'msvs_configuration_attributes': {
|
|
|
|
'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
|
|
|
|
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
|
|
|
|
'CharacterSet': '1',
|
|
|
|
},
|
|
|
|
'msvs_system_include_dirs': [
|
|
|
|
'$(VSInstallDir)/VC/atlmfc/include',
|
|
|
|
],
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2015-05-12 08:55:11 +00:00
|
|
|
'RuntimeLibrary': '2', # /MD (nondebug DLL)
|
2015-04-09 06:03:42 +00:00
|
|
|
'AdditionalOptions': ['/MP'],
|
|
|
|
'MinimalRebuild': 'false',
|
|
|
|
'BufferSecurityCheck': 'true',
|
|
|
|
'EnableFunctionLevelLinking': 'true',
|
|
|
|
'RuntimeTypeInfo': 'false',
|
|
|
|
'WarningLevel': '4',
|
|
|
|
'WarnAsError': 'true',
|
|
|
|
'DebugInformationFormat': '3',
|
|
|
|
# Programs that use the Standard C++ library must be compiled with
|
|
|
|
# C++
|
|
|
|
# exception handling enabled.
|
|
|
|
# http://support.microsoft.com/kb/154419
|
|
|
|
'ExceptionHandling': 1,
|
|
|
|
},
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'GenerateDebugInformation': 'true',
|
|
|
|
'MapFileName': '$(OutDir)\\$(TargetName).map',
|
|
|
|
'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
|
|
|
|
'AdditionalOptions': [
|
|
|
|
# ATL 8.0 included in WDK 7.1 makes the linker to generate
|
|
|
|
# following
|
|
|
|
# warnings:
|
|
|
|
# - warning LNK4254: section 'ATL' (50000040) merged into
|
|
|
|
# '.rdata' (40000040) with different attributes
|
|
|
|
# - warning LNK4078: multiple 'ATL' sections found with
|
|
|
|
# different attributes
|
|
|
|
'/ignore:4254',
|
|
|
|
'/ignore:4078',
|
|
|
|
# views_chromiumcontent.lib generates this warning because it's
|
|
|
|
# symobls are defined as dllexport but used as static library:
|
|
|
|
# - warning LNK4217: locally defined symbol imported in function
|
|
|
|
# - warning LNK4049: locally defined symbol imported
|
|
|
|
'/ignore:4217',
|
|
|
|
'/ignore:4049',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'msvs_disabled_warnings': [
|
|
|
|
4100, # unreferenced formal parameter
|
2015-05-23 03:10:40 +00:00
|
|
|
4121, # alignment of a member was sensitive to packing
|
2015-04-09 06:03:42 +00:00
|
|
|
4127, # conditional expression is constant
|
|
|
|
4189, # local variable is initialized but not referenced
|
|
|
|
4244, # 'initializing' : conversion from 'double' to 'size_t', possible loss of data
|
|
|
|
4245, # 'initializing' : conversion from 'int' to 'const net::QuicVersionTag', signed/unsigned mismatch
|
|
|
|
4251, # class 'std::xx' needs to have dll-interface.
|
|
|
|
4310, # cast truncates constant value
|
|
|
|
4355, # 'this' : used in base member initializer list
|
|
|
|
4480, # nonstandard extension used: specifying underlying type for enum
|
|
|
|
4481, # nonstandard extension used: override specifier 'override'
|
|
|
|
4510, # default constructor could not be generated
|
|
|
|
4512, # assignment operator could not be generated
|
|
|
|
4610, # user defined constructor required
|
|
|
|
4702, # unreachable code
|
|
|
|
4819, # The file contains a character that cannot be represented in the current code page
|
|
|
|
],
|
2013-03-13 19:12:05 +00:00
|
|
|
'configurations': {
|
2015-04-02 14:14:18 +00:00
|
|
|
# The "Debug" and "Release" configurations are not actually used.
|
|
|
|
'Debug': {},
|
|
|
|
'Release': {},
|
|
|
|
|
2013-05-14 17:50:31 +00:00
|
|
|
'Common_Base': {
|
|
|
|
'abstract': 1,
|
2013-05-21 18:49:49 +00:00
|
|
|
'defines': [
|
2015-04-03 01:56:03 +00:00
|
|
|
# We are using Release version libchromiumcontent:
|
2013-05-21 18:49:49 +00:00
|
|
|
'NDEBUG',
|
2015-04-21 13:42:49 +00:00
|
|
|
# Needed by gin:
|
|
|
|
'V8_USE_EXTERNAL_STARTUP_DATA',
|
2014-08-31 10:28:53 +00:00
|
|
|
# From skia_for_chromium_defines.gypi:
|
|
|
|
'SK_SUPPORT_LEGACY_GETTOPDEVICE',
|
|
|
|
'SK_SUPPORT_LEGACY_BITMAP_CONFIG',
|
|
|
|
'SK_SUPPORT_LEGACY_DEVICE_VIRTUAL_ISOPAQUE',
|
|
|
|
'SK_SUPPORT_LEGACY_N32_NAME',
|
|
|
|
'SK_SUPPORT_LEGACY_SETCONFIG',
|
|
|
|
'SK_IGNORE_ETC1_SUPPORT',
|
|
|
|
'SK_IGNORE_GPU_DITHER',
|
2013-05-21 18:49:49 +00:00
|
|
|
],
|
2013-08-06 21:29:08 +00:00
|
|
|
'conditions': [
|
2014-07-02 14:08:43 +00:00
|
|
|
['OS!="mac"', {
|
2014-06-27 17:40:06 +00:00
|
|
|
'defines': [
|
2014-07-03 06:59:14 +00:00
|
|
|
'TOOLKIT_VIEWS',
|
2014-06-27 17:40:06 +00:00
|
|
|
'USE_AURA',
|
|
|
|
],
|
|
|
|
}],
|
2013-08-06 21:29:08 +00:00
|
|
|
['OS not in ["mac", "win"]', {
|
|
|
|
'defines': [
|
|
|
|
'USE_X11',
|
|
|
|
],
|
|
|
|
}],
|
2015-04-09 01:58:07 +00:00
|
|
|
['OS=="linux"', {
|
2015-04-12 07:55:44 +00:00
|
|
|
'defines': [
|
|
|
|
'_LARGEFILE_SOURCE',
|
|
|
|
'_LARGEFILE64_SOURCE',
|
2015-04-12 08:15:23 +00:00
|
|
|
'_FILE_OFFSET_BITS=64',
|
2015-04-12 07:55:44 +00:00
|
|
|
],
|
2015-04-09 01:58:07 +00:00
|
|
|
'cflags_cc': [
|
|
|
|
'-D__STRICT_ANSI__',
|
|
|
|
'-std=gnu++11',
|
|
|
|
'-fno-rtti',
|
|
|
|
],
|
|
|
|
}], # OS=="linux"
|
2015-04-09 06:03:42 +00:00
|
|
|
['OS=="win"', {
|
|
|
|
'include_dirs': [
|
|
|
|
'<(libchromiumcontent_src_dir)/third_party/wtl/include',
|
|
|
|
],
|
|
|
|
'defines': [
|
|
|
|
'_WIN32_WINNT=0x0602',
|
|
|
|
'WINVER=0x0602',
|
|
|
|
'WIN32',
|
|
|
|
'_WINDOWS',
|
|
|
|
'NOMINMAX',
|
|
|
|
'PSAPI_VERSION=1',
|
|
|
|
'_CRT_RAND_S',
|
|
|
|
'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
|
|
|
|
'WIN32_LEAN_AND_MEAN',
|
|
|
|
'_ATL_NO_OPENGL',
|
|
|
|
'_SECURE_ATL',
|
|
|
|
],
|
2015-04-11 10:58:46 +00:00
|
|
|
'conditions': [
|
|
|
|
['target_arch=="x64"', {
|
|
|
|
'msvs_configuration_platform': 'x64',
|
|
|
|
'msvs_settings': {
|
|
|
|
'VCLinkerTool': {
|
|
|
|
'MinimumRequiredVersion': '5.02', # Server 2003.
|
|
|
|
'TargetMachine': '17', # x86 - 64
|
|
|
|
# Doesn't exist x64 SDK. Should use oleaut32 in any case.
|
|
|
|
'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
|
|
|
|
},
|
|
|
|
'VCLibrarianTool': {
|
|
|
|
'TargetMachine': '17', # x64
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2015-04-09 06:03:42 +00:00
|
|
|
}], # OS=="win"
|
2013-08-06 21:29:08 +00:00
|
|
|
],
|
2015-04-05 15:03:34 +00:00
|
|
|
}, # Common_Base
|
|
|
|
'Debug_Base': {
|
2015-04-11 04:06:33 +00:00
|
|
|
'abstract': 1,
|
2015-04-09 01:58:07 +00:00
|
|
|
'defines': [
|
|
|
|
# Use this instead of "NDEBUG" to determine whether we are in
|
|
|
|
# Debug build, because "NDEBUG" is already used by Chromium.
|
|
|
|
'DEBUG',
|
|
|
|
# Require when using libchromiumcontent.
|
|
|
|
'COMPONENT_BUILD',
|
|
|
|
'GURL_DLL',
|
|
|
|
'SKIA_DLL',
|
|
|
|
'USING_V8_SHARED',
|
|
|
|
'WEBKIT_DLL',
|
|
|
|
],
|
2015-04-05 15:03:34 +00:00
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2015-04-09 05:30:21 +00:00
|
|
|
'Optimization': '0', # 0 = /Od
|
|
|
|
# See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
|
|
|
|
'BasicRuntimeChecks': '3', # 3 = all checks enabled, 0 = off
|
2013-05-22 15:15:04 +00:00
|
|
|
},
|
2015-04-05 15:03:34 +00:00
|
|
|
},
|
|
|
|
}, # Debug_Base
|
|
|
|
'Release_Base': {
|
2015-04-11 04:06:33 +00:00
|
|
|
'abstract': 1,
|
2015-04-05 15:03:34 +00:00
|
|
|
'msvs_settings': {
|
|
|
|
'VCCLCompilerTool': {
|
2015-04-11 15:27:41 +00:00
|
|
|
# 1, optimizeMinSpace, Minimize Size (/O1)
|
|
|
|
'Optimization': '1',
|
|
|
|
# 2, favorSize - Favor small code (/Os)
|
|
|
|
'FavorSizeOrSpeed': '2',
|
2015-04-09 05:30:21 +00:00
|
|
|
# See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
|
|
|
|
'InlineFunctionExpansion': '2', # 2 = max
|
|
|
|
# See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
|
|
|
|
'OmitFramePointers': 'false',
|
|
|
|
# The above is not sufficient (http://crbug.com/106711): it
|
|
|
|
# simply eliminates an explicit "/Oy", but both /O2 and /Ox
|
|
|
|
# perform FPO regardless, so we must explicitly disable.
|
|
|
|
# We still want the false setting above to avoid having
|
|
|
|
# "/Oy /Oy-" and warnings about overriding.
|
|
|
|
'AdditionalOptions': ['/Oy-'],
|
2015-04-05 15:03:34 +00:00
|
|
|
},
|
2015-05-20 05:52:24 +00:00
|
|
|
'VCLinkerTool': {
|
|
|
|
# Turn off incremental linking to save binary size.
|
|
|
|
'LinkIncremental': '1', # /INCREMENTAL:NO
|
|
|
|
},
|
2015-04-05 15:03:34 +00:00
|
|
|
},
|
2015-04-09 01:58:07 +00:00
|
|
|
'conditions': [
|
|
|
|
['OS=="linux"', {
|
|
|
|
'cflags': [
|
|
|
|
'-O2',
|
2015-04-09 04:05:07 +00:00
|
|
|
# Generate symbols, will be stripped later.
|
|
|
|
'-g',
|
2015-04-09 01:58:07 +00:00
|
|
|
# Don't emit the GCC version ident directives, they just end up
|
|
|
|
# in the .comment section taking up binary size.
|
|
|
|
'-fno-ident',
|
|
|
|
# Put data and code in their own sections, so that unused symbols
|
|
|
|
# can be removed at link time with --gc-sections.
|
|
|
|
'-fdata-sections',
|
|
|
|
'-ffunction-sections',
|
|
|
|
],
|
|
|
|
'ldflags': [
|
|
|
|
# Specifically tell the linker to perform optimizations.
|
|
|
|
# See http://lwn.net/Articles/192624/ .
|
|
|
|
'-Wl,-O1',
|
|
|
|
'-Wl,--as-needed',
|
|
|
|
'-Wl,--gc-sections',
|
|
|
|
],
|
|
|
|
}], # OS=="linux"
|
|
|
|
],
|
2015-04-05 15:03:34 +00:00
|
|
|
}, # Release_Base
|
|
|
|
'conditions': [
|
2015-04-06 13:41:36 +00:00
|
|
|
['libchromiumcontent_component', {
|
|
|
|
'D': {
|
|
|
|
'inherit_from': ['Common_Base', 'Debug_Base'],
|
|
|
|
}, # D (Debug)
|
|
|
|
}, {
|
|
|
|
'R': {
|
|
|
|
'inherit_from': ['Common_Base', 'Release_Base'],
|
|
|
|
}, # R (Release)
|
|
|
|
}], # libchromiumcontent_component
|
2015-04-05 15:03:34 +00:00
|
|
|
['OS=="win"', {
|
2015-04-09 06:03:42 +00:00
|
|
|
'conditions': [
|
2015-04-11 10:58:46 +00:00
|
|
|
# gyp always assumes "_x64" targets on Windows.
|
2015-04-09 06:03:42 +00:00
|
|
|
['libchromiumcontent_component', {
|
|
|
|
'D_x64': {
|
2015-04-11 10:58:46 +00:00
|
|
|
'inherit_from': ['Common_Base', 'Debug_Base'],
|
2015-04-09 06:03:42 +00:00
|
|
|
}, # D_x64
|
|
|
|
}, {
|
|
|
|
'R_x64': {
|
2015-04-11 10:58:46 +00:00
|
|
|
'inherit_from': ['Common_Base', 'Release_Base'],
|
2015-04-09 06:03:42 +00:00
|
|
|
}, # R_x64
|
|
|
|
}], # libchromiumcontent_component
|
|
|
|
],
|
2015-04-05 15:03:34 +00:00
|
|
|
}], # OS=="win"
|
2015-04-02 14:14:18 +00:00
|
|
|
],
|
2015-04-09 03:30:01 +00:00
|
|
|
}, # configurations
|
|
|
|
'target_conditions': [
|
|
|
|
# Putting this under "configurations" doesn't work.
|
|
|
|
['libchromiumcontent_component', {
|
|
|
|
'xcode_settings': {
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '0',
|
|
|
|
},
|
|
|
|
}, { # "Debug_Base"
|
|
|
|
'xcode_settings': {
|
|
|
|
'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
|
|
|
|
'GCC_OPTIMIZATION_LEVEL': '2',
|
|
|
|
'OTHER_CFLAGS': [
|
|
|
|
'-fno-inline',
|
|
|
|
'-fno-omit-frame-pointer',
|
|
|
|
'-fno-builtin',
|
|
|
|
'-fno-optimize-sibling-calls',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
}], # "Release_Base"
|
|
|
|
['OS=="mac" and libchromiumcontent_component==0 and _type in ["executable", "shared_library"]', {
|
|
|
|
'xcode_settings': {
|
|
|
|
# Generates symbols and strip the binary.
|
|
|
|
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
|
|
|
|
'DEPLOYMENT_POSTPROCESSING': 'YES',
|
|
|
|
'STRIP_INSTALLED_PRODUCT': 'YES',
|
|
|
|
'STRIPFLAGS': '-x',
|
|
|
|
},
|
|
|
|
}], # OS=="mac" and libchromiumcontent_component==0 and _type in ["executable", "shared_library"]
|
2015-04-09 04:05:07 +00:00
|
|
|
['OS=="linux" and target_arch=="ia32" and _toolset=="target"', {
|
|
|
|
'ldflags': [
|
|
|
|
# Workaround for linker OOM.
|
|
|
|
'-Wl,--no-keep-memory',
|
|
|
|
],
|
|
|
|
}],
|
2015-04-09 03:30:01 +00:00
|
|
|
], # target_conditions
|
2015-04-09 02:49:36 +00:00
|
|
|
}, # target_defaults
|
2013-05-14 17:50:31 +00:00
|
|
|
'conditions': [
|
2015-04-09 02:49:36 +00:00
|
|
|
['clang', {
|
|
|
|
'make_global_settings': [
|
|
|
|
['CC', '/usr/bin/clang'],
|
|
|
|
['CXX', '/usr/bin/clang++'],
|
|
|
|
['LINK', '$(CXX)'],
|
|
|
|
['CC.host', '$(CC)'],
|
|
|
|
['CXX.host', '$(CXX)'],
|
|
|
|
['LINK.host', '$(LINK)'],
|
|
|
|
],
|
|
|
|
'target_defaults': {
|
|
|
|
'cflags_cc': [
|
|
|
|
'-std=c++11',
|
|
|
|
],
|
|
|
|
'xcode_settings': {
|
|
|
|
'CC': '/usr/bin/clang',
|
|
|
|
'LDPLUSPLUS': '/usr/bin/clang++',
|
|
|
|
'OTHER_CFLAGS': [
|
|
|
|
'-fcolor-diagnostics',
|
|
|
|
],
|
|
|
|
|
|
|
|
'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
|
|
|
|
'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++
|
|
|
|
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
|
|
|
|
},
|
2015-04-09 03:30:01 +00:00
|
|
|
'target_conditions': [
|
|
|
|
['_type in ["executable", "shared_library"]', {
|
|
|
|
'xcode_settings': {
|
|
|
|
# On some machines setting CLANG_CXX_LIBRARY doesn't work for
|
|
|
|
# linker.
|
|
|
|
'OTHER_LDFLAGS': [ '-stdlib=libc++' ],
|
|
|
|
},
|
|
|
|
}],
|
|
|
|
],
|
2015-04-09 02:49:36 +00:00
|
|
|
},
|
|
|
|
}], # clang
|
2013-05-14 17:50:31 +00:00
|
|
|
],
|
2013-03-13 19:12:05 +00:00
|
|
|
}
|