OLD | NEW |
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 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1607 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', | 1607 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', |
1608 }], | 1608 }], |
1609 # Our version of binutils in third_party/binutils | 1609 # Our version of binutils in third_party/binutils |
1610 ['linux_use_bundled_binutils==1', { | 1610 ['linux_use_bundled_binutils==1', { |
1611 'binutils_version%': 224, | 1611 'binutils_version%': 224, |
1612 }], | 1612 }], |
1613 ], | 1613 ], |
1614 }, { | 1614 }, { |
1615 'binutils_version%': 0, | 1615 'binutils_version%': 0, |
1616 }], | 1616 }], |
1617 # The version of GCC in use, set later in platforms that use GCC and have | |
1618 # not explicitly chosen to build with clang. Currently, this means all | |
1619 # platforms except Windows, Mac and iOS. | |
1620 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that | |
1621 # it takes effect here. | |
1622 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa
n==0 and tsan==0 and msan==0 and ubsan_vptr==0', { | |
1623 'conditions': [ | |
1624 ['OS=="android"', { | |
1625 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler
)', | |
1626 # We directly set the gcc version since we know what we use. | |
1627 'gcc_version%': 49, | |
1628 }, { | |
1629 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler
)', | |
1630 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', | |
1631 }], | |
1632 ], | |
1633 }, { | |
1634 'host_gcc_version%': 0, | |
1635 'gcc_version%': 0, | |
1636 }], | |
1637 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=
="True"', { | 1617 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=
="True"', { |
1638 'directx_sdk_path%': '<(directx_sdk_default_path)', | 1618 'directx_sdk_path%': '<(directx_sdk_default_path)', |
1639 }, { | 1619 }, { |
1640 'directx_sdk_path%': '$(DXSDK_DIR)', | 1620 'directx_sdk_path%': '$(DXSDK_DIR)', |
1641 }], | 1621 }], |
1642 ['OS=="win"', { | 1622 ['OS=="win"', { |
1643 'windows_driver_kit_path%': '$(WDK_DIR)', | 1623 'windows_driver_kit_path%': '$(WDK_DIR)', |
1644 }], | 1624 }], |
1645 ['os_posix==1 and OS!="mac" and OS!="ios"', { | 1625 ['os_posix==1 and OS!="mac" and OS!="ios"', { |
1646 'conditions': [ | 1626 'conditions': [ |
(...skipping 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3762 'ldflags': [ | 3742 'ldflags': [ |
3763 '-Wl,--no-as-needed', | 3743 '-Wl,--no-as-needed', |
3764 ], | 3744 ], |
3765 }], | 3745 }], |
3766 ['debug_unwind_tables==1', { | 3746 ['debug_unwind_tables==1', { |
3767 'cflags': ['-funwind-tables'], | 3747 'cflags': ['-funwind-tables'], |
3768 }, { | 3748 }, { |
3769 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-table
s'], | 3749 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-table
s'], |
3770 'defines': ['NO_UNWIND_TABLES'], | 3750 'defines': ['NO_UNWIND_TABLES'], |
3771 }], | 3751 }], |
3772 # TODO(mostynb): shuffle clang/gcc_version/binutils_version | 3752 ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and binut
ils_version>=223', { |
3773 # definitions in to the right scope to use them when setting | |
3774 # linux_use_debug_fission, so it can be used here alone. | |
3775 ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and (clan
g==1 or gcc_version>=48) and binutils_version>=223', { | |
3776 'cflags': ['-gsplit-dwarf'], | 3753 'cflags': ['-gsplit-dwarf'], |
3777 }], | 3754 }], |
3778 ], | 3755 ], |
3779 }, | 3756 }, |
3780 'Release_Base': { | 3757 'Release_Base': { |
3781 'variables': { | 3758 'variables': { |
3782 'release_optimize%': '2', | 3759 'release_optimize%': '2', |
3783 # Binaries become big and gold is unable to perform GC | 3760 # Binaries become big and gold is unable to perform GC |
3784 # and remove unused sections for some of test targets | 3761 # and remove unused sections for some of test targets |
3785 # on 32 bit platform. | 3762 # on 32 bit platform. |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4045 # Android now supports .relro sections properly. | 4022 # Android now supports .relro sections properly. |
4046 # NOTE: While these flags enable the generation of .relro | 4023 # NOTE: While these flags enable the generation of .relro |
4047 # sections, the generated libraries can still be loaded on | 4024 # sections, the generated libraries can still be loaded on |
4048 # older Android platform versions. | 4025 # older Android platform versions. |
4049 'ldflags': [ | 4026 'ldflags': [ |
4050 '-Wl,-z,relro', | 4027 '-Wl,-z,relro', |
4051 '-Wl,-z,now', | 4028 '-Wl,-z,now', |
4052 '-fuse-ld=gold', | 4029 '-fuse-ld=gold', |
4053 ], | 4030 ], |
4054 'conditions': [ | 4031 'conditions': [ |
4055 ['gcc_version==48 and clang==0', { | |
4056 'cflags': [ | |
4057 # The following 5 options are disabled to save on | |
4058 # binary size in GCC 4.8. | |
4059 '-fno-partial-inlining', | |
4060 '-fno-early-inlining', | |
4061 '-fno-tree-copy-prop', | |
4062 '-fno-tree-loop-optimize', | |
4063 '-fno-move-loop-invariants', | |
4064 ], | |
4065 }], | |
4066 ['arm_thumb==1', { | 4032 ['arm_thumb==1', { |
4067 'cflags': [ '-mthumb-interwork' ], | 4033 'cflags': [ '-mthumb-interwork' ], |
4068 }], | 4034 }], |
4069 ['profiling==1', { | 4035 ['profiling==1', { |
4070 'cflags': [ | 4036 'cflags': [ |
4071 # Thumb code with frame pointer makes chrome crash | 4037 # Thumb code with frame pointer makes chrome crash |
4072 # early. | 4038 # early. |
4073 '-marm', | 4039 '-marm', |
4074 '-mapcs-frame', # Required by -fno-omit-frame-pointer. | 4040 '-mapcs-frame', # Required by -fno-omit-frame-pointer. |
4075 # The perf report sometimes incorrectly attributes | 4041 # The perf report sometimes incorrectly attributes |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4696 ['binutils_version>=223', { | 4662 ['binutils_version>=223', { |
4697 # Newer binutils don't set DT_RPATH unless you disable "new" dtags | 4663 # Newer binutils don't set DT_RPATH unless you disable "new" dtags |
4698 # and the new DT_RUNPATH doesn't work without --no-as-needed flag. | 4664 # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
4699 # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags | 4665 # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags |
4700 # inside this file to allow usage of --no-as-needed and removal of | 4666 # inside this file to allow usage of --no-as-needed and removal of |
4701 # this flag. | 4667 # this flag. |
4702 'ldflags': [ | 4668 'ldflags': [ |
4703 '-Wl,--disable-new-dtags', | 4669 '-Wl,--disable-new-dtags', |
4704 ], | 4670 ], |
4705 }], | 4671 }], |
4706 ['gcc_version>=47 and clang==0', { | 4672 ['clang==0', { |
4707 'target_conditions': [ | 4673 'target_conditions': [ |
4708 ['_toolset=="target"', { | 4674 ['_toolset=="target"', { |
4709 'cflags_cc': [ | 4675 'cflags_cc': [ |
4710 '-std=gnu++11', | 4676 '-std=gnu++11', |
4711 # See comment for -Wno-c++11-narrowing. | 4677 # See comment for -Wno-c++11-narrowing. |
4712 '-Wno-narrowing', | 4678 '-Wno-narrowing', |
4713 ], | 4679 ], |
4714 }], | 4680 }], |
4715 ], | 4681 ], |
4716 }], | 4682 }], |
4717 ['host_gcc_version>=47 and clang==0 and host_clang==0', { | 4683 ['clang==0 and host_clang==0', { |
4718 'target_conditions': [ | 4684 'target_conditions': [ |
4719 ['_toolset=="host"', { | 4685 ['_toolset=="host"', { |
4720 'cflags_cc': [ | 4686 'cflags_cc': [ |
4721 '-std=gnu++11', | 4687 '-std=gnu++11', |
4722 # See comment for -Wno-c++11-narrowing. | 4688 # See comment for -Wno-c++11-narrowing. |
4723 '-Wno-narrowing', | 4689 '-Wno-narrowing', |
4724 ], | 4690 ], |
4725 }], | 4691 }], |
4726 ], | 4692 ], |
4727 }], | 4693 }], |
4728 ['gcc_version>=47 and clang==0 and chromeos==1', { | 4694 ['clang==0 and chromeos==1', { |
4729 'target_conditions': [ | 4695 'target_conditions': [ |
4730 ['_toolset=="target"', { | 4696 ['_toolset=="target"', { |
4731 'cflags_cc': [ | 4697 'cflags_cc': [ |
4732 # TODO(thakis): Remove, http://crbug.com/263960 | 4698 # TODO(thakis): Remove, http://crbug.com/263960 |
4733 '-Wno-literal-suffix', | 4699 '-Wno-literal-suffix', |
4734 ], | 4700 ], |
4735 }], | 4701 }], |
4736 ], | 4702 ], |
4737 }], | 4703 }], |
4738 ['host_gcc_version>=47 and clang==0 and host_clang==0 and chromeos==1'
, { | 4704 ['clang==0 and host_clang==0 and chromeos==1', { |
4739 'target_conditions': [ | 4705 'target_conditions': [ |
4740 ['_toolset=="host"', { | 4706 ['_toolset=="host"', { |
4741 'cflags_cc': [ | 4707 'cflags_cc': [ |
4742 # TODO(thakis): Remove, http://crbug.com/263960 | 4708 # TODO(thakis): Remove, http://crbug.com/263960 |
4743 '-Wno-literal-suffix', | 4709 '-Wno-literal-suffix', |
4744 ], | 4710 ], |
4745 }], | 4711 }], |
4746 ], | 4712 ], |
4747 }], | 4713 }], |
4748 ], | 4714 ], |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6024 ['enable_new_npdevice_api==1', { | 5990 ['enable_new_npdevice_api==1', { |
6025 'target_defaults': { | 5991 'target_defaults': { |
6026 'defines': [ | 5992 'defines': [ |
6027 'ENABLE_NEW_NPDEVICE_API', | 5993 'ENABLE_NEW_NPDEVICE_API', |
6028 ], | 5994 ], |
6029 }, | 5995 }, |
6030 }], | 5996 }], |
6031 # Don't warn about the "typedef 'foo' locally defined but not used" | 5997 # Don't warn about the "typedef 'foo' locally defined but not used" |
6032 # for gcc 4.8 and higher. | 5998 # for gcc 4.8 and higher. |
6033 # TODO: remove this flag once all builds work. See crbug.com/227506 | 5999 # TODO: remove this flag once all builds work. See crbug.com/227506 |
6034 ['gcc_version>=48 and clang==0', { | 6000 ['clang==0', { |
6035 'target_defaults': { | 6001 'target_defaults': { |
6036 'cflags': [ | 6002 'cflags': [ '-Wno-unused-local-typedefs' ], |
6037 '-Wno-unused-local-typedefs', | |
6038 ], | |
6039 }, | 6003 }, |
6040 }], | 6004 }], |
6041 ['gcc_version>=48 and clang==0 and host_clang==1', { | 6005 ['clang==0 and host_clang==1', { |
6042 'target_defaults': { | 6006 'target_defaults': { |
6043 'target_conditions': [ | 6007 'target_conditions': [ |
6044 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], | 6008 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], |
6045 ], | 6009 ], |
6046 }, | 6010 }, |
6047 }], | 6011 }], |
6048 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' | 6012 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' |
6049 'and OS!="win"', { | 6013 'and OS!="win"', { |
6050 'make_global_settings': [ | 6014 'make_global_settings': [ |
6051 ['CC', '<(make_clang_dir)/bin/clang'], | 6015 ['CC', '<(make_clang_dir)/bin/clang'], |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6398 # settings in target dicts. SYMROOT is a special case, because many other | 6362 # settings in target dicts. SYMROOT is a special case, because many other |
6399 # Xcode variables depend on it, including variables such as | 6363 # Xcode variables depend on it, including variables such as |
6400 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6364 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6401 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6365 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6402 # files to appear (when present) in the UI as actual files and not red | 6366 # files to appear (when present) in the UI as actual files and not red |
6403 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6367 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6404 # and therefore SYMROOT, needs to be set at the project level. | 6368 # and therefore SYMROOT, needs to be set at the project level. |
6405 'SYMROOT': '<(DEPTH)/xcodebuild', | 6369 'SYMROOT': '<(DEPTH)/xcodebuild', |
6406 }, | 6370 }, |
6407 } | 6371 } |
OLD | NEW |