Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 }], | 226 }], |
| 227 | 227 |
| 228 # A flag for POSIX platforms | 228 # A flag for POSIX platforms |
| 229 ['OS=="win"', { | 229 ['OS=="win"', { |
| 230 'os_posix%': 0, | 230 'os_posix%': 0, |
| 231 }, { | 231 }, { |
| 232 'os_posix%': 1, | 232 'os_posix%': 1, |
| 233 }], | 233 }], |
| 234 | 234 |
| 235 # Flags to use Gtk and X11 on non-Mac POSIX platforms | 235 # Flags to use Gtk and X11 on non-Mac POSIX platforms |
| 236 ['OS=="win" or OS=="mac"', { | 236 ['OS=="win" or OS=="mac" or OS=="android"', { |
| 237 'toolkit_uses_gtk%': 0, | 237 'toolkit_uses_gtk%': 0, |
| 238 'use_x11%': 0, | 238 'use_x11%': 0, |
| 239 }, { | 239 }, { |
| 240 # TODO(dnicoara) Wayland build should have these disabled, but | 240 # TODO(dnicoara) Wayland build should have these disabled, but |
| 241 # currently GTK and X is too spread and it's hard to completely | 241 # currently GTK and X is too spread and it's hard to completely |
| 242 # remove every dependency. | 242 # remove every dependency. |
| 243 'toolkit_uses_gtk%': 1, | 243 'toolkit_uses_gtk%': 1, |
| 244 'use_x11%': 1, | 244 'use_x11%': 1, |
| 245 }], | 245 }], |
| 246 | 246 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 273 'file_manager_extension%': 0, | 273 'file_manager_extension%': 0, |
| 274 }], | 274 }], |
| 275 | 275 |
| 276 # Enable WebUI TaskManager only on Chrome OS, Touch or PureView. | 276 # Enable WebUI TaskManager only on Chrome OS, Touch or PureView. |
| 277 ['chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', { | 277 ['chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', { |
| 278 'webui_task_manager%': 1, | 278 'webui_task_manager%': 1, |
| 279 }, { | 279 }, { |
| 280 'webui_task_manager%': 0, | 280 'webui_task_manager%': 0, |
| 281 }], | 281 }], |
| 282 | 282 |
| 283 ['OS=="android"', { | |
| 284 'proprietary_codecs%': 1, | |
| 285 'enable_webrtc%': 0, | |
| 286 }], | |
| 287 | |
| 283 # Enable smooth scrolling for Mac, Win, Linux and ChromeOS | 288 # Enable smooth scrolling for Mac, Win, Linux and ChromeOS |
| 284 ['OS=="linux" or OS=="mac" or OS=="win"', { | 289 ['OS=="linux" or OS=="mac" or OS=="win"', { |
| 285 'enable_smooth_scrolling%': 1, | 290 'enable_smooth_scrolling%': 1, |
| 286 }, { | 291 }, { |
| 287 'enable_smooth_scrolling%': 0, | 292 'enable_smooth_scrolling%': 0, |
| 288 }], | 293 }], |
| 289 ], | 294 ], |
| 290 }, | 295 }, |
| 291 | 296 |
| 292 # Copy conditionally-set variables out one scope. | 297 # Copy conditionally-set variables out one scope. |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 | 434 |
| 430 # These two variables can be set in GYP_DEFINES while running | 435 # These two variables can be set in GYP_DEFINES while running |
| 431 # |gclient runhooks| to let clang run a plugin in every compilation. | 436 # |gclient runhooks| to let clang run a plugin in every compilation. |
| 432 # Only has an effect if 'clang=1' is in GYP_DEFINES as well. | 437 # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 433 # Example: | 438 # Example: |
| 434 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dyl ib clang_add_plugin=print-fns' gclient runhooks | 439 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dyl ib clang_add_plugin=print-fns' gclient runhooks |
| 435 | 440 |
| 436 'clang_load%': '', | 441 'clang_load%': '', |
| 437 'clang_add_plugin%': '', | 442 'clang_add_plugin%': '', |
| 438 | 443 |
| 444 # The default type of gtest. | |
| 445 'gtest_target_type%': 'executable', | |
| 446 | |
| 439 # Enable sampling based profiler. | 447 # Enable sampling based profiler. |
| 440 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html | 448 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 441 'profiling%': '0', | 449 'profiling%': '0', |
| 442 | 450 |
| 443 # Enable strict glibc debug mode. | 451 # Enable strict glibc debug mode. |
| 444 'glibcxx_debug%': 0, | 452 'glibcxx_debug%': 0, |
| 445 | 453 |
| 446 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot. | 454 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot. |
| 447 'linux_breakpad%': 0, | 455 'linux_breakpad%': 0, |
| 448 # And if we want to dump symbols for Breakpad-enabled builds. | 456 # And if we want to dump symbols for Breakpad-enabled builds. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 535 # If debug_devtools is set to 1, JavaScript files for DevTools are | 543 # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 536 # stored as is and loaded from disk. Otherwise, a concatenated file | 544 # stored as is and loaded from disk. Otherwise, a concatenated file |
| 537 # is stored in resources.pak. It is still possible to load JS files | 545 # is stored in resources.pak. It is still possible to load JS files |
| 538 # from disk by passing --debug-devtools cmdline switch. | 546 # from disk by passing --debug-devtools cmdline switch. |
| 539 'debug_devtools%': 0, | 547 'debug_devtools%': 0, |
| 540 | 548 |
| 541 # Point to ICU directory. | 549 # Point to ICU directory. |
| 542 'icu_src_dir': '../third_party/icu', | 550 'icu_src_dir': '../third_party/icu', |
| 543 | 551 |
| 544 'conditions': [ | 552 'conditions': [ |
| 545 ['os_posix==1 and OS!="mac"', { | 553 ['os_posix==1 and OS!="mac" and OS!="android"', { |
| 546 # This will set gcc_version to XY if you are running gcc X.Y.*. | 554 # This will set gcc_version to XY if you are running gcc X.Y.*. |
| 547 # This is used to tweak build flags for gcc 4.4. | 555 # This is used to tweak build flags for gcc 4.4. |
| 548 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', | 556 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
| 549 # Figure out the python architecture to decide if we build pyauto. | 557 # Figure out the python architecture to decide if we build pyauto. |
| 550 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/l ib/libpython<(python_ver).so.1.0)', | 558 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/l ib/libpython<(python_ver).so.1.0)', |
| 551 'conditions': [ | 559 'conditions': [ |
| 552 ['branding=="Chrome"', { | 560 ['branding=="Chrome"', { |
| 553 'linux_breakpad%': 1, | 561 'linux_breakpad%': 1, |
| 554 }], | 562 }], |
| 555 # All Chrome builds have breakpad symbols, but only process the | 563 # All Chrome builds have breakpad symbols, but only process the |
| 556 # symbols from official builds. | 564 # symbols from official builds. |
| 557 ['(branding=="Chrome" and buildtype=="Official")', { | 565 ['(branding=="Chrome" and buildtype=="Official")', { |
| 558 'linux_dump_symbols%': 1, | 566 'linux_dump_symbols%': 1, |
| 559 }], | 567 }], |
| 560 ], | 568 ], |
| 561 }], # os_posix==1 and OS!="mac" | 569 }], # os_posix==1 and OS!="mac" and OS!="android" |
| 570 ['OS=="android"', { | |
| 571 # Location of Android NDK. | |
| 572 'variables': { | |
| 573 'variables': { | |
| 574 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', | |
| 575 'android_target_arch%': 'arm', # target_arch in android terms. | |
| 576 'android_build_type%': 0, | |
|
Mark Mentovai
2011/09/20 00:11:58
Document what 0 means. What are the other possibil
michaelbai
2011/09/20 04:01:01
This is the default build type.
On 2011/09/20 00:
| |
| 577 }, | |
| 578 'android_ndk_root%': '<(android_ndk_root)', | |
| 579 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-< (android_target_arch)', | |
| 580 'android_build_type%': '<(android_build_type)', | |
| 581 }, | |
| 582 'android_ndk_root%': '<(android_ndk_root)', | |
| 583 'android_ndk_sysroot': '<(android_ndk_sysroot)', | |
| 584 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', | |
| 585 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', | |
| 562 | 586 |
| 587 # Android has its own crash report system | |
| 588 'linux_breakpad%': 0, | |
| 589 | |
| 590 # Android always uses openssl. | |
| 591 'use_openssl%': 1, | |
| 592 | |
| 593 'proprietary_codecs%': '<(proprietary_codecs)', | |
| 594 'safe_browsing%': 0, | |
| 595 'configuration_policy%': 0, | |
| 596 | |
| 597 # In android, we build the gtest targets as a shared_library | |
|
Mark Mentovai
2011/09/20 00:11:58
Please avoid writing “we” in comments. Line 603, 6
michaelbai
2011/09/20 04:01:01
Done.
| |
| 598 'gtest_target_type%': '<(gtest_target_type)', | |
|
Mark Mentovai
2011/09/20 00:11:58
This doesn’t seem right. Why not just say 'gtest_t
michaelbai
2011/09/20 04:01:01
We are in the transition of share_library, gtest_
| |
| 599 | |
| 600 # Android uses system APIs for decoding audio and video. | |
| 601 'use_libffmpeg%': '0', | |
| 602 | |
| 603 # We always use the chromium skia. The use_system_harfbuzz needs to | |
| 604 # match use_system_skia. | |
| 605 'use_system_skia%': '0', | |
| 606 'use_system_harfbuzz%': '0', | |
| 607 | |
| 608 # Should we use the system icu or statically link? | |
| 609 'use_system_icu%': 1, | |
| 610 'conditions': [ | |
| 611 ['android_build_type==0', { | |
| 612 'static_link_system_icu%': 1, | |
| 613 }, { | |
| 614 'static_link_system_icu%': 0, | |
| 615 }], | |
| 616 ], | |
| 617 # Should we use the system sqlite or statically link? | |
| 618 'use_system_sqlite%': '<(android_build_type)', | |
| 619 # Should we use the system libjpeg or statically link? | |
| 620 'use_system_libjpeg%': '<(android_build_type)', | |
| 621 # Should we use the system libexpat or statically link? | |
| 622 'use_system_libexpat%': '<(android_build_type)', | |
| 623 # Should we use the system stlport or statically link the NDK one? | |
| 624 'use_system_stlport%': '<(android_build_type)', | |
| 625 # Copy it out one scope. | |
| 626 'android_build_type%': '<(android_build_type)', | |
| 627 }], # OS=="android" | |
| 563 ['OS=="mac"', { | 628 ['OS=="mac"', { |
| 564 # Enable clang on mac by default! | 629 # Enable clang on mac by default! |
| 565 'clang%': 1, | 630 'clang%': 1, |
| 566 'conditions': [ | 631 'conditions': [ |
| 567 # mac_product_name is set to the name of the .app bundle as it should | 632 # mac_product_name is set to the name of the .app bundle as it should |
| 568 # appear on disk. This duplicates data from | 633 # appear on disk. This duplicates data from |
| 569 # chrome/app/theme/chromium/BRANDING and | 634 # chrome/app/theme/chromium/BRANDING and |
| 570 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get | 635 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 571 # these names into the build system. | 636 # these names into the build system. |
| 572 ['branding=="Chrome"', { | 637 ['branding=="Chrome"', { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 ['use_titlecase_in_grd_files==1', { | 751 ['use_titlecase_in_grd_files==1', { |
| 687 'grit_defines': ['-D', 'use_titlecase'], | 752 'grit_defines': ['-D', 'use_titlecase'], |
| 688 }], | 753 }], |
| 689 ['use_third_party_translations==1', { | 754 ['use_third_party_translations==1', { |
| 690 'grit_defines': ['-D', 'use_third_party_translations'], | 755 'grit_defines': ['-D', 'use_third_party_translations'], |
| 691 'locales': [ | 756 'locales': [ |
| 692 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', | 757 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 693 'ka', 'ku', 'kw', 'ms', 'ug' | 758 'ka', 'ku', 'kw', 'ms', 'ug' |
| 694 ], | 759 ], |
| 695 }], | 760 }], |
| 696 | 761 ['OS=="android"', { |
| 762 'grit_defines': ['-D', 'android'], | |
| 763 }], | |
| 697 ['clang_use_chrome_plugins==1', { | 764 ['clang_use_chrome_plugins==1', { |
| 698 'clang_chrome_plugins_flags': | 765 'clang_chrome_plugins_flags': |
| 699 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)', | 766 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)', |
| 700 }], | 767 }], |
| 701 | 768 |
| 702 # Set use_ibus to 1 to enable ibus support. | 769 # Set use_ibus to 1 to enable ibus support. |
| 703 ['touchui==1 and chromeos==1', { | 770 ['touchui==1 and chromeos==1', { |
| 704 'use_ibus%': 1, | 771 'use_ibus%': 1, |
| 705 }, { | 772 }, { |
| 706 'use_ibus%': 0, | 773 'use_ibus%': 0, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 895 }, | 962 }, |
| 896 # Add -lgcov for types executable, shared_library, and | 963 # Add -lgcov for types executable, shared_library, and |
| 897 # loadable_module; not for static_library. | 964 # loadable_module; not for static_library. |
| 898 # This is a delayed conditional. | 965 # This is a delayed conditional. |
| 899 'target_conditions': [ | 966 'target_conditions': [ |
| 900 ['_type!="static_library"', { | 967 ['_type!="static_library"', { |
| 901 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, | 968 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
| 902 }], | 969 }], |
| 903 ], | 970 ], |
| 904 }], | 971 }], |
| 905 ['OS=="linux"', { | 972 ['OS=="linux" or OS=="android"', { |
| 906 'cflags': [ '-ftest-coverage', | 973 'cflags': [ '-ftest-coverage', |
| 907 '-fprofile-arcs' ], | 974 '-fprofile-arcs' ], |
| 908 'link_settings': { 'libraries': [ '-lgcov' ] }, | 975 'link_settings': { 'libraries': [ '-lgcov' ] }, |
| 909 }], | 976 }], |
| 910 # Finally, for Windows, we simply turn on profiling. | 977 # Finally, for Windows, we simply turn on profiling. |
| 911 ['OS=="win"', { | 978 ['OS=="win"', { |
| 912 'msvs_settings': { | 979 'msvs_settings': { |
| 913 'VCLinkerTool': { | 980 'VCLinkerTool': { |
| 914 'Profile': 'true', | 981 'Profile': 'true', |
| 915 }, | 982 }, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1042 ['OS!="linux"', { | 1109 ['OS!="linux"', { |
| 1043 'sources/': [ | 1110 'sources/': [ |
| 1044 ['exclude', '_linux(_unittest)?\\.(h|cc)$'], | 1111 ['exclude', '_linux(_unittest)?\\.(h|cc)$'], |
| 1045 ['exclude', '(^|/)linux/'], | 1112 ['exclude', '(^|/)linux/'], |
| 1046 ], | 1113 ], |
| 1047 }], | 1114 }], |
| 1048 ['OS!="android"', { | 1115 ['OS!="android"', { |
| 1049 'sources/': [ | 1116 'sources/': [ |
| 1050 ['exclude', '_android(_unittest)?\\.cc$'], | 1117 ['exclude', '_android(_unittest)?\\.cc$'], |
| 1051 ['exclude', '(^|/)android/'], | 1118 ['exclude', '(^|/)android/'], |
| 1119 ['exclude', '(^|/)android_[^/]*\\.cc$'], | |
|
Mark Mentovai
2011/09/20 00:11:58
The correct pattern in Chromium is for these files
michaelbai
2011/09/20 04:01:01
Done.
| |
| 1052 ], | 1120 ], |
| 1053 }], | 1121 }], |
| 1054 # We use "POSIX" to refer to all non-Windows operating systems. | 1122 # We use "POSIX" to refer to all non-Windows operating systems. |
| 1055 ['OS=="win"', { | 1123 ['OS=="win"', { |
| 1056 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ], | 1124 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ], |
| 1057 # turn on warnings for signed/unsigned mismatch on chromium code. | 1125 # turn on warnings for signed/unsigned mismatch on chromium code. |
| 1058 'msvs_settings': { | 1126 'msvs_settings': { |
| 1059 'VCCLCompilerTool': { | 1127 'VCCLCompilerTool': { |
| 1060 'AdditionalOptions': ['/we4389'], | 1128 'AdditionalOptions': ['/we4389'], |
| 1061 }, | 1129 }, |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1336 'variables': { | 1404 'variables': { |
| 1337 'debug_optimize%': '0', | 1405 'debug_optimize%': '0', |
| 1338 }, | 1406 }, |
| 1339 'defines': [ | 1407 'defines': [ |
| 1340 '_DEBUG', | 1408 '_DEBUG', |
| 1341 ], | 1409 ], |
| 1342 'cflags': [ | 1410 'cflags': [ |
| 1343 '-O>(debug_optimize)', | 1411 '-O>(debug_optimize)', |
| 1344 '-g', | 1412 '-g', |
| 1345 ], | 1413 ], |
| 1414 'conditions' : [ | |
| 1415 ['OS=="android"', { | |
| 1416 'cflags': [ | |
| 1417 '-fno-omit-frame-pointer', | |
| 1418 ], | |
| 1419 }], | |
| 1420 ], | |
| 1421 'target_conditions' : [ | |
| 1422 ['_toolset=="target"', { | |
| 1423 'conditions': [ | |
| 1424 ['OS=="android" and debug_optimize==0', { | |
| 1425 'cflags': [ | |
| 1426 '-mlong-calls', # Needed when compiling with -O0 | |
| 1427 ], | |
| 1428 }], | |
| 1429 ['arm_thumb==1', { | |
| 1430 'cflags': [ | |
| 1431 '-marm', | |
| 1432 ], | |
| 1433 }], | |
| 1434 ], | |
| 1435 }], | |
| 1436 ], | |
| 1346 }, | 1437 }, |
| 1347 'Release_Base': { | 1438 'Release_Base': { |
| 1348 'variables': { | 1439 'variables': { |
| 1349 'release_optimize%': '2', | 1440 'release_optimize%': '2', |
| 1350 # Binaries become big and gold is unable to perform GC | 1441 # Binaries become big and gold is unable to perform GC |
| 1351 # and remove unused sections for some of test targets | 1442 # and remove unused sections for some of test targets |
| 1352 # on 32 bit platform. | 1443 # on 32 bit platform. |
| 1353 # (This is currently observed only in chromeos valgrind bots) | 1444 # (This is currently observed only in chromeos valgrind bots) |
| 1354 # The following flag is to disable --gc-sections linker | 1445 # The following flag is to disable --gc-sections linker |
| 1355 # option for these bots. | 1446 # option for these bots. |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 1374 # See http://lwn.net/Articles/192624/ . | 1465 # See http://lwn.net/Articles/192624/ . |
| 1375 '-Wl,-O1', | 1466 '-Wl,-O1', |
| 1376 '-Wl,--as-needed', | 1467 '-Wl,--as-needed', |
| 1377 ], | 1468 ], |
| 1378 'conditions' : [ | 1469 'conditions' : [ |
| 1379 ['no_gc_sections==0', { | 1470 ['no_gc_sections==0', { |
| 1380 'ldflags': [ | 1471 'ldflags': [ |
| 1381 '-Wl,--gc-sections', | 1472 '-Wl,--gc-sections', |
| 1382 ], | 1473 ], |
| 1383 }], | 1474 }], |
| 1475 ['OS=="android"', { | |
| 1476 'cflags': [ | |
| 1477 '-fomit-frame-pointer', | |
| 1478 ], | |
| 1479 }], | |
| 1384 ['clang==1', { | 1480 ['clang==1', { |
| 1385 'cflags!': [ | 1481 'cflags!': [ |
| 1386 '-fno-ident', | 1482 '-fno-ident', |
| 1387 ], | 1483 ], |
| 1388 }], | 1484 }], |
| 1389 ['profiling==1', { | 1485 ['profiling==1', { |
| 1390 'cflags': [ | 1486 'cflags': [ |
| 1391 '-fno-omit-frame-pointer', | 1487 '-fno-omit-frame-pointer', |
| 1392 '-g', | 1488 '-g', |
| 1393 ], | 1489 ], |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1502 'target_conditions': [ | 1598 'target_conditions': [ |
| 1503 ['_toolset=="target"', { | 1599 ['_toolset=="target"', { |
| 1504 'cflags_cc': [ | 1600 'cflags_cc': [ |
| 1505 # The codesourcery arm-2009q3 toolchain warns at that the ABI | 1601 # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 1506 # has changed whenever it encounters a varargs function. This | 1602 # has changed whenever it encounters a varargs function. This |
| 1507 # silences those warnings, as they are not helpful and | 1603 # silences those warnings, as they are not helpful and |
| 1508 # clutter legitimate warnings. | 1604 # clutter legitimate warnings. |
| 1509 '-Wno-abi', | 1605 '-Wno-abi', |
| 1510 ], | 1606 ], |
| 1511 'conditions': [ | 1607 'conditions': [ |
| 1512 ['arm_thumb == 1', { | 1608 ['arm_thumb==1', { |
| 1513 'cflags': [ | 1609 'cflags': [ |
| 1514 '-mthumb', | 1610 '-mthumb', |
| 1515 ] | 1611 ] |
| 1516 }], | 1612 }], |
| 1517 ['armv7==1', { | 1613 ['armv7==1', { |
| 1518 'cflags': [ | 1614 'cflags': [ |
| 1519 '-march=armv7-a', | 1615 '-march=armv7-a', |
| 1520 '-mtune=cortex-a8', | 1616 '-mtune=cortex-a8', |
| 1521 '-mfloat-abi=softfp', | 1617 '-mfloat-abi=softfp', |
| 1522 ], | 1618 ], |
| 1523 'conditions': [ | 1619 'conditions': [ |
| 1524 ['arm_neon==1', { | 1620 ['arm_neon==1', { |
| 1525 'cflags': [ '-mfpu=neon', ], | 1621 'cflags': [ '-mfpu=neon', ], |
| 1526 }, { | 1622 }, { |
| 1527 'cflags': [ '-mfpu=<(arm_fpu)', ], | 1623 'cflags': [ '-mfpu=<(arm_fpu)', ], |
| 1528 }] | 1624 }] |
| 1529 ], | 1625 ], |
| 1530 }], | 1626 }], |
| 1627 ['OS=="android"', { | |
| 1628 # The following flags are derived from what Android uses | |
| 1629 # by default when building for arm. | |
| 1630 'cflags': [ '-Wno-psabi', ], | |
| 1631 'conditions': [ | |
| 1632 ['arm_thumb == 1', { | |
| 1633 # Android toolchain doesn't support -mimplicit-it=thumb | |
| 1634 'cflags!': [ '-Wa,-mimplicit-it=thumb', ], | |
| 1635 'cflags': [ '-mthumb-interwork', ], | |
| 1636 }], | |
| 1637 ['armv7==0', { | |
| 1638 # Flags suitable for Android emulator | |
| 1639 'cflags': [ | |
| 1640 '-march=armv5te', | |
| 1641 '-mtune=xscale', | |
| 1642 '-msoft-float', | |
| 1643 '-D__ARM_ARCH_5__', | |
| 1644 '-D__ARM_ARCH_5T__', | |
| 1645 '-D__ARM_ARCH_5E__', | |
| 1646 '-D__ARM_ARCH_5TE__', | |
| 1647 ], | |
| 1648 }], | |
| 1649 ], | |
| 1650 }], | |
| 1531 ], | 1651 ], |
| 1532 }], | 1652 }], |
| 1533 ], | 1653 ], |
| 1534 }], | 1654 }], |
| 1535 ['linux_fpic==1', { | 1655 ['linux_fpic==1', { |
| 1536 'cflags': [ | 1656 'cflags': [ |
| 1537 '-fPIC', | 1657 '-fPIC', |
| 1538 ], | 1658 ], |
| 1539 }], | 1659 }], |
| 1540 ['sysroot!=""', { | 1660 ['sysroot!=""', { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1615 }], | 1735 }], |
| 1616 # FreeBSD-specific options; note that most FreeBSD options are set above, | 1736 # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 1617 # with Linux. | 1737 # with Linux. |
| 1618 ['OS=="freebsd"', { | 1738 ['OS=="freebsd"', { |
| 1619 'target_defaults': { | 1739 'target_defaults': { |
| 1620 'ldflags': [ | 1740 'ldflags': [ |
| 1621 '-Wl,--no-keep-memory', | 1741 '-Wl,--no-keep-memory', |
| 1622 ], | 1742 ], |
| 1623 }, | 1743 }, |
| 1624 }], | 1744 }], |
| 1745 # Android-specific options; note that most are set above with Linux. | |
| 1746 ['OS=="android"', { | |
| 1747 'variables': { | |
| 1748 'android_target_arch%': 'arm', # target_arch in android terms. | |
| 1749 'conditions': [ | |
| 1750 # Android uses x86 instead of ia32 for their target_arch designation. | |
| 1751 ['target_arch=="ia32"', { | |
| 1752 'android_target_arch%': 'x86', | |
| 1753 }], | |
| 1754 # Which stlport library should we link? We need to figure this out | |
| 1755 # early since it needs symbols from libgcc.a, so it has to be before | |
| 1756 # that in the set of libraries. | |
| 1757 ['use_system_stlport==1', { | |
| 1758 'android_stlport_library': 'stlport', | |
| 1759 }, { | |
| 1760 'android_stlport_library': 'stlport_static', | |
| 1761 }], | |
| 1762 ], | |
| 1763 | |
| 1764 # Placing this variable here helps us NOT fork libvpx, used | |
| 1765 # by remoting. Remoting is off, so we don't build it, | |
|
Mark Mentovai
2011/09/20 00:11:58
“We,” also on 1754, 1767, 1773, 1791-1794, 1798, 1
michaelbai
2011/09/20 04:01:01
Done.
| |
| 1766 # so forking it's deps seems like overkill. | |
| 1767 # But we do need this variable defined to properly run gyp. | |
| 1768 # A proper solution is to have an OS==android conditional | |
| 1769 # in third_party/libvpx/libvpx.gyp to define it. | |
| 1770 'libvpx_path': 'lib/linux/arm', | |
| 1771 }, | |
| 1772 'target_defaults': { | |
| 1773 # We build a Release build by default to match Android build behavior. | |
| 1774 # This is typical with Android because Debug builds tend to be much | |
| 1775 # larger and run very slowly on constrained devices. It is still | |
| 1776 # possible to do a Debug build by specifying BUILDTYPE=Debug on the | |
| 1777 # 'make' command line. | |
| 1778 'default_configuration': 'Release', | |
| 1779 | |
| 1780 'variables': { | |
| 1781 'release_extra_cflags%': '', | |
| 1782 }, | |
| 1783 | |
| 1784 'target_conditions': [ | |
| 1785 # Settings for building device targets using Android's toolchain. | |
| 1786 # These are based on the setup.mk file from the Android NDK. | |
| 1787 # | |
| 1788 # The NDK Android executable link step looks as follows: | |
| 1789 # $LDFLAGS | |
| 1790 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o | |
| 1791 # $(PRIVATE_OBJECTS) <-- The .o that we built | |
| 1792 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built | |
| 1793 # $(TARGET_LIBGCC) <-- libgcc.a | |
| 1794 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built | |
| 1795 # $(PRIVATE_LDLIBS) <-- System .so | |
| 1796 # $(TARGET_CRTEND_O) <-- crtend.o | |
| 1797 # | |
| 1798 # For now we approximate the above for executables by adding | |
| 1799 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end | |
| 1800 # of 'libraries'. | |
| 1801 # | |
| 1802 # The NDK Android shared library link step looks as follows: | |
| 1803 # $LDFLAGS | |
| 1804 # $(PRIVATE_OBJECTS) <-- The .o that we built | |
| 1805 # -l,--whole-archive | |
| 1806 # $(PRIVATE_WHOLE_STATIC_LIBRARIES) | |
| 1807 # -l,--no-whole-archive | |
| 1808 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built | |
| 1809 # $(TARGET_LIBGCC) <-- libgcc.a | |
| 1810 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built | |
| 1811 # $(PRIVATE_LDLIBS) <-- System .so | |
| 1812 # | |
| 1813 # For now we assume that we don't need any whole static libs. | |
| 1814 # | |
| 1815 # For both executables and shared libraries we add the proper | |
| 1816 # libgcc.a to the start of libraries which puts it in the | |
| 1817 # proper spot after .o and .a files get linked in. | |
| 1818 # | |
| 1819 # TODO: The proper thing to do longer-tem would be proper gyp | |
| 1820 # support for a custom link command line. | |
| 1821 ['_toolset=="target"', { | |
| 1822 'cflags!': [ | |
| 1823 '-pthread', # Not supported by Android toolchain. | |
| 1824 ], | |
| 1825 'cflags': [ | |
| 1826 '-U__linux__', # Don't allow toolchain to claim -D__linux__ | |
| 1827 '-ffunction-sections', | |
| 1828 '-funwind-tables', | |
| 1829 '-g', | |
| 1830 '-fstack-protector', | |
| 1831 '-fno-short-enums', | |
| 1832 '-finline-limit=64', | |
| 1833 '-Wa,--noexecstack', | |
| 1834 '-Wno-error=non-virtual-dtor', # TODO(tedbo): Fix warnings. | |
| 1835 '<@(release_extra_cflags)', | |
| 1836 # Note: This include is in cflags to ensure that it comes after | |
| 1837 # all of the includes. | |
| 1838 '-I<(android_ndk_include)', | |
| 1839 ], | |
| 1840 'defines': [ | |
| 1841 'ANDROID', | |
| 1842 '__GNU_SOURCE=1', # Necessary for clone() | |
| 1843 'USE_STLPORT=1', | |
| 1844 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
| 1845 'HAVE_OFF64_T', | |
| 1846 'HAVE_SYS_UIO_H', | |
| 1847 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize . | |
| 1848 ], | |
| 1849 'ldflags!': [ | |
| 1850 '-pthread', # Not supported by Android toolchain. | |
| 1851 ], | |
| 1852 'ldflags': [ | |
| 1853 '-nostdlib', | |
| 1854 '-Wl,--no-undefined', | |
| 1855 '-Wl,--icf=safe', # Enable identical code folding to reduce size | |
| 1856 # Don't export symbols from statically linked libraries. | |
| 1857 '-Wl,--exclude-libs=ALL', | |
| 1858 ], | |
| 1859 'libraries!': [ | |
| 1860 '-lrt', # librt is built into Bionic. | |
| 1861 # Not supported by Android toolchain. | |
| 1862 # Where do these come from? Can't find references in | |
| 1863 # any Chromium gyp or gypi file. Maybe they come from | |
| 1864 # gyp itself? | |
| 1865 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lpl c4', '-lnspr4', | |
| 1866 ], | |
| 1867 'libraries': [ | |
| 1868 '-l<(android_stlport_library)', | |
| 1869 # Manually link the libgcc.a that the cross compiler uses. | |
| 1870 '<!($CROSS_CC -print-libgcc-file-name)', | |
| 1871 '-lc', | |
| 1872 '-ldl', | |
| 1873 '-lstdc++', | |
| 1874 '-lm', | |
| 1875 ], | |
| 1876 'conditions': [ | |
| 1877 ['android_build_type==1', { | |
| 1878 'ldflags': [ | |
| 1879 '-Wl,-rpath-link=<(android_ndk_lib):<(android_lib)', | |
| 1880 '-L<(android_ndk_lib)', | |
| 1881 '-L<(android_lib)', | |
| 1882 ], | |
| 1883 }, | |
| 1884 { # android_build_type==0 | |
| 1885 'ldflags': [ | |
| 1886 '-Wl,-rpath-link=<(android_ndk_lib)', | |
| 1887 '-L<(android_ndk_lib)', | |
| 1888 ], | |
| 1889 }], | |
| 1890 # NOTE: The stlport header include paths below are specified in | |
| 1891 # cflags rather than include_dirs because they need to come | |
| 1892 # after include_dirs. Think of them like system headers, but | |
| 1893 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 | |
| 1894 # toolchain (circa Gingerbread) will exhibit strange errors. | |
| 1895 # The include ordering here is important; change with caution. | |
| 1896 ['use_system_stlport==0', { | |
| 1897 'cflags': [ | |
| 1898 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport', | |
| 1899 ], | |
| 1900 'conditions': [ | |
| 1901 ['target_arch=="arm" and armv7==1', { | |
| 1902 'ldflags': [ | |
| 1903 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeab i-v7a', | |
| 1904 ], | |
| 1905 }], | |
| 1906 ['target_arch=="arm" and armv7==0', { | |
| 1907 'ldflags': [ | |
| 1908 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeab i', | |
| 1909 ], | |
| 1910 }], | |
| 1911 ['target_arch=="ia32"', { | |
| 1912 'ldflags': [ | |
| 1913 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86', | |
| 1914 ], | |
| 1915 }], | |
| 1916 ], | |
| 1917 }], | |
| 1918 ['target_arch=="ia32"', { | |
| 1919 # The x86 toolchain currently has problems with stack-protector. | |
| 1920 'cflags!': [ | |
| 1921 '-fstack-protector', | |
| 1922 ], | |
| 1923 'cflags': [ | |
| 1924 '-fno-stack-protector', | |
| 1925 ], | |
| 1926 }], | |
| 1927 ], | |
| 1928 'target_conditions': [ | |
| 1929 ['_type=="executable"', { | |
| 1930 'ldflags': [ | |
| 1931 '-Bdynamic', | |
| 1932 '-Wl,-dynamic-linker,/system/bin/linker', | |
| 1933 '-Wl,--gc-sections', | |
| 1934 '-Wl,-z,nocopyreloc', | |
| 1935 # crtbegin_dynamic.o should be the last item in ldflags. | |
| 1936 '<(android_ndk_lib)/crtbegin_dynamic.o', | |
| 1937 ], | |
| 1938 'libraries': [ | |
| 1939 # crtend_android.o needs to be the last item in libraries. | |
| 1940 # Do not add any libraries after this! | |
| 1941 '<(android_ndk_lib)/crtend_android.o', | |
| 1942 ], | |
| 1943 }], | |
| 1944 ['_type=="shared_library"', { | |
| 1945 'ldflags': [ | |
| 1946 '-Wl,-shared,-Bsymbolic', | |
| 1947 ], | |
| 1948 }], | |
| 1949 ], | |
| 1950 }], | |
| 1951 # Settings for building host targets using the system toolchain. | |
| 1952 ['_toolset=="host"', { | |
| 1953 'ldflags!': [ | |
| 1954 '-Wl,-z,noexecstack', | |
| 1955 '-Wl,--gc-sections', | |
| 1956 '-Wl,-O1', | |
| 1957 '-Wl,--as-needed', | |
| 1958 ], | |
| 1959 }], | |
| 1960 ], | |
| 1961 }, | |
| 1962 }], | |
| 1625 ['OS=="solaris"', { | 1963 ['OS=="solaris"', { |
| 1626 'cflags!': ['-fvisibility=hidden'], | 1964 'cflags!': ['-fvisibility=hidden'], |
| 1627 'cflags_cc!': ['-fvisibility-inlines-hidden'], | 1965 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 1628 }], | 1966 }], |
| 1629 ['OS=="mac"', { | 1967 ['OS=="mac"', { |
| 1630 'target_defaults': { | 1968 'target_defaults': { |
| 1631 'variables': { | 1969 'variables': { |
| 1632 # These should end with %, but there seems to be a bug with % in | 1970 # These should end with %, but there seems to be a bug with % in |
| 1633 # variables that are intended to be set to different values in | 1971 # variables that are intended to be set to different values in |
| 1634 # different targets, like these. | 1972 # different targets, like these. |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2055 # settings in target dicts. SYMROOT is a special case, because many other | 2393 # settings in target dicts. SYMROOT is a special case, because many other |
| 2056 # Xcode variables depend on it, including variables such as | 2394 # Xcode variables depend on it, including variables such as |
| 2057 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 2395 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 2058 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 2396 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 2059 # files to appear (when present) in the UI as actual files and not red | 2397 # files to appear (when present) in the UI as actual files and not red |
| 2060 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 2398 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 2061 # and therefore SYMROOT, needs to be set at the project level. | 2399 # and therefore SYMROOT, needs to be set at the project level. |
| 2062 'SYMROOT': '<(DEPTH)/xcodebuild', | 2400 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 2063 }, | 2401 }, |
| 2064 } | 2402 } |
| OLD | NEW |