michael@0: # Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: # IMPORTANT: michael@0: # Please don't directly include this file if you are building via gyp_chromium, michael@0: # since gyp_chromium is automatically forcing its inclusion. michael@0: { michael@0: # Variables expected to be overriden on the GYP command line (-D) or by michael@0: # ~/.gyp/include.gypi. michael@0: 'variables': { michael@0: # Putting a variables dict inside another variables dict looks kind of michael@0: # weird. This is done so that 'host_arch', 'chromeos', etc are defined as michael@0: # variables within the outer variables dict here. This is necessary michael@0: # to get these variables defined for the conditions within this variables michael@0: # dict that operate on these variables. michael@0: 'variables': { michael@0: 'variables': { michael@0: 'variables': { michael@0: 'variables': { michael@0: # Whether we're building a ChromeOS build. michael@0: 'chromeos%': 0, michael@0: michael@0: # Whether or not we are using the Aura windowing framework. michael@0: 'use_aura%': 0, michael@0: michael@0: # Whether or not we are building the Ash shell. michael@0: 'use_ash%': 0, michael@0: }, michael@0: # Copy conditionally-set variables out one scope. michael@0: 'chromeos%': '<(chromeos)', michael@0: 'use_aura%': '<(use_aura)', michael@0: 'use_ash%': '<(use_ash)', michael@0: michael@0: # Whether we are using Views Toolkit michael@0: 'toolkit_views%': 0, michael@0: michael@0: # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 michael@0: 'use_openssl%': 0, michael@0: michael@0: 'use_ibus%': 0, michael@0: michael@0: # Disable viewport meta tag by default. michael@0: 'enable_viewport%': 0, michael@0: michael@0: # Enable HiDPI support. michael@0: 'enable_hidpi%': 0, michael@0: michael@0: # Enable touch optimized art assets and metrics. michael@0: 'enable_touch_ui%': 0, michael@0: michael@0: # Is this change part of the android upstream bringup? michael@0: # Allows us to *temporarily* disable certain things for michael@0: # staging. Only set to 1 in a GYP_DEFINES. michael@0: 'android_upstream_bringup%': 0, michael@0: michael@0: # Override buildtype to select the desired build flavor. michael@0: # Dev - everyday build for development/testing michael@0: # Official - release build (generally implies additional processing) michael@0: # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp michael@0: # conversion is done), some of the things which are now controlled by michael@0: # 'branding', such as symbol generation, will need to be refactored michael@0: # based on 'buildtype' (i.e. we don't care about saving symbols for michael@0: # non-Official # builds). michael@0: 'buildtype%': 'Dev', michael@0: michael@0: 'conditions': [ michael@0: # ChromeOS implies ash. michael@0: ['chromeos==1', { michael@0: 'use_ash%': 1, michael@0: 'use_aura%': 1, michael@0: }], michael@0: michael@0: # For now, Windows builds that |use_aura| should also imply using michael@0: # ash. This rule should be removed for the future when Windows is michael@0: # using the aura windows without the ash interface. michael@0: ['use_aura==1 and OS=="win"', { michael@0: 'use_ash%': 1, michael@0: }], michael@0: ['use_ash==1', { michael@0: 'use_aura%': 1, michael@0: }], michael@0: michael@0: # A flag for BSD platforms michael@0: ['OS=="dragonfly" or OS=="freebsd" or OS=="netbsd" or \ michael@0: OS=="openbsd"', { michael@0: 'os_bsd%': 1, michael@0: }, { michael@0: 'os_bsd%': 0, michael@0: }], michael@0: ], michael@0: }, michael@0: # Copy conditionally-set variables out one scope. michael@0: 'chromeos%': '<(chromeos)', michael@0: 'use_aura%': '<(use_aura)', michael@0: 'use_ash%': '<(use_ash)', michael@0: 'os_bsd%': '<(os_bsd)', michael@0: 'use_openssl%': '<(use_openssl)', michael@0: 'use_ibus%': '<(use_ibus)', michael@0: 'enable_viewport%': '<(enable_viewport)', michael@0: 'enable_hidpi%': '<(enable_hidpi)', michael@0: 'enable_touch_ui%': '<(enable_touch_ui)', michael@0: 'android_upstream_bringup%': '<(android_upstream_bringup)', michael@0: 'buildtype%': '<(buildtype)', michael@0: michael@0: # Sets whether we're building with the Android SDK/NDK (and hence with michael@0: # Ant, value 0), or as part of the Android system (and hence with the michael@0: # Android build system, value 1). michael@0: 'android_build_type%': 0, michael@0: michael@0: # Compute the architecture that we're building on. michael@0: 'conditions': [ michael@0: ['OS=="win" or OS=="ios"', { michael@0: 'host_arch%': 'ia32', michael@0: }, { michael@0: # This handles the Unix platforms for which there is some support. michael@0: # Anything else gets passed through, which probably won't work very michael@0: # well; such hosts should pass an explicit target_arch to gyp. michael@0: 'host_arch%': michael@0: '. Additional michael@0: # documentation on these macros is available at michael@0: # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 michael@0: # Chrome normally builds with the Mac OS X 10.6 SDK and sets the michael@0: # deployment target to 10.6. Other projects, such as O3D, may michael@0: # override these defaults. michael@0: michael@0: # Normally, mac_sdk_min is used to find an SDK that Xcode knows michael@0: # about that is at least the specified version. In official builds, michael@0: # the SDK must match mac_sdk_min exactly. If the SDK is installed michael@0: # someplace that Xcode doesn't know about, set mac_sdk_path to the michael@0: # path to the SDK; when set to a non-empty string, SDK detection michael@0: # based on mac_sdk_min will be bypassed entirely. michael@0: 'mac_sdk_min%': '10.6', michael@0: 'mac_sdk_path%': '', michael@0: michael@0: 'mac_deployment_target%': '10.6', michael@0: }, michael@0: michael@0: 'mac_sdk_min': '<(mac_sdk_min)', michael@0: 'mac_sdk_path': '<(mac_sdk_path)', michael@0: 'mac_deployment_target': '<(mac_deployment_target)', michael@0: michael@0: # Enable clang on mac by default! michael@0: 'clang%': 1, michael@0: michael@0: # Compile in Breakpad support by default so that it can be michael@0: # tested, even if it is not enabled by default at runtime. michael@0: 'mac_breakpad_compiled_in%': 1, michael@0: 'conditions': [ michael@0: # mac_product_name is set to the name of the .app bundle as it should michael@0: # appear on disk. This duplicates data from michael@0: # chrome/app/theme/chromium/BRANDING and michael@0: # chrome/app/theme/google_chrome/BRANDING, but is necessary to get michael@0: # these names into the build system. michael@0: ['branding=="Chrome"', { michael@0: 'mac_product_name%': 'Google Chrome', michael@0: }, { # else: branding!="Chrome" michael@0: 'mac_product_name%': 'Chromium', michael@0: }], michael@0: michael@0: ['branding=="Chrome" and buildtype=="Official"', { michael@0: 'mac_sdk%': ', where michael@0: # typically changes with each launch. This in turn michael@0: # means that breakpoints in Chrome.dll don't stick from one launch michael@0: # to the next. For this reason, we turn ASLR off in debug builds. michael@0: # Note that this is a three-way bool, where 0 means to pick up michael@0: # the default setting, 1 is off and 2 is on. michael@0: 'RandomizedBaseAddress': 1, michael@0: }, michael@0: 'VCResourceCompilerTool': { michael@0: 'PreprocessorDefinitions': ['_DEBUG'], michael@0: }, michael@0: }, michael@0: 'conditions': [ michael@0: ['OS=="linux" or OS=="android"', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'cflags': [ michael@0: '<@(debug_extra_cflags)', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: # Disabled on iOS because it was causing a crash on startup. michael@0: # TODO(michelea): investigate, create a reduced test and possibly michael@0: # submit a radar. michael@0: ['release_valgrind_build==0 and OS!="ios"', { michael@0: 'xcode_settings': { michael@0: 'OTHER_CFLAGS': [ michael@0: '-fstack-protector-all', # Implies -fstack-protector michael@0: ], michael@0: }, michael@0: }], michael@0: ], michael@0: }, michael@0: 'Release_Base': { michael@0: 'abstract': 1, michael@0: 'defines': [ michael@0: 'NDEBUG', michael@0: ], michael@0: 'xcode_settings': { michael@0: 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip michael@0: 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', michael@0: 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], michael@0: }, michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', michael@0: 'conditions': [ michael@0: # In official builds, each target will self-select michael@0: # an optimization level. michael@0: ['buildtype!="Official"', { michael@0: 'Optimization': '<(win_release_Optimization)', michael@0: }, michael@0: ], michael@0: # According to MSVS, InlineFunctionExpansion=0 means michael@0: # "default inlining", not "/Ob0". michael@0: # Thus, we have to handle InlineFunctionExpansion==0 separately. michael@0: ['win_release_InlineFunctionExpansion==0', { michael@0: 'AdditionalOptions': ['/Ob0'], michael@0: }], michael@0: ['win_release_InlineFunctionExpansion!=""', { michael@0: 'InlineFunctionExpansion': michael@0: '<(win_release_InlineFunctionExpansion)', michael@0: }], michael@0: michael@0: # if win_release_OmitFramePointers is blank, leave as default michael@0: ['win_release_OmitFramePointers==1', { michael@0: 'OmitFramePointers': 'true', michael@0: }], michael@0: ['win_release_OmitFramePointers==0', { michael@0: 'OmitFramePointers': 'false', michael@0: # The above is not sufficient (http://crbug.com/106711): it michael@0: # simply eliminates an explicit "/Oy", but both /O2 and /Ox michael@0: # perform FPO regardless, so we must explicitly disable. michael@0: # We still want the false setting above to avoid having michael@0: # "/Oy /Oy-" and warnings about overriding. michael@0: 'AdditionalOptions': ['/Oy-'], michael@0: }], michael@0: ], michael@0: 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], michael@0: }, michael@0: 'VCLinkerTool': { michael@0: # LinkIncremental is a tri-state boolean, where 0 means default michael@0: # (i.e., inherit from parent solution), 1 means false, and michael@0: # 2 means true. michael@0: 'LinkIncremental': '1', michael@0: # This corresponds to the /PROFILE flag which ensures the PDB michael@0: # file contains FIXUP information (growing the PDB file by about michael@0: # 5%) but does not otherwise alter the output binary. This michael@0: # information is used by the Syzygy optimization tool when michael@0: # decomposing the release image. michael@0: 'Profile': 'true', michael@0: }, michael@0: }, michael@0: 'conditions': [ michael@0: ['msvs_use_common_release', { michael@0: 'includes': ['release.gypi'], michael@0: }], michael@0: ['release_valgrind_build==0', { michael@0: 'defines': [ michael@0: 'NVALGRIND', michael@0: 'DYNAMIC_ANNOTATIONS_ENABLED=0', michael@0: ], michael@0: }, { michael@0: 'defines': [ michael@0: 'DYNAMIC_ANNOTATIONS_ENABLED=1', michael@0: 'WTF_USE_DYNAMIC_ANNOTATIONS=1', michael@0: ], michael@0: }], michael@0: ['win_use_allocator_shim==0', { michael@0: 'defines': ['NO_TCMALLOC'], michael@0: }], michael@0: ['OS=="linux"', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'cflags': [ michael@0: '<@(release_extra_cflags)', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ], michael@0: }, michael@0: # michael@0: # Concrete configurations michael@0: # michael@0: 'Debug': { michael@0: 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], michael@0: }, michael@0: 'Release': { michael@0: 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], michael@0: }, michael@0: 'conditions': [ michael@0: [ 'OS=="win"', { michael@0: # TODO(bradnelson): add a gyp mechanism to make this more graceful. michael@0: 'Debug_x64': { michael@0: 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], michael@0: }, michael@0: 'Release_x64': { michael@0: 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], michael@0: }, michael@0: }], michael@0: ], michael@0: }, michael@0: }, michael@0: 'conditions': [ michael@0: ['os_posix==1 and OS!="mac" and OS!="ios"', { michael@0: 'target_defaults': { michael@0: # Enable -Werror by default, but put it in a variable so it can michael@0: # be disabled in ~/.gyp/include.gypi on the valgrind builders. michael@0: 'variables': { michael@0: 'werror%': '-Werror', michael@0: 'libraries_for_target%': '', michael@0: }, michael@0: 'defines': [ michael@0: '_FILE_OFFSET_BITS=64', michael@0: ], michael@0: 'cflags': [ michael@0: '<(werror)', # See note above about the werror variable. michael@0: '-pthread', michael@0: '-fno-exceptions', michael@0: '-fno-strict-aliasing', # See http://crbug.com/32204 michael@0: '-Wall', michael@0: # TODO(evan): turn this back on once all the builds work. michael@0: # '-Wextra', michael@0: # Don't warn about unused function params. We use those everywhere. michael@0: '-Wno-unused-parameter', michael@0: # Don't warn about the "struct foo f = {0};" initialization pattern. michael@0: '-Wno-missing-field-initializers', michael@0: # Don't export any symbols (for example, to plugins we dlopen()). michael@0: # Note: this is *required* to make some plugins work. michael@0: '-fvisibility=hidden', michael@0: '-pipe', michael@0: ], michael@0: 'cflags_cc': [ michael@0: '-fno-rtti', michael@0: '-fno-threadsafe-statics', michael@0: # Make inline functions have hidden visiblity by default. michael@0: # Surprisingly, not covered by -fvisibility=hidden. michael@0: '-fvisibility-inlines-hidden', michael@0: # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, michael@0: # so we specify it explicitly. michael@0: # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. michael@0: # http://code.google.com/p/chromium/issues/detail?id=90453 michael@0: '-Wsign-compare', michael@0: ], michael@0: 'ldflags': [ michael@0: '-pthread', '-Wl,-z,noexecstack', michael@0: ], michael@0: 'libraries' : [ michael@0: '<(libraries_for_target)', michael@0: ], michael@0: 'configurations': { michael@0: 'Debug_Base': { michael@0: 'variables': { michael@0: 'debug_optimize%': '0', michael@0: }, michael@0: 'defines': [ michael@0: '_DEBUG', michael@0: ], michael@0: 'cflags': [ michael@0: '-O>(debug_optimize)', michael@0: '-g', michael@0: ], michael@0: 'conditions' : [ michael@0: ['OS=="android" and android_full_debug==0', { michael@0: # Some configurations are copied from Release_Base to reduce michael@0: # the binary size. michael@0: 'variables': { michael@0: 'debug_optimize%': 's', michael@0: }, michael@0: 'cflags': [ michael@0: '-fomit-frame-pointer', michael@0: '-fdata-sections', michael@0: '-ffunction-sections', michael@0: ], michael@0: 'ldflags': [ michael@0: '-Wl,-O1', michael@0: '-Wl,--as-needed', michael@0: '-Wl,--gc-sections', michael@0: ], michael@0: }], michael@0: ], michael@0: }, michael@0: 'Release_Base': { michael@0: 'variables': { michael@0: 'release_optimize%': '2', michael@0: # Binaries become big and gold is unable to perform GC michael@0: # and remove unused sections for some of test targets michael@0: # on 32 bit platform. michael@0: # (This is currently observed only in chromeos valgrind bots) michael@0: # The following flag is to disable --gc-sections linker michael@0: # option for these bots. michael@0: 'no_gc_sections%': 0, michael@0: michael@0: # TODO(bradnelson): reexamine how this is done if we change the michael@0: # expansion of configurations michael@0: 'release_valgrind_build%': 0, michael@0: }, michael@0: 'cflags': [ michael@0: '-O<(release_optimize)', michael@0: # Don't emit the GCC version ident directives, they just end up michael@0: # in the .comment section taking up binary size. michael@0: '-fno-ident', michael@0: # Put data and code in their own sections, so that unused symbols michael@0: # can be removed at link time with --gc-sections. michael@0: '-fdata-sections', michael@0: '-ffunction-sections', michael@0: ], michael@0: 'ldflags': [ michael@0: # Specifically tell the linker to perform optimizations. michael@0: # See http://lwn.net/Articles/192624/ . michael@0: '-Wl,-O1', michael@0: '-Wl,--as-needed', michael@0: ], michael@0: 'conditions' : [ michael@0: ['no_gc_sections==0', { michael@0: 'ldflags': [ michael@0: '-Wl,--gc-sections', michael@0: ], michael@0: }], michael@0: ['OS=="android"', { michael@0: 'variables': { michael@0: 'release_optimize%': 's', michael@0: }, michael@0: 'cflags': [ michael@0: '-fomit-frame-pointer', michael@0: ], michael@0: }], michael@0: ['clang==1', { michael@0: 'cflags!': [ michael@0: '-fno-ident', michael@0: ], michael@0: }], michael@0: ['profiling==1', { michael@0: 'cflags': [ michael@0: '-fno-omit-frame-pointer', michael@0: '-g', michael@0: ], michael@0: }], michael@0: ], michael@0: }, michael@0: }, michael@0: 'variants': { michael@0: 'coverage': { michael@0: 'cflags': ['-fprofile-arcs', '-ftest-coverage'], michael@0: 'ldflags': ['-fprofile-arcs'], michael@0: }, michael@0: 'profile': { michael@0: 'cflags': ['-pg', '-g'], michael@0: 'ldflags': ['-pg'], michael@0: }, michael@0: 'symbols': { michael@0: 'cflags': ['-g'], michael@0: }, michael@0: }, michael@0: 'conditions': [ michael@0: ['target_arch=="ia32"', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'asflags': [ michael@0: # Needed so that libs with .s files (e.g. libicudata.a) michael@0: # are compatible with the general 32-bit-ness. michael@0: '-32', michael@0: ], michael@0: # All floating-point computations on x87 happens in 80-bit michael@0: # precision. Because the C and C++ language standards allow michael@0: # the compiler to keep the floating-point values in higher michael@0: # precision than what's specified in the source and doing so michael@0: # is more efficient than constantly rounding up to 64-bit or michael@0: # 32-bit precision as specified in the source, the compiler, michael@0: # especially in the optimized mode, tries very hard to keep michael@0: # values in x87 floating-point stack (in 80-bit precision) michael@0: # as long as possible. This has important side effects, that michael@0: # the real value used in computation may change depending on michael@0: # how the compiler did the optimization - that is, the value michael@0: # kept in 80-bit is different than the value rounded down to michael@0: # 64-bit or 32-bit. There are possible compiler options to michael@0: # make this behavior consistent (e.g. -ffloat-store would keep michael@0: # all floating-values in the memory, thus force them to be michael@0: # rounded to its original precision) but they have significant michael@0: # runtime performance penalty. michael@0: # michael@0: # -mfpmath=sse -msse2 makes the compiler use SSE instructions michael@0: # which keep floating-point values in SSE registers in its michael@0: # native precision (32-bit for single precision, and 64-bit michael@0: # for double precision values). This means the floating-point michael@0: # value used during computation does not change depending on michael@0: # how the compiler optimized the code, since the value is michael@0: # always kept in its specified precision. michael@0: 'conditions': [ michael@0: ['branding=="Chromium" and disable_sse2==0', { michael@0: 'cflags': [ michael@0: '-march=pentium4', michael@0: '-msse2', michael@0: '-mfpmath=sse', michael@0: ], michael@0: }], michael@0: # ChromeOS targets Pinetrail, which is sse3, but most of the michael@0: # benefit comes from sse2 so this setting allows ChromeOS michael@0: # to build on other CPUs. In the future -march=atom would michael@0: # help but requires a newer compiler. michael@0: ['chromeos==1 and disable_sse2==0', { michael@0: 'cflags': [ michael@0: '-msse2', michael@0: ], michael@0: }], michael@0: # Install packages have started cropping up with michael@0: # different headers between the 32-bit and 64-bit michael@0: # versions, so we have to shadow those differences off michael@0: # and make sure a 32-bit-on-64-bit build picks up the michael@0: # right files. michael@0: # For android build, use NDK headers instead of host headers michael@0: ['host_arch!="ia32" and OS!="android"', { michael@0: 'include_dirs+': [ michael@0: '/usr/include32', michael@0: ], michael@0: }], michael@0: ], michael@0: 'target_conditions': [ michael@0: ['_toolset=="target" and OS!="android"', { michael@0: # -mmmx allows mmintrin.h to be used for mmx intrinsics. michael@0: # video playback is mmx and sse2 optimized. michael@0: 'cflags': [ michael@0: '-m32', michael@0: '-mmmx', michael@0: ], michael@0: 'ldflags': [ michael@0: '-m32', michael@0: ], michael@0: 'cflags_mozilla': [ michael@0: '-m32', michael@0: '-mmmx', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['target_arch=="arm"', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'cflags_cc': [ michael@0: # The codesourcery arm-2009q3 toolchain warns at that the ABI michael@0: # has changed whenever it encounters a varargs function. This michael@0: # silences those warnings, as they are not helpful and michael@0: # clutter legitimate warnings. michael@0: '-Wno-abi', michael@0: ], michael@0: 'conditions': [ michael@0: ['arm_thumb==1', { michael@0: 'cflags': [ michael@0: '-mthumb', michael@0: ] michael@0: }], michael@0: ['armv7==1', { michael@0: 'cflags': [ michael@0: '-march=armv7-a', michael@0: '-mtune=cortex-a8', michael@0: '-mfloat-abi=<(arm_float_abi)', michael@0: ], michael@0: 'conditions': [ michael@0: ['arm_neon==1', { michael@0: 'cflags': [ '-mfpu=neon', ], michael@0: }, { michael@0: 'cflags': [ '-mfpu=<(arm_fpu)', ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['OS=="android"', { michael@0: # Most of the following flags are derived from what Android michael@0: # uses by default when building for arm, reference for which michael@0: # can be found in the following file in the Android NDK: michael@0: # toolchains/arm-linux-androideabi-4.4.3/setup.mk michael@0: 'cflags': [ michael@0: # The tree-sra optimization (scalar replacement for michael@0: # aggregates enabling subsequent optimizations) leads to michael@0: # invalid code generation when using the Android NDK's michael@0: # compiler (r5-r7). This can be verified using michael@0: # TestWebKitAPI's WTF.Checked_int8_t test. michael@0: '-fno-tree-sra', michael@0: '-fuse-ld=gold', michael@0: '-Wno-psabi', michael@0: ], michael@0: # Android now supports .relro sections properly. michael@0: # NOTE: While these flags enable the generation of .relro michael@0: # sections, the generated libraries can still be loaded on michael@0: # older Android platform versions. michael@0: 'ldflags': [ michael@0: '-Wl,-z,relro', michael@0: '-Wl,-z,now', michael@0: '-fuse-ld=gold', michael@0: ], michael@0: 'conditions': [ michael@0: ['arm_thumb == 1', { michael@0: # Android toolchain doesn't support -mimplicit-it=thumb michael@0: 'cflags!': [ '-Wa,-mimplicit-it=thumb', ], michael@0: 'cflags': [ '-mthumb-interwork', ], michael@0: }], michael@0: ['armv7==0', { michael@0: # Flags suitable for Android emulator michael@0: 'cflags': [ michael@0: '-march=armv5te', michael@0: '-mtune=xscale', michael@0: '-msoft-float', michael@0: ], michael@0: 'defines': [ michael@0: '__ARM_ARCH_5__', michael@0: '__ARM_ARCH_5T__', michael@0: '__ARM_ARCH_5E__', michael@0: '__ARM_ARCH_5TE__', michael@0: ], michael@0: }], michael@0: ['clang==1', { michael@0: 'cflags!': [ michael@0: # Clang does not support the following options. michael@0: '-mthumb-interwork', michael@0: '-finline-limit=64', michael@0: '-fno-tree-sra', michael@0: '-fuse-ld=gold', michael@0: '-Wno-psabi', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['linux_fpic==1', { michael@0: 'cflags': [ michael@0: '-fPIC', michael@0: ], michael@0: 'ldflags': [ michael@0: '-fPIC', michael@0: ], michael@0: }], michael@0: ['sysroot!=""', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'cflags': [ michael@0: '--sysroot=<(sysroot)', michael@0: ], michael@0: 'ldflags': [ michael@0: '--sysroot=<(sysroot)', michael@0: ], michael@0: }]] michael@0: }], michael@0: ['clang==1', { michael@0: 'cflags': [ michael@0: '-Wheader-hygiene', michael@0: # Clang spots more unused functions. michael@0: '-Wno-unused-function', michael@0: # Don't die on dtoa code that uses a char as an array index. michael@0: '-Wno-char-subscripts', michael@0: # Especially needed for gtest macros using enum values from Mac michael@0: # system headers. michael@0: # TODO(pkasting): In C++11 this is legal, so this should be michael@0: # removed when we change to that. (This is also why we don't michael@0: # bother fixing all these cases today.) michael@0: '-Wno-unnamed-type-template-args', michael@0: # This (rightyfully) complains about 'override', which we use michael@0: # heavily. michael@0: '-Wno-c++11-extensions', michael@0: michael@0: # Warns on switches on enums that cover all enum values but michael@0: # also contain a default: branch. Chrome is full of that. michael@0: '-Wno-covered-switch-default', michael@0: michael@0: # TODO(thakis): Remove this. michael@0: '-Wno-implicit-conversion-floating-point-to-bool', michael@0: ], michael@0: 'cflags!': [ michael@0: # Clang doesn't seem to know know this flag. michael@0: '-mfpmath=sse', michael@0: ], michael@0: }], michael@0: ['clang==1 and clang_use_chrome_plugins==1', { michael@0: 'cflags': [ michael@0: '<@(clang_chrome_plugins_flags)', michael@0: ], michael@0: }], michael@0: ['clang==1 and clang_load!=""', { michael@0: 'cflags': [ michael@0: '-Xclang', '-load', '-Xclang', '<(clang_load)', michael@0: ], michael@0: }], michael@0: ['clang==1 and clang_add_plugin!=""', { michael@0: 'cflags': [ michael@0: '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', michael@0: ], michael@0: }], michael@0: ['clang==1 and "<(GENERATOR)"=="ninja"', { michael@0: 'cflags': [ michael@0: # See http://crbug.com/110262 michael@0: '-fcolor-diagnostics', michael@0: ], michael@0: }], michael@0: ['asan==1', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'cflags': [ michael@0: '-faddress-sanitizer', michael@0: '-fno-omit-frame-pointer', michael@0: ], michael@0: 'ldflags': [ michael@0: '-faddress-sanitizer', michael@0: ], michael@0: 'defines': [ michael@0: 'ADDRESS_SANITIZER', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['tsan==1', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'cflags': [ michael@0: '-fthread-sanitizer', michael@0: '-fno-omit-frame-pointer', michael@0: '-fPIE', michael@0: ], michael@0: 'ldflags': [ michael@0: '-fthread-sanitizer', michael@0: ], michael@0: 'defines': [ michael@0: 'THREAD_SANITIZER', michael@0: 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', michael@0: ], michael@0: 'target_conditions': [ michael@0: ['_type=="executable"', { michael@0: 'ldflags': [ michael@0: '-pie', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['order_profiling!=0 and (chromeos==1 or OS=="linux")', { michael@0: 'target_conditions' : [ michael@0: ['_toolset=="target"', { michael@0: 'cflags': [ michael@0: '-finstrument-functions', michael@0: # Allow mmx intrinsics to inline, so that the michael@0: # compiler can expand the intrinsics. michael@0: '-finstrument-functions-exclude-file-list=mmintrin.h', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['linux_breakpad==1', { michael@0: 'cflags': [ '-g' ], michael@0: 'defines': ['USE_LINUX_BREAKPAD'], michael@0: }], michael@0: ['linux_use_heapchecker==1', { michael@0: 'variables': {'linux_use_tcmalloc%': 1}, michael@0: 'defines': ['USE_HEAPCHECKER'], michael@0: }], michael@0: ['linux_use_tcmalloc==0', { michael@0: 'defines': ['NO_TCMALLOC'], michael@0: }], michael@0: ['linux_keep_shadow_stacks==1', { michael@0: 'defines': ['KEEP_SHADOW_STACKS'], michael@0: 'cflags': [ michael@0: '-finstrument-functions', michael@0: # Allow mmx intrinsics to inline, so that the compiler can expand michael@0: # the intrinsics. michael@0: '-finstrument-functions-exclude-file-list=mmintrin.h', michael@0: ], michael@0: }], michael@0: ['linux_use_gold_flags==1', { michael@0: 'ldflags': [ michael@0: # Experimentation found that using four linking threads michael@0: # saved ~20% of link time. michael@0: # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 michael@0: '-Wl,--threads', michael@0: '-Wl,--thread-count=4', michael@0: ], michael@0: 'conditions': [ michael@0: ['release_valgrind_build==0', { michael@0: 'target_conditions': [ michael@0: ['_toolset=="target"', { michael@0: 'ldflags': [ michael@0: # There seems to be a conflict of --icf and -pie michael@0: # in gold which can generate crashy binaries. As michael@0: # a security measure, -pie takes precendence for michael@0: # now. michael@0: #'-Wl,--icf=safe', michael@0: '-Wl,--icf=none', michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ], michael@0: }], michael@0: ['linux_use_gold_binary==1', { michael@0: 'variables': { michael@0: 'conditions': [ michael@0: ['inside_chromium_build==1', { michael@0: # We pass the path to gold to the compiler. gyp leaves michael@0: # unspecified what the cwd is when running the compiler, michael@0: # so the normal gyp path-munging fails us. This hack michael@0: # gets the right path. michael@0: 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', michael@0: }, { michael@0: 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold', michael@0: }] michael@0: ] michael@0: }, michael@0: 'ldflags': [ michael@0: # Put our gold binary in the search path for the linker. michael@0: '-B<(gold_path)', michael@0: ], michael@0: }], michael@0: ], michael@0: }, michael@0: }], michael@0: # FreeBSD-specific options; note that most FreeBSD options are set above, michael@0: # with Linux. michael@0: ['OS=="freebsd"', { michael@0: 'target_defaults': { michael@0: 'ldflags': [ michael@0: '-Wl,--no-keep-memory', michael@0: ], michael@0: }, michael@0: }], michael@0: # Android-specific options; note that most are set above with Linux. michael@0: ['OS=="android"', { michael@0: 'variables': { michael@0: # This is the id for the archived chrome symbols. Each build that michael@0: # archives symbols is assigned an id which is then added to GYP_DEFINES. michael@0: # This is written to the device log on crashes just prior to dropping a michael@0: # tombstone. Tools can determine the location of the archived symbols michael@0: # from the id. michael@0: 'chrome_symbols_id%': '', michael@0: 'conditions': [ michael@0: # Use shared stlport library when system one used. michael@0: # Figure this out early since it needs symbols from libgcc.a, so it michael@0: # has to be before that in the set of libraries. michael@0: ['use_system_stlport==1', { michael@0: 'android_stlport_library': 'stlport', michael@0: }, { michael@0: 'android_stlport_library': 'stlport_static', michael@0: }], michael@0: ], michael@0: michael@0: # Placing this variable here prevents from forking libvpx, used michael@0: # by remoting. Remoting is off, so it needn't built, michael@0: # so forking it's deps seems like overkill. michael@0: # But this variable need defined to properly run gyp. michael@0: # A proper solution is to have an OS==android conditional michael@0: # in third_party/libvpx/libvpx.gyp to define it. michael@0: 'libvpx_path': 'lib/linux/arm', michael@0: }, michael@0: 'target_defaults': { michael@0: 'variables': { michael@0: 'release_extra_cflags%': '', michael@0: }, michael@0: michael@0: 'target_conditions': [ michael@0: # Settings for building device targets using Android's toolchain. michael@0: # These are based on the setup.mk file from the Android NDK. michael@0: # michael@0: # The NDK Android executable link step looks as follows: michael@0: # $LDFLAGS michael@0: # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o michael@0: # $(PRIVATE_OBJECTS) <-- The .o that we built michael@0: # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built michael@0: # $(TARGET_LIBGCC) <-- libgcc.a michael@0: # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built michael@0: # $(PRIVATE_LDLIBS) <-- System .so michael@0: # $(TARGET_CRTEND_O) <-- crtend.o michael@0: # michael@0: # For now the above are approximated for executables by adding michael@0: # crtbegin.o to the end of the ldflags and 'crtend.o' to the end michael@0: # of 'libraries'. michael@0: # michael@0: # The NDK Android shared library link step looks as follows: michael@0: # $LDFLAGS michael@0: # $(PRIVATE_OBJECTS) <-- The .o that we built michael@0: # -l,--whole-archive michael@0: # $(PRIVATE_WHOLE_STATIC_LIBRARIES) michael@0: # -l,--no-whole-archive michael@0: # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built michael@0: # $(TARGET_LIBGCC) <-- libgcc.a michael@0: # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built michael@0: # $(PRIVATE_LDLIBS) <-- System .so michael@0: # michael@0: # For now, assume that whole static libraries are not needed. michael@0: # michael@0: # For both executables and shared libraries, add the proper michael@0: # libgcc.a to the start of libraries which puts it in the michael@0: # proper spot after .o and .a files get linked in. michael@0: # michael@0: # TODO: The proper thing to do longer-tem would be proper gyp michael@0: # support for a custom link command line. michael@0: ['_toolset=="target"', { michael@0: 'conditions': [ michael@0: ['build_with_mozilla==0', { michael@0: 'cflags!': [ michael@0: '-pthread', # Not supported by Android toolchain. michael@0: ], michael@0: 'cflags': [ michael@0: '-ffunction-sections', michael@0: '-funwind-tables', michael@0: '-g', michael@0: '-fstack-protector', michael@0: '-fno-short-enums', michael@0: '-finline-limit=64', michael@0: '-Wa,--noexecstack', michael@0: '<@(release_extra_cflags)', michael@0: ], michael@0: 'ldflags!': [ michael@0: '-pthread', # Not supported by Android toolchain. michael@0: ], michael@0: 'ldflags': [ michael@0: '-nostdlib', michael@0: '-Wl,--no-undefined', michael@0: # Don't export symbols from statically linked libraries. michael@0: '-Wl,--exclude-libs=ALL', michael@0: ], michael@0: 'libraries': [ michael@0: '-l<(android_stlport_library)', michael@0: # Manually link the libgcc.a that the cross compiler uses. michael@0: '@(change_mach_o_flags_options)', michael@0: ], michael@0: }, michael@0: ], michael@0: 'conditions': [ michael@0: ['asan==1', { michael@0: 'variables': { michael@0: 'asan_saves_file': 'asan.saves', michael@0: }, michael@0: 'xcode_settings': { michael@0: 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', michael@0: }, michael@0: }], michael@0: ], michael@0: 'target_conditions': [ michael@0: ['mac_pie==1 and release_valgrind_build==0', { michael@0: # Turn on position-independence (ASLR) for executables. When michael@0: # PIE is on for the Chrome executables, the framework will michael@0: # also be subject to ASLR. michael@0: # Don't do this when building for Valgrind, because Valgrind michael@0: # doesn't understand slide. TODO: Make Valgrind on Mac OS X michael@0: # understand slide, and get rid of the Valgrind check. michael@0: 'xcode_settings': { michael@0: 'OTHER_LDFLAGS': [ michael@0: '-Wl,-pie', # Position-independent executable (MH_PIE) michael@0: ], michael@0: }, michael@0: }], michael@0: ], michael@0: }], michael@0: ['(_type=="executable" or _type=="shared_library" or \ michael@0: _type=="loadable_module") and mac_strip!=0', { michael@0: 'target_conditions': [ michael@0: ['mac_real_dsym == 1', { michael@0: # To get a real .dSYM bundle produced by dsymutil, set the michael@0: # debug information format to dwarf-with-dsym. Since michael@0: # strip_from_xcode will not be used, set Xcode to do the michael@0: # stripping as well. michael@0: 'configurations': { michael@0: 'Release_Base': { michael@0: 'xcode_settings': { michael@0: 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', michael@0: 'DEPLOYMENT_POSTPROCESSING': 'YES', michael@0: 'STRIP_INSTALLED_PRODUCT': 'YES', michael@0: 'target_conditions': [ michael@0: ['_type=="shared_library" or _type=="loadable_module"', { michael@0: # The Xcode default is to strip debugging symbols michael@0: # only (-S). Local symbols should be stripped as michael@0: # well, which will be handled by -x. Xcode will michael@0: # continue to insert -S when stripping even when michael@0: # additional flags are added with STRIPFLAGS. michael@0: 'STRIPFLAGS': '-x', michael@0: }], # _type=="shared_library" or _type=="loadable_module"' michael@0: ], # target_conditions michael@0: }, # xcode_settings michael@0: }, # configuration "Release" michael@0: }, # configurations michael@0: }, { # mac_real_dsym != 1 michael@0: # To get a fast fake .dSYM bundle, use a post-build step to michael@0: # produce the .dSYM and strip the executable. strip_from_xcode michael@0: # only operates in the Release configuration. michael@0: 'postbuilds': [ michael@0: { michael@0: 'variables': { michael@0: # Define strip_from_xcode in a variable ending in _path michael@0: # so that gyp understands it's a path and performs proper michael@0: # relativization during dict merging. michael@0: 'strip_from_xcode': 'mac/strip_from_xcode', michael@0: }, michael@0: 'postbuild_name': 'Strip If Needed', michael@0: 'action': ['$(srcdir)$(os_sep)build$(os_sep)<(strip_from_xcode)'], michael@0: }, michael@0: ], # postbuilds michael@0: }], # mac_real_dsym michael@0: ], # target_conditions michael@0: }], # (_type=="executable" or _type=="shared_library" or michael@0: # _type=="loadable_module") and mac_strip!=0 michael@0: ], # target_conditions michael@0: }, # target_defaults michael@0: }], # OS=="mac" michael@0: ['OS=="ios"', { michael@0: 'target_defaults': { michael@0: 'xcode_settings' : { michael@0: 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', michael@0: michael@0: # This next block is mostly common with the 'mac' section above, michael@0: # but keying off (or setting) 'clang' isn't valid for iOS as it michael@0: # also seems to mean using the custom build of clang. michael@0: michael@0: # Don't use -Wc++0x-extensions, which Xcode 4 enables by default michael@0: # when buliding with clang. This warning is triggered when the michael@0: # override keyword is used via the OVERRIDE macro from michael@0: # base/compiler_specific.h. michael@0: 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', michael@0: 'WARNING_CFLAGS': [ michael@0: '-Wheader-hygiene', michael@0: # Don't die on dtoa code that uses a char as an array index. michael@0: # This is required solely for base/third_party/dmg_fp/dtoa.cc. michael@0: '-Wno-char-subscripts', michael@0: # Clang spots more unused functions. michael@0: '-Wno-unused-function', michael@0: # See comments on this flag higher up in this file. michael@0: '-Wno-unnamed-type-template-args', michael@0: # This (rightyfully) complains about 'override', which we use michael@0: # heavily. michael@0: '-Wno-c++11-extensions', michael@0: ], michael@0: }, michael@0: 'target_conditions': [ michael@0: ['_type=="executable"', { michael@0: 'configurations': { michael@0: 'Release_Base': { michael@0: 'xcode_settings': { michael@0: 'DEPLOYMENT_POSTPROCESSING': 'YES', michael@0: 'STRIP_INSTALLED_PRODUCT': 'YES', michael@0: }, michael@0: }, michael@0: }, michael@0: 'xcode_settings': { michael@0: 'conditions': [ michael@0: ['chromium_ios_signing', { michael@0: # iOS SDK wants everything for device signed. michael@0: 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', michael@0: }, { michael@0: 'CODE_SIGNING_REQUIRED': 'NO', michael@0: 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', michael@0: }], michael@0: ], michael@0: }, michael@0: }], michael@0: ], # target_conditions michael@0: }, # target_defaults michael@0: }], # OS=="ios" michael@0: ['OS=="win"', { michael@0: 'target_defaults': { michael@0: 'defines': [ michael@0: '_WIN32_WINNT=0x0602', michael@0: 'WINVER=0x0602', michael@0: 'WIN32', michael@0: '_WINDOWS', michael@0: 'NOMINMAX', michael@0: 'PSAPI_VERSION=1', michael@0: '_CRT_RAND_S', michael@0: 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', michael@0: 'WIN32_LEAN_AND_MEAN', michael@0: '_ATL_NO_OPENGL', michael@0: ], michael@0: 'conditions': [ michael@0: ['buildtype=="Official"', { michael@0: # In official builds, targets can self-select an optimization michael@0: # level by defining a variable named 'optimize', and setting it michael@0: # to one of michael@0: # - "size", optimizes for minimal code size - the default. michael@0: # - "speed", optimizes for speed over code size. michael@0: # - "max", whole program optimization and link-time code michael@0: # generation. This is very expensive and should be used michael@0: # sparingly. michael@0: 'variables': { michael@0: 'optimize%': 'size', michael@0: }, michael@0: 'target_conditions': [ michael@0: ['optimize=="size"', { michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: # 1, optimizeMinSpace, Minimize Size (/O1) michael@0: 'Optimization': '1', michael@0: # 2, favorSize - Favor small code (/Os) michael@0: 'FavorSizeOrSpeed': '2', michael@0: }, michael@0: }, michael@0: }, michael@0: ], michael@0: ['optimize=="speed"', { michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: # 2, optimizeMaxSpeed, Maximize Speed (/O2) michael@0: 'Optimization': '2', michael@0: # 1, favorSpeed - Favor fast code (/Ot) michael@0: 'FavorSizeOrSpeed': '1', michael@0: }, michael@0: }, michael@0: }, michael@0: ], michael@0: ['optimize=="max"', { michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: # 2, optimizeMaxSpeed, Maximize Speed (/O2) michael@0: 'Optimization': '2', michael@0: # 1, favorSpeed - Favor fast code (/Ot) michael@0: 'FavorSizeOrSpeed': '1', michael@0: # This implies link time code generation. michael@0: 'WholeProgramOptimization': 'true', michael@0: }, michael@0: }, michael@0: }, michael@0: ], michael@0: ], michael@0: }, michael@0: ], michael@0: ['component=="static_library"', { michael@0: 'defines': [ michael@0: '_HAS_EXCEPTIONS=0', michael@0: ], michael@0: }], michael@0: ['MSVS_VERSION=="2008"', { michael@0: 'defines': [ michael@0: '_HAS_TR1=0', michael@0: ], michael@0: }], michael@0: ['secure_atl', { michael@0: 'defines': [ michael@0: '_SECURE_ATL', michael@0: ], michael@0: }], michael@0: ], michael@0: 'msvs_system_include_dirs': [ michael@0: '<(windows_sdk_path)/Include/shared', michael@0: '<(windows_sdk_path)/Include/um', michael@0: '<(windows_sdk_path)/Include/winrt', michael@0: '<(directx_sdk_path)/Include', michael@0: '$(VSInstallDir)/VC/atlmfc/include', michael@0: ], michael@0: 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], michael@0: 'msvs_disabled_warnings': [4351, 4396, 4503, 4819, michael@0: # TODO(maruel): These warnings are level 4. They will be slowly michael@0: # removed as code is fixed. michael@0: 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, michael@0: 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, michael@0: 4702, 4706, michael@0: ], michael@0: 'msvs_settings': { michael@0: 'VCCLCompilerTool': { michael@0: 'AdditionalOptions': ['/MP'], michael@0: 'MinimalRebuild': 'false', michael@0: 'BufferSecurityCheck': 'true', michael@0: 'EnableFunctionLevelLinking': 'true', michael@0: 'RuntimeTypeInfo': 'false', michael@0: 'WarningLevel': '4', michael@0: 'WarnAsError': 'true', michael@0: 'DebugInformationFormat': '3', michael@0: 'conditions': [ michael@0: ['component=="shared_library"', { michael@0: 'ExceptionHandling': '1', # /EHsc michael@0: }, { michael@0: 'ExceptionHandling': '0', michael@0: }], michael@0: ], michael@0: }, michael@0: 'VCLibrarianTool': { michael@0: 'AdditionalOptions': ['/ignore:4221'], michael@0: 'AdditionalLibraryDirectories': [ michael@0: '<(directx_sdk_path)/Lib/x86', michael@0: '<(windows_sdk_path)/Lib/win8/um/x86', michael@0: ], michael@0: }, michael@0: 'VCLinkerTool': { michael@0: 'AdditionalDependencies': [ michael@0: 'wininet.lib', michael@0: 'dnsapi.lib', michael@0: 'version.lib', michael@0: 'msimg32.lib', michael@0: 'ws2_32.lib', michael@0: 'usp10.lib', michael@0: 'psapi.lib', michael@0: 'dbghelp.lib', michael@0: 'winmm.lib', michael@0: 'shlwapi.lib', michael@0: ], michael@0: michael@0: 'conditions': [ michael@0: ['msvs_express', { michael@0: # Explicitly required when using the ATL with express michael@0: 'AdditionalDependencies': [ michael@0: 'atlthunk.lib', michael@0: ], michael@0: michael@0: # ATL 8.0 included in WDK 7.1 makes the linker to generate michael@0: # almost eight hundred LNK4254 and LNK4078 warnings: michael@0: # - warning LNK4254: section 'ATL' (50000040) merged into michael@0: # '.rdata' (40000040) with different attributes michael@0: # - warning LNK4078: multiple 'ATL' sections found with michael@0: # different attributes michael@0: 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], michael@0: }], michael@0: ['MSVS_VERSION=="2005e"', { michael@0: # Non-express versions link automatically to these michael@0: 'AdditionalDependencies': [ michael@0: 'advapi32.lib', michael@0: 'comdlg32.lib', michael@0: 'ole32.lib', michael@0: 'shell32.lib', michael@0: 'user32.lib', michael@0: 'winspool.lib', michael@0: ], michael@0: }], michael@0: ], michael@0: 'AdditionalLibraryDirectories': [ michael@0: '<(directx_sdk_path)/Lib/x86', michael@0: '<(windows_sdk_path)/Lib/win8/um/x86', michael@0: ], michael@0: 'GenerateDebugInformation': 'true', michael@0: 'MapFileName': '$(OutDir)\\$(TargetName).map', michael@0: 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', michael@0: 'FixedBaseAddress': '1', michael@0: # SubSystem values: michael@0: # 0 == not set michael@0: # 1 == /SUBSYSTEM:CONSOLE michael@0: # 2 == /SUBSYSTEM:WINDOWS michael@0: # Most of the executables we'll ever create are tests michael@0: # and utilities with console output. michael@0: 'SubSystem': '1', michael@0: }, michael@0: 'VCMIDLTool': { michael@0: 'GenerateStublessProxies': 'true', michael@0: 'TypeLibraryName': '$(InputName).tlb', michael@0: 'OutputDirectory': '$(IntDir)', michael@0: 'HeaderFileName': '$(InputName).h', michael@0: 'DLLDataFileName': '$(InputName).dlldata.c', michael@0: 'InterfaceIdentifierFileName': '$(InputName)_i.c', michael@0: 'ProxyFileName': '$(InputName)_p.c', michael@0: }, michael@0: 'VCResourceCompilerTool': { michael@0: 'Culture' : '1033', michael@0: 'AdditionalIncludeDirectories': [ michael@0: '<(DEPTH)', michael@0: '<(SHARED_INTERMEDIATE_DIR)', michael@0: ], michael@0: }, michael@0: }, michael@0: }, michael@0: }], michael@0: ['disable_nacl==1', { michael@0: 'target_defaults': { michael@0: 'defines': [ michael@0: 'DISABLE_NACL', michael@0: ], michael@0: }, michael@0: }], michael@0: ['OS=="win" and msvs_use_common_linker_extras', { michael@0: 'target_defaults': { michael@0: 'msvs_settings': { michael@0: 'VCLinkerTool': { michael@0: 'DelayLoadDLLs': [ michael@0: 'dbghelp.dll', michael@0: 'dwmapi.dll', michael@0: 'shell32.dll', michael@0: 'uxtheme.dll', michael@0: ], michael@0: }, michael@0: }, michael@0: 'configurations': { michael@0: 'x86_Base': { michael@0: 'msvs_settings': { michael@0: 'VCLinkerTool': { michael@0: 'AdditionalOptions': [ michael@0: '/safeseh', michael@0: '/dynamicbase', michael@0: '/ignore:4199', michael@0: '/ignore:4221', michael@0: '/nxcompat', michael@0: ], michael@0: }, michael@0: }, michael@0: }, michael@0: 'x64_Base': { michael@0: 'msvs_settings': { michael@0: 'VCLinkerTool': { michael@0: 'AdditionalOptions': [ michael@0: # safeseh is not compatible with x64 michael@0: '/dynamicbase', michael@0: '/ignore:4199', michael@0: '/ignore:4221', michael@0: '/nxcompat', michael@0: ], michael@0: }, michael@0: }, michael@0: }, michael@0: }, michael@0: }, michael@0: }], michael@0: ['enable_new_npdevice_api==1', { michael@0: 'target_defaults': { michael@0: 'defines': [ michael@0: 'ENABLE_NEW_NPDEVICE_API', michael@0: ], michael@0: }, michael@0: }], michael@0: ['clang==1', { michael@0: 'conditions': [ michael@0: ['OS=="android"', { michael@0: # Android could use the goma with clang. michael@0: 'make_global_settings': [ michael@0: ['CC', '