Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: build/common.gypi

Issue 384793002: naaaaaacl Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 11 matching lines...) Expand all
22 # executable's image. Setting this to 0 is needed to use an experimental 22 # executable's image. Setting this to 0 is needed to use an experimental
23 # Linux-Mac cross compiler distcc farm. 23 # Linux-Mac cross compiler distcc farm.
24 'chromium_mac_pch%': 1, 24 'chromium_mac_pch%': 1,
25 25
26 # Enable building with ASAN (Clang's -fsanitize=address option). 26 # Enable building with ASAN (Clang's -fsanitize=address option).
27 # -fsanitize=address only works with clang, but asan=1 implies clang=1 27 # -fsanitize=address only works with clang, but asan=1 implies clang=1
28 # See https://sites.google.com/a/chromium.org/dev/developers/testing/address sanitizer 28 # See https://sites.google.com/a/chromium.org/dev/developers/testing/address sanitizer
29 'asan%': 0, 29 'asan%': 0,
30 30
31 # Set this to true when building with Clang. 31 # Set this to true when building with Clang.
32 'clang%': 0, 32 'nacl_clang%': 0,
33 33
34 'conditions': [ 34 'conditions': [
35 ['OS=="mac"', { 35 ['OS=="mac"', {
36 # On Mac only clang is new enough to build the trusted code. 36 # On Mac only clang is new enough to build the trusted code.
37 'clang%': 1, 37 'nacl_clang%': 1,
38 # The Mac SDK is set for iOS builds and passed through to Mac 38 # The Mac SDK is set for iOS builds and passed through to Mac
39 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be 39 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
40 # overridden from the command line the same way it is for a Mac build. 40 # overridden from the command line the same way it is for a Mac build.
41 'mac_sdk%': '<!(python <(DEPTH)/native_client/build/mac/find_sdk.py 10.6 )', 41 'mac_sdk%': '<!(python <(DEPTH)/native_client/build/mac/find_sdk.py 10.6 )',
42 42
43 }], 43 }],
44 # Set ARM float abi compilation flag. 44 # Set ARM float abi compilation flag.
45 ['OS=="android"', { 45 ['OS=="android"', {
46 'arm_float_abi%': 'softfp', 46 'arm_float_abi%': 'softfp',
47 }, { 47 }, {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 # TODO(???): track down why 'target_conditions' doesn't work 256 # TODO(???): track down why 'target_conditions' doesn't work
257 # on Linux gyp into scons like it does on Mac gyp into xcodeproj. 257 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
258 ['OS=="linux"', { 258 ['OS=="linux"', {
259 'cflags': [ '-ftest-coverage', 259 'cflags': [ '-ftest-coverage',
260 '-fprofile-arcs'], 260 '-fprofile-arcs'],
261 'link_settings': { 'libraries': [ '-lgcov' ] }, 261 'link_settings': { 'libraries': [ '-lgcov' ] },
262 }], 262 }],
263 ], 263 ],
264 # TODO(jrg): options for code coverage on Windows 264 # TODO(jrg): options for code coverage on Windows
265 }], 265 }],
266 ['clang==1', { 266 ['nacl_clang==1', {
267 'cflags': [ 267 'cflags': [
268 '-Wheader-hygiene', 268 '-Wheader-hygiene',
269 # Clang spots more unused functions. 269 # Clang spots more unused functions.
270 '-Wno-unused-function', 270 '-Wno-unused-function',
271 # Don't die on dtoa code that uses a char as an array index. 271 # Don't die on dtoa code that uses a char as an array index.
272 '-Wno-char-subscripts', 272 '-Wno-char-subscripts',
273 # Especially needed for gtest macros using enum values from Mac 273 # Especially needed for gtest macros using enum values from Mac
274 # system headers. 274 # system headers.
275 # TODO(pkasting): In C++11 this is legal, so this should be 275 # TODO(pkasting): In C++11 this is legal, so this should be
276 # removed when we change to that. (This is also why we don't 276 # removed when we change to that. (This is also why we don't
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 '-O<(release_optimize)', 483 '-O<(release_optimize)',
484 # Don't emit the GCC version ident directives, they just end up 484 # Don't emit the GCC version ident directives, they just end up
485 # in the .comment section taking up binary size. 485 # in the .comment section taking up binary size.
486 '-fno-ident', 486 '-fno-ident',
487 # Put data and code in their own sections, so that unused symbols 487 # Put data and code in their own sections, so that unused symbols
488 # can be removed at link time with --gc-sections. 488 # can be removed at link time with --gc-sections.
489 '-fdata-sections', 489 '-fdata-sections',
490 '-ffunction-sections', 490 '-ffunction-sections',
491 ], 491 ],
492 'conditions': [ 492 'conditions': [
493 ['clang==1', { 493 ['nacl_clang==1', {
494 'cflags!': [ 494 'cflags!': [
495 '-fno-ident', 495 '-fno-ident',
496 ], 496 ],
497 }], 497 }],
498 ], 498 ],
499 }, 499 },
500 }, 500 },
501 }, 501 },
502 }], 502 }],
503 ['OS=="mac"', { 503 ['OS=="mac"', {
(...skipping 23 matching lines...) Expand all
527 # Don't set GCC_VERSION so that we default to /usr/bin/gcc 527 # Don't set GCC_VERSION so that we default to /usr/bin/gcc
528 #'GCC_VERSION': '4.2', 528 #'GCC_VERSION': '4.2',
529 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof 529 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
530 'PREBINDING': 'NO', # No -Wl,-prebind 530 'PREBINDING': 'NO', # No -Wl,-prebind
531 'USE_HEADERMAP': 'NO', 531 'USE_HEADERMAP': 'NO',
532 # TODO(bradnelson): -Werror ?!? 532 # TODO(bradnelson): -Werror ?!?
533 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels', '-Wno-long-long'], 533 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels', '-Wno-long-long'],
534 'conditions': [ 534 'conditions': [
535 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, 535 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
536 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}], 536 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}],
537 ['clang==1', { 537 ['nacl_clang==1', {
538 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', 538 'CC': '$(SOURCE_ROOT)/<(nacl_clang_dir)/clang',
539 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', 539 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(nacl_clang_dir)/clang++',
540 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 540 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
541 'WARNING_CFLAGS': [ 541 'WARNING_CFLAGS': [
542 '-Wheader-hygiene', 542 '-Wheader-hygiene',
543 # 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.
544 # This is required solely for base/third_party/dmg_fp/dtoa.cc. 544 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
545 '-Wno-char-subscripts', 545 '-Wno-char-subscripts',
546 # Clang spots more unused functions. 546 # Clang spots more unused functions.
547 '-Wno-unused-function', 547 '-Wno-unused-function',
548 # See comments on this flag higher up in this file. 548 # See comments on this flag higher up in this file.
549 '-Wno-unnamed-type-template-args', 549 '-Wno-unnamed-type-template-args',
550 # Allow 'default' label in switch even when all enumeration 550 # Allow 'default' label in switch even when all enumeration
551 # cases have been covered. 551 # cases have been covered.
552 '-Wno-covered-switch-default', 552 '-Wno-covered-switch-default',
553 # Allow C++11 extensions (for "override") 553 # Allow C++11 extensions (for "override")
554 '-Wno-c++11-extensions', 554 '-Wno-c++11-extensions',
555 # TODO(thakis): Reenable once the one instance this warns on 555 # TODO(thakis): Reenable once the one instance this warns on
556 # is fixed. 556 # is fixed.
557 '-Wno-parentheses', 557 '-Wno-parentheses',
558 ], 558 ],
559 }], 559 }],
560 ['nacl_standalone==1', { 560 ['nacl_standalone==1', {
561 # If part of the Chromium build, use the Chromium default. 561 # If part of the Chromium build, use the Chromium default.
562 # Otherwise, when building standalone, use this. 562 # Otherwise, when building standalone, use this.
563 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', # -mmacosx -version-min 563 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', # -mmacosx -version-min
564 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot 564 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
565 }], 565 }],
566 ], 566 ],
567 }, 567 },
568 'conditions': [ 568 'conditions': [
569 ['clang==1', { 569 ['nacl_clang==1', {
570 'variables': { 570 'variables': {
571 'clang_dir': 571 'nacl_clang_dir':
572 '<(DEPTH)/third_party/llvm-build/Release+Asserts/bin', 572 '<(DEPTH)/third_party/llvm-build/Release+Asserts/bin',
573 }, 573 },
574 }], 574 }],
575 ['nacl_standalone==1 and nacl_strict_warnings==1', { 575 ['nacl_standalone==1 and nacl_strict_warnings==1', {
576 'xcode_settings': { 576 'xcode_settings': {
577 # TODO(gregoryd): remove the condition when the issues in 577 # TODO(gregoryd): remove the condition when the issues in
578 # Chrome code are fixed. 578 # Chrome code are fixed.
579 'WARNING_CFLAGS': [ 579 'WARNING_CFLAGS': [
580 '-pedantic', 580 '-pedantic',
581 '-Wextra', 581 '-Wextra',
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 '__STDC_FORMAT_MACROS', 806 '__STDC_FORMAT_MACROS',
807 ], 807 ],
808 'msvs_settings': { 808 'msvs_settings': {
809 'VCCLCompilerTool': { 809 'VCCLCompilerTool': {
810 'Detect64BitPortabilityProblems': 'false', 810 'Detect64BitPortabilityProblems': 'false',
811 # TODO(new_hire): above line should go away 811 # TODO(new_hire): above line should go away
812 }, 812 },
813 }, 813 },
814 }, 814 },
815 }], 815 }],
816 ['clang==1 and nacl_standalone==1', { 816 ['nacl_clang==1 and nacl_standalone==1', {
817 'make_global_settings': [ 817 'make_global_settings': [
818 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'], 818 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
819 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'], 819 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
820 ['LINK', '$(CXX)'], 820 ['LINK', '$(CXX)'],
821 ['CC.host', '$(CC)'], 821 ['CC.host', '$(CC)'],
822 ['CXX.host', '$(CXX)'], 822 ['CXX.host', '$(CXX)'],
823 ['LINK.host', '$(LINK)'], 823 ['LINK.host', '$(LINK)'],
824 ], 824 ],
825 }], 825 }],
826 ['OS=="android" and nacl_standalone==1', { 826 ['OS=="android" and nacl_standalone==1', {
(...skipping 13 matching lines...) Expand all
840 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 840 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
841 # files to appear (when present) in the UI as actual files and not red 841 # files to appear (when present) in the UI as actual files and not red
842 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 842 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
843 # and therefore SYMROOT, needs to be set at the project level. 843 # and therefore SYMROOT, needs to be set at the project level.
844 'SYMROOT': '<(DEPTH)/xcodebuild', 844 'SYMROOT': '<(DEPTH)/xcodebuild',
845 }, 845 },
846 'includes': [ 846 'includes': [
847 'untrusted.gypi', 847 'untrusted.gypi',
848 ], 848 ],
849 } 849 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698