| 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 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific | 7 # .gyp files should set chromium_code to 1 if they build Chromium-specific |
| 8 # code, as opposed to external code. This variable is used to control | 8 # code, as opposed to external code. This variable is used to control |
| 9 # such things as the set of warnings to enable, and whether warnings are | 9 # such things as the set of warnings to enable, and whether warnings are |
| 10 # treated as errors. | 10 # treated as errors. |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 # Enable -Werror by default, but put it in a variable so it can | 290 # Enable -Werror by default, but put it in a variable so it can |
| 291 # be disabled in ~/.gyp/include.gypi on the valgrind builders. | 291 # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 292 'variables': { | 292 'variables': { |
| 293 'werror%': '-Werror', | 293 'werror%': '-Werror', |
| 294 }, | 294 }, |
| 295 'cflags': [ | 295 'cflags': [ |
| 296 '<(werror)', # See note above about the werror variable. | 296 '<(werror)', # See note above about the werror variable. |
| 297 '-pthread', | 297 '-pthread', |
| 298 '-fno-exceptions', | 298 '-fno-exceptions', |
| 299 '-Wall', # TODO(bradnelson): why does this disappear?!? | 299 '-Wall', # TODO(bradnelson): why does this disappear?!? |
| 300 '-include', 'native_client/src/include/build_config.h' |
| 300 ], | 301 ], |
| 301 'conditions': [ | 302 'conditions': [ |
| 302 ['nacl_standalone==1 and OS=="linux"', { | 303 ['nacl_standalone==1 and OS=="linux"', { |
| 303 'cflags': ['-fPIC'], | 304 'cflags': ['-fPIC'], |
| 304 }], | 305 }], |
| 305 ['OS=="android"', { | 306 ['OS=="android"', { |
| 306 'target_conditions': [ | 307 'target_conditions': [ |
| 307 ['_toolset=="target"', { | 308 ['_toolset=="target"', { |
| 308 'defines': ['NACL_ANDROID=1'], | 309 'defines': ['ANDROID'], |
| 309 }, { | |
| 310 'defines': ['NACL_ANDROID=0'], | |
| 311 }], | 310 }], |
| 312 ], | 311 ], |
| 313 }, { | 312 }, { |
| 314 'defines': ['NACL_ANDROID=0'], | |
| 315 'link_settings': { | 313 'link_settings': { |
| 316 'libraries': [ | 314 'libraries': [ |
| 317 '-lrt', | 315 '-lrt', |
| 318 '-lpthread', | 316 '-lpthread', |
| 319 ], | 317 ], |
| 320 } | 318 } |
| 321 }], | 319 }], |
| 322 ['nacl_standalone==1 and nacl_strict_warnings==1', { | 320 ['nacl_standalone==1 and nacl_strict_warnings==1', { |
| 323 # TODO(gregoryd): remove the condition when the issues in | 321 # TODO(gregoryd): remove the condition when the issues in |
| 324 # Chrome code are fixed. | 322 # Chrome code are fixed. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 ], | 440 ], |
| 443 'cflags_cc': [ | 441 'cflags_cc': [ |
| 444 '-fno-rtti', | 442 '-fno-rtti', |
| 445 '-fno-threadsafe-statics', | 443 '-fno-threadsafe-statics', |
| 446 ], | 444 ], |
| 447 'ldflags': [ | 445 'ldflags': [ |
| 448 '-pthread', | 446 '-pthread', |
| 449 '-Wl,-z,noexecstack', | 447 '-Wl,-z,noexecstack', |
| 450 ], | 448 ], |
| 451 'defines': [ | 449 'defines': [ |
| 452 'NACL_LINUX=1', | |
| 453 'NACL_OSX=0', | |
| 454 'NACL_WINDOWS=0', | |
| 455 '_DEFAULT_SOURCE=1', | 450 '_DEFAULT_SOURCE=1', |
| 456 '_BSD_SOURCE=1', | 451 '_BSD_SOURCE=1', |
| 457 '_POSIX_C_SOURCE=199506', | 452 '_POSIX_C_SOURCE=199506', |
| 458 '_XOPEN_SOURCE=600', | 453 '_XOPEN_SOURCE=600', |
| 459 '_GNU_SOURCE=1', | 454 '_GNU_SOURCE=1', |
| 460 '__STDC_LIMIT_MACROS=1', | 455 '__STDC_LIMIT_MACROS=1', |
| 461 ], | 456 ], |
| 462 'configurations': { | 457 'configurations': { |
| 463 'Debug': { | 458 'Debug': { |
| 464 'variables': { | 459 'variables': { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden | 521 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 527 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics | 522 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 528 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror | 523 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
| 529 # Don't set GCC_VERSION so that we default to /usr/bin/gcc | 524 # Don't set GCC_VERSION so that we default to /usr/bin/gcc |
| 530 #'GCC_VERSION': '4.2', | 525 #'GCC_VERSION': '4.2', |
| 531 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof | 526 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
| 532 'PREBINDING': 'NO', # No -Wl,-prebind | 527 'PREBINDING': 'NO', # No -Wl,-prebind |
| 533 'USE_HEADERMAP': 'NO', | 528 'USE_HEADERMAP': 'NO', |
| 534 # TODO(bradnelson): -Werror ?!? | 529 # TODO(bradnelson): -Werror ?!? |
| 535 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels', '-Wno-long-long'], | 530 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels', '-Wno-long-long'], |
| 531 'OTHER_CFLAGS': [ |
| 532 '-include', 'native_client/src/include/build_config.h' |
| 533 ], |
| 536 'conditions': [ | 534 'conditions': [ |
| 537 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, | 535 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
| 538 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], | 536 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], |
| 539 ['clang==1', { | 537 ['clang==1', { |
| 540 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', | 538 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 541 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', | 539 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
| 542 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', | 540 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
| 543 'WARNING_CFLAGS': [ | 541 'WARNING_CFLAGS': [ |
| 544 '-Wheader-hygiene', | 542 '-Wheader-hygiene', |
| 545 # Don't die on dtoa code that uses a char as an array index. | 543 # Don't die on dtoa code that uses a char as an array index. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 'postbuild_name': 'Strip If Needed', | 634 'postbuild_name': 'Strip If Needed', |
| 637 'action': ['<(strip_from_xcode_path)'], | 635 'action': ['<(strip_from_xcode_path)'], |
| 638 }, | 636 }, |
| 639 ], | 637 ], |
| 640 }], | 638 }], |
| 641 ], | 639 ], |
| 642 }], | 640 }], |
| 643 ], | 641 ], |
| 644 }], | 642 }], |
| 645 ], | 643 ], |
| 646 'defines': [ | |
| 647 'NACL_LINUX=0', | |
| 648 'NACL_ANDROID=0', | |
| 649 'NACL_OSX=1', | |
| 650 'NACL_WINDOWS=0', | |
| 651 ], | |
| 652 }, | 644 }, |
| 653 }], | 645 }], |
| 654 ['OS=="win"', { | 646 ['OS=="win"', { |
| 655 'target_defaults': { | 647 'target_defaults': { |
| 656 'variables': { | 648 'variables': { |
| 657 'windows_asm_rule%': 1, | 649 'windows_asm_rule%': 1, |
| 658 }, | 650 }, |
| 659 'target_conditions': [ | 651 'target_conditions': [ |
| 660 ['windows_asm_rule==1', { | 652 ['windows_asm_rule==1', { |
| 661 'rules': [ | 653 'rules': [ |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 'NOMINMAX', | 688 'NOMINMAX', |
| 697 '_CRT_RAND_S', | 689 '_CRT_RAND_S', |
| 698 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', | 690 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 699 # WIN32_LEAN_AND_MEAN tells windows.h to omit obsolete and rarely | 691 # WIN32_LEAN_AND_MEAN tells windows.h to omit obsolete and rarely |
| 700 # used #include files. This allows use of Winsock 2.0 which otherwise | 692 # used #include files. This allows use of Winsock 2.0 which otherwise |
| 701 # would conflict with Winsock 1.x included by windows.h. | 693 # would conflict with Winsock 1.x included by windows.h. |
| 702 'WIN32_LEAN_AND_MEAN', | 694 'WIN32_LEAN_AND_MEAN', |
| 703 '_SECURE_ATL', | 695 '_SECURE_ATL', |
| 704 '__STDC_LIMIT_MACROS=1', | 696 '__STDC_LIMIT_MACROS=1', |
| 705 '_HAS_EXCEPTIONS=0', | 697 '_HAS_EXCEPTIONS=0', |
| 706 | |
| 707 'NACL_LINUX=0', | |
| 708 'NACL_ANDROID=0', | |
| 709 'NACL_OSX=0', | |
| 710 'NACL_WINDOWS=1' | |
| 711 ], | 698 ], |
| 712 'conditions': [ | 699 'conditions': [ |
| 713 ['MSVS_VERSION=="2008"', { | 700 ['MSVS_VERSION=="2008"', { |
| 714 'defines': [ | 701 'defines': [ |
| 715 '_HAS_TR1=0', | 702 '_HAS_TR1=0', |
| 716 ], | 703 ], |
| 717 }], | 704 }], |
| 718 ], | 705 ], |
| 719 'msvs_cygwin_dirs': ['../third_party/cygwin'], | 706 'msvs_cygwin_dirs': ['../third_party/cygwin'], |
| 720 # TODO(bsy) remove 4355 once cross-repo | 707 # TODO(bsy) remove 4355 once cross-repo |
| 721 # NACL_ALLOW_THIS_IN_INITIALIZER_LIST changes go in. | 708 # NACL_ALLOW_THIS_IN_INITIALIZER_LIST changes go in. |
| 722 'msvs_disabled_warnings': [4355, 4396, 4503, 4800, 4819], | 709 'msvs_disabled_warnings': [4355, 4396, 4503, 4800, 4819], |
| 723 'msvs_settings': { | 710 'msvs_settings': { |
| 724 'VCCLCompilerTool': { | 711 'VCCLCompilerTool': { |
| 725 'MinimalRebuild': 'false', | 712 'MinimalRebuild': 'false', |
| 726 'BufferSecurityCheck': 'true', | 713 'BufferSecurityCheck': 'true', |
| 727 'EnableFunctionLevelLinking': 'true', | 714 'EnableFunctionLevelLinking': 'true', |
| 728 'RuntimeTypeInfo': 'false', | 715 'RuntimeTypeInfo': 'false', |
| 729 'WarningLevel': '3', | 716 'WarningLevel': '3', |
| 730 'WarnAsError': 'true', | 717 'WarnAsError': 'true', |
| 731 'DebugInformationFormat': '3', | 718 'DebugInformationFormat': '3', |
| 732 'ExceptionHandling': '0', | 719 'ExceptionHandling': '0', |
| 720 'AdditionalOptions': [ |
| 721 '/FI', 'native_client/src/include/build_config.h' |
| 722 ], |
| 733 }, | 723 }, |
| 734 'VCLibrarianTool': { | 724 'VCLibrarianTool': { |
| 735 'AdditionalOptions': ['/ignore:4221'], | 725 'AdditionalOptions': ['/ignore:4221'], |
| 736 }, | 726 }, |
| 737 'VCLinkerTool': { | 727 'VCLinkerTool': { |
| 738 'AdditionalOptions': [ | 728 'AdditionalOptions': [ |
| 739 '/safeseh:NO', | 729 '/safeseh:NO', |
| 740 '/dynamicbase:NO', | 730 '/dynamicbase:NO', |
| 741 '/ignore:4199', | 731 '/ignore:4199', |
| 742 '/ignore:4221', | 732 '/ignore:4221', |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 824 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 835 # files to appear (when present) in the UI as actual files and not red | 825 # files to appear (when present) in the UI as actual files and not red |
| 836 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 826 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 837 # and therefore SYMROOT, needs to be set at the project level. | 827 # and therefore SYMROOT, needs to be set at the project level. |
| 838 'SYMROOT': '<(DEPTH)/xcodebuild', | 828 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 839 }, | 829 }, |
| 840 'includes': [ | 830 'includes': [ |
| 841 'untrusted.gypi', | 831 'untrusted.gypi', |
| 842 ], | 832 ], |
| 843 } | 833 } |
| OLD | NEW |