| OLD | NEW |
| 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 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': { | 9 'variables': { |
| 10 # .gyp files or targets should set chromium_code to 1 if they build | 10 # .gyp files or targets should set chromium_code to 1 if they build |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 }, | 534 }, |
| 535 # Add -lgcov for types executable, shared_library, and | 535 # Add -lgcov for types executable, shared_library, and |
| 536 # loadable_module; not for static_library. | 536 # loadable_module; not for static_library. |
| 537 # This is a delayed conditional. | 537 # This is a delayed conditional. |
| 538 'target_conditions': [ | 538 'target_conditions': [ |
| 539 ['_type!="static_library"', { | 539 ['_type!="static_library"', { |
| 540 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, | 540 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
| 541 }], | 541 }], |
| 542 ], | 542 ], |
| 543 }], | 543 }], |
| 544 # Linux gyp (into scons) doesn't like target_conditions? | |
| 545 # TODO(???): track down why 'target_conditions' doesn't work | |
| 546 # on Linux gyp into scons like it does on Mac gyp into xcodeproj. | |
| 547 ['OS=="linux"', { | 544 ['OS=="linux"', { |
| 548 'cflags': [ '-ftest-coverage', | 545 'cflags': [ '-ftest-coverage', |
| 549 '-fprofile-arcs' ], | 546 '-fprofile-arcs' ], |
| 550 'link_settings': { 'libraries': [ '-lgcov' ] }, | 547 'link_settings': { 'libraries': [ '-lgcov' ] }, |
| 551 }], | 548 }], |
| 552 # Finally, for Windows, we simply turn on profiling. | 549 # Finally, for Windows, we simply turn on profiling. |
| 553 ['OS=="win"', { | 550 ['OS=="win"', { |
| 554 'msvs_settings': { | 551 'msvs_settings': { |
| 555 'VCLinkerTool': { | 552 'VCLinkerTool': { |
| 556 'Profile': 'true', | 553 'Profile': 'true', |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 'cflags_cc': [ | 884 'cflags_cc': [ |
| 888 '-fno-rtti', | 885 '-fno-rtti', |
| 889 '-fno-threadsafe-statics', | 886 '-fno-threadsafe-statics', |
| 890 # Make inline functions have hidden visiblity by default. | 887 # Make inline functions have hidden visiblity by default. |
| 891 # Surprisingly, not covered by -fvisibility=hidden. | 888 # Surprisingly, not covered by -fvisibility=hidden. |
| 892 '-fvisibility-inlines-hidden', | 889 '-fvisibility-inlines-hidden', |
| 893 ], | 890 ], |
| 894 'ldflags': [ | 891 'ldflags': [ |
| 895 '-pthread', '-Wl,-z,noexecstack', | 892 '-pthread', '-Wl,-z,noexecstack', |
| 896 ], | 893 ], |
| 897 'scons_variable_settings': { | |
| 898 'LIBPATH': ['$LIB_DIR'], | |
| 899 # Linking of large files uses lots of RAM, so serialize links | |
| 900 # using the handy flock command from util-linux. | |
| 901 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], | |
| 902 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], | |
| 903 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], | |
| 904 | |
| 905 # We have several cases where archives depend on each other in | |
| 906 # a cyclic fashion. Since the GNU linker does only a single | |
| 907 # pass over the archives we surround the libraries with | |
| 908 # --start-group and --end-group (aka -( and -) ). That causes | |
| 909 # ld to loop over the group until no more undefined symbols | |
| 910 # are found. In an ideal world we would only make groups from | |
| 911 # those libraries which we knew to be in cycles. However, | |
| 912 # that's tough with SCons, so we bodge it by making all the | |
| 913 # archives a group by redefining the linking command here. | |
| 914 # | |
| 915 # TODO: investigate whether we still have cycles that | |
| 916 # require --{start,end}-group. There has been a lot of | |
| 917 # refactoring since this was first coded, which might have | |
| 918 # eliminated the circular dependencies. | |
| 919 # | |
| 920 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS | |
| 921 # so that we prefer our own built libraries (e.g. -lpng) to | |
| 922 # system versions of libraries that pkg-config might turn up. | |
| 923 # TODO(sgk): investigate handling this not by re-ordering the | |
| 924 # flags this way, but by adding a hook to use the SCons | |
| 925 # ParseFlags() option on the output from pkg-config. | |
| 926 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', | |
| 927 '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES', | |
| 928 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], | |
| 929 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', | |
| 930 '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES', | |
| 931 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], | |
| 932 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', | |
| 933 '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES', | |
| 934 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']
], | |
| 935 'IMPLICIT_COMMAND_DEPENDENCIES': 0, | |
| 936 # -rpath is only used when building with shared libraries. | |
| 937 'conditions': [ | |
| 938 [ 'library=="shared_library"', { | |
| 939 'RPATH': '$LIB_DIR', | |
| 940 }], | |
| 941 ], | |
| 942 }, | |
| 943 'scons_import_variables': [ | |
| 944 'AS', | |
| 945 'CC', | |
| 946 'CXX', | |
| 947 'LINK', | |
| 948 ], | |
| 949 'scons_propagate_variables': [ | |
| 950 'AS', | |
| 951 'CC', | |
| 952 'CCACHE_DIR', | |
| 953 'CXX', | |
| 954 'DISTCC_DIR', | |
| 955 'DISTCC_HOSTS', | |
| 956 'HOME', | |
| 957 'INCLUDE_SERVER_ARGS', | |
| 958 'INCLUDE_SERVER_PORT', | |
| 959 'LINK', | |
| 960 'CHROME_BUILD_TYPE', | |
| 961 'CHROMIUM_BUILD', | |
| 962 'OFFICIAL_BUILD', | |
| 963 ], | |
| 964 'configurations': { | 894 'configurations': { |
| 965 'Debug_Base': { | 895 'Debug_Base': { |
| 966 'variables': { | 896 'variables': { |
| 967 'debug_optimize%': '0', | 897 'debug_optimize%': '0', |
| 968 }, | 898 }, |
| 969 'defines': [ | 899 'defines': [ |
| 970 '_DEBUG', | 900 '_DEBUG', |
| 971 ], | 901 ], |
| 972 'cflags': [ | 902 'cflags': [ |
| 973 '-O>(debug_optimize)', | 903 '-O>(debug_optimize)', |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 }, | 1423 }, |
| 1494 }], | 1424 }], |
| 1495 ['enable_new_npdevice_api==1', { | 1425 ['enable_new_npdevice_api==1', { |
| 1496 'target_defaults': { | 1426 'target_defaults': { |
| 1497 'defines': [ | 1427 'defines': [ |
| 1498 'ENABLE_NEW_NPDEVICE_API', | 1428 'ENABLE_NEW_NPDEVICE_API', |
| 1499 ], | 1429 ], |
| 1500 }, | 1430 }, |
| 1501 }], | 1431 }], |
| 1502 ], | 1432 ], |
| 1503 'scons_settings': { | |
| 1504 'sconsbuild_dir': '<(DEPTH)/sconsbuild', | |
| 1505 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], | |
| 1506 }, | |
| 1507 'xcode_settings': { | 1433 'xcode_settings': { |
| 1508 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! | 1434 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 1509 # This block adds *project-wide* configuration settings to each project | 1435 # This block adds *project-wide* configuration settings to each project |
| 1510 # file. It's almost always wrong to put things here. Specify your | 1436 # file. It's almost always wrong to put things here. Specify your |
| 1511 # custom xcode_settings in target_defaults to add them to targets instead. | 1437 # custom xcode_settings in target_defaults to add them to targets instead. |
| 1512 | 1438 |
| 1513 # In an Xcode Project Info window, the "Base SDK for All Configurations" | 1439 # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 1514 # setting sets the SDK on a project-wide basis. In order to get the | 1440 # setting sets the SDK on a project-wide basis. In order to get the |
| 1515 # configured SDK to show properly in the Xcode UI, SDKROOT must be set | 1441 # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 1516 # here at the project level. | 1442 # here at the project level. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1529 # and therefore SYMROOT, needs to be set at the project level. | 1455 # and therefore SYMROOT, needs to be set at the project level. |
| 1530 'SYMROOT': '<(DEPTH)/xcodebuild', | 1456 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 1531 }, | 1457 }, |
| 1532 } | 1458 } |
| 1533 | 1459 |
| 1534 # Local Variables: | 1460 # Local Variables: |
| 1535 # tab-width:2 | 1461 # tab-width:2 |
| 1536 # indent-tabs-mode:nil | 1462 # indent-tabs-mode:nil |
| 1537 # End: | 1463 # End: |
| 1538 # vim: set expandtab tabstop=2 shiftwidth=2: | 1464 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |