summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 21:03:03 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-09 21:03:03 +0000
commit22a3188988e576693604aa3e7a39a97762fe584d (patch)
tree5ce25cf76f06b7d87d083213d4261aaf08553e51
parent5f1746bff720c94389dd288f88c80d6f4e9cccc0 (diff)
downloadchromium_src-22a3188988e576693604aa3e7a39a97762fe584d.zip
chromium_src-22a3188988e576693604aa3e7a39a97762fe584d.tar.gz
chromium_src-22a3188988e576693604aa3e7a39a97762fe584d.tar.bz2
Back out r7826, which broke the Linux build
Review URL: http://codereview.chromium.org/17327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7830 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/crash_cache.scons66
-rw-r--r--net/dump_cache.scons63
-rw-r--r--net/net_lib.scons357
-rw-r--r--net/net_perftests.scons88
-rw-r--r--net/net_unittests.scons212
-rw-r--r--net/stress_cache.scons65
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.scons63
-rw-r--r--site_scons/site_tools/_Node_MSVS.py401
-rw-r--r--site_scons/site_tools/chromium_builders.py6
9 files changed, 204 insertions, 1117 deletions
diff --git a/net/crash_cache.scons b/net/crash_cache.scons
index 834cb51..0aab3ec 100644
--- a/net/crash_cache.scons
+++ b/net/crash_cache.scons
@@ -24,66 +24,20 @@ if env.Bit('windows'):
],
)
-# TODO: restore to alphabetical order; below matches original .vcproj.
-input_files = ChromeFileList([
- 'tools/crash_cache/crash_cache.cc',
+input_files = [
'disk_cache/disk_cache_test_util$OBJSUFFIX',
-])
+ 'tools/crash_cache/crash_cache.cc',
+]
if not env.AnyBits('linux', 'mac'):
# TODO(port): port to linux and mac?
env.ChromeTestProgram('crash_cache', input_files)
-p = env.ChromeMSVSProject('$NET_DIR/build/crash_cache.vcproj',
- guid='{B0EE0599-2913-46A0-A847-A3EC813658D3}',
- dependencies = [
- '$BASE_DIR/build/base.vcproj',
- '$NET_DIR/build/net.vcproj',
- '$ICU38_DIR/build/icu.vcproj',
- ],
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=TODO,
- files=input_files,
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- 'VCCLCompilerTool',
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- MSVSTool('VCLinkerTool',
- SubSystem='1'),
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ],
- ConfigurationType='1')
-
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- ])
-
-env.AlwaysBuild(p)
-
-i = env.Command('$CHROME_SRC_DIR/net/build/crash_cache.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
+env.ChromeMSVSProject('$NET_DIR/build/crash_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ ],
+ guid='{B0EE0599-2913-46A0-A847-A3EC813658D3}')
diff --git a/net/dump_cache.scons b/net/dump_cache.scons
index 75231bb..0dfa39c 100644
--- a/net/dump_cache.scons
+++ b/net/dump_cache.scons
@@ -23,66 +23,21 @@ if env.Bit('windows'):
],
)
-input_files = ChromeFileList([
+input_files = [
'tools/dump_cache/dump_cache.cc',
'tools/dump_cache/dump_files.cc',
'tools/dump_cache/upgrade.cc',
-])
+]
if env.Bit('windows'):
env.ChromeTestProgram('dump_cache', input_files)
-p = env.ChromeMSVSProject('$NET_DIR/build/dump_cache.vcproj',
- guid='{4A14E455-2B7C-4C0F-BCC2-35A9666C186F}',
- dependencies = [
- '$BASE_DIR/build/base.vcproj',
- '$ICU38_DIR/build/icu.vcproj',
- '$NET_DIR/build/net.vcproj',
- ],
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=TODO,
- files=input_files,
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- 'VCCLCompilerTool',
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- MSVSTool('VCLinkerTool',
- SubSystem='1'),
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ],
- ConfigurationType='1')
-
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- ])
-
-env.AlwaysBuild(p)
-
-i = env.Command('$CHROME_SRC_DIR/net/build/dump_cache.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
+env.ChromeMSVSProject('$NET_DIR/build/dump_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ],
+ guid='{4A14E455-2B7C-4C0F-BCC2-35A9666C186F}')
diff --git a/net/net_lib.scons b/net/net_lib.scons
index 2b83995..30e83a8 100644
--- a/net/net_lib.scons
+++ b/net/net_lib.scons
@@ -8,7 +8,7 @@ Configuration for building net.lib / libnet.a.
Import('env')
-env = env.Clone(COMPONENT_STATIC=True)
+env = env.Clone()
env.ApplySConscript([
'$GRIT_DIR/build/using_generated_resources.scons',
@@ -17,250 +17,90 @@ env.ApplySConscript([
'$ZLIB_DIR/using_zlib.scons',
])
-input_files = ChromeFileList([
- MSVSFilter('base', [
+# These net files work on *all* platforms; files that don't work
+# cross-platform live below.
+input_files = [
'base/address_list.cc',
- 'base/address_list.h',
- 'base/auth.h',
'base/auth_cache.cc',
- 'base/auth_cache.h',
'base/base64.cc',
- 'base/base64.h',
'base/bzip2_filter.cc',
- 'base/bzip2_filter.h',
- 'base/cert_status_flags.h',
- 'base/client_socket.h',
'base/client_socket_factory.cc',
- 'base/client_socket_factory.h',
'base/client_socket_handle.cc',
- 'base/client_socket_handle.h',
'base/client_socket_pool.cc',
- 'base/client_socket_pool.h',
- 'base/completion_callback.h',
'base/cookie_monster.cc',
- 'base/cookie_monster.h',
'base/cookie_policy.cc',
- 'base/cookie_policy.h',
'base/data_url.cc',
- 'base/data_url.h',
'base/directory_lister.cc',
- 'base/directory_lister.h',
'base/dns_resolution_observer.cc',
- 'base/dns_resolution_observer.h',
- 'base/effective_tld_names.dat',
'base/escape.cc',
- 'base/escape.h',
'base/ev_root_ca_metadata.cc',
- 'base/ev_root_ca_metadata.h',
- 'base/file_stream.h',
- 'base/file_stream_win.cc',
'base/filter.cc',
- 'base/filter.h',
'base/gzip_filter.cc',
- 'base/gzip_filter.h',
'base/gzip_header.cc',
- 'base/gzip_header.h',
'base/host_resolver.cc',
- 'base/host_resolver.h',
'base/listen_socket.cc',
- 'base/listen_socket.h',
- 'base/load_flags.h',
'base/mime_sniffer.cc',
- 'base/mime_sniffer.h',
'base/mime_util.cc',
- 'base/mime_util.h',
- 'base/net_error_list.h',
'base/net_errors.cc',
- 'base/net_errors.h',
'base/net_module.cc',
- 'base/net_module.h',
- 'base/net_resources.h',
'base/net_util.cc',
- 'base/net_util.h',
- 'base/net_util_win.cc',
- 'base/platform_mime_util.h',
- 'base/platform_mime_util_win.cc',
- 'build/precompiled_net.cc',
- 'build/precompiled_net.h',
'base/registry_controlled_domain.cc',
- 'base/registry_controlled_domain.h',
- 'base/scoped_cert_chain_context.h',
'base/sdch_filter.cc',
- 'base/sdch_filter.h',
'base/sdch_manager.cc',
- 'base/sdch_manager.h',
- 'base/socket.h',
- 'base/ssl_client_socket.h',
- 'base/ssl_client_socket_win.cc',
- 'base/ssl_client_socket_win.h',
'base/ssl_config_service.cc',
- 'base/ssl_config_service.h',
- 'base/ssl_info.h',
- 'base/ssl_test_util.cc',
- 'base/tcp_client_socket.h',
- 'base/tcp_client_socket_win.cc',
'base/telnet_server.cc',
- 'base/telnet_server.h',
'base/upload_data.cc',
- 'base/upload_data.h',
'base/upload_data_stream.cc',
- 'base/upload_data_stream.h',
- 'base/wininet_util.cc',
- 'base/wininet_util.h',
- 'base/winsock_init.cc',
- 'base/winsock_init.h',
'base/x509_certificate.cc',
- 'base/x509_certificate.h',
- 'base/x509_certificate_win.cc',
- ]),
- MSVSFilter('url_request', [
+ 'disk_cache/backend_impl.cc',
+ 'disk_cache/block_files.cc',
+ 'disk_cache/entry_impl.cc',
+ 'disk_cache/eviction.cc',
+ 'disk_cache/file_lock.cc',
+ 'disk_cache/hash.cc',
+ 'disk_cache/mem_backend_impl.cc',
+ 'disk_cache/mem_entry_impl.cc',
+ 'disk_cache/mem_rankings.cc',
+ 'disk_cache/rankings.cc',
+ 'disk_cache/stats.cc',
+ 'disk_cache/stats_histogram.cc',
+ 'disk_cache/trace.cc',
+ 'ftp/ftp_network_layer.cc',
+ 'ftp/ftp_network_transaction.cc',
+ 'http/cert_status_cache.cc',
+ 'http/http_auth.cc',
+ 'http/http_auth_cache.cc',
+ 'http/http_auth_handler.cc',
+ 'http/http_auth_handler_basic.cc',
+ 'http/http_auth_handler_digest.cc',
+ 'http/http_cache.cc',
+ 'http/http_chunked_decoder.cc',
+ 'http/http_network_layer.cc',
+ 'http/http_network_transaction.cc',
+ 'http/http_response_headers.cc',
+ 'http/http_transaction_winhttp.cc',
+ 'http/http_util.cc',
+ 'http/http_vary_data.cc',
+ 'http/winhttp_request_throttle.cc',
+ 'proxy/proxy_script_fetcher.cc',
+ 'proxy/proxy_service.cc',
'url_request/mime_sniffer_proxy.cc',
- 'url_request/mime_sniffer_proxy.h',
'url_request/url_request.cc',
- 'url_request/url_request.h',
'url_request/url_request_about_job.cc',
- 'url_request/url_request_about_job.h',
- 'url_request/url_request_context.h',
'url_request/url_request_error_job.cc',
- 'url_request/url_request_error_job.h',
'url_request/url_request_file_dir_job.cc',
- 'url_request/url_request_file_dir_job.h',
'url_request/url_request_file_job.cc',
- 'url_request/url_request_file_job.h',
'url_request/url_request_filter.cc',
- 'url_request/url_request_filter.h',
'url_request/url_request_ftp_job.cc',
- 'url_request/url_request_ftp_job.h',
'url_request/url_request_http_job.cc',
- 'url_request/url_request_http_job.h',
- 'url_request/url_request_inet_job.cc',
- 'url_request/url_request_inet_job.h',
'url_request/url_request_job.cc',
- 'url_request/url_request_job.h',
'url_request/url_request_job_manager.cc',
- 'url_request/url_request_job_manager.h',
'url_request/url_request_job_metrics.cc',
- 'url_request/url_request_job_metrics.h',
'url_request/url_request_job_tracker.cc',
- 'url_request/url_request_job_tracker.h',
'url_request/url_request_simple_job.cc',
- 'url_request/url_request_simple_job.h',
- 'url_request/url_request_status.h',
'url_request/url_request_test_job.cc',
- 'url_request/url_request_test_job.h',
'url_request/url_request_view_cache_job.cc',
- 'url_request/url_request_view_cache_job.h',
- ]),
- MSVSFilter('http', [
- 'http/cert_status_cache.cc',
- 'http/cert_status_cache.h',
- 'http/http_atom_list.h',
- 'http/http_cache.cc',
- 'http/http_cache.h',
- 'http/http_chunked_decoder.cc',
- 'http/http_chunked_decoder.h',
- 'http/http_network_layer.cc',
- 'http/http_network_layer.h',
- 'http/http_network_session.h',
- 'http/http_network_transaction.cc',
- 'http/http_network_transaction.h',
- 'http/http_request_info.h',
- 'http/http_response_headers.cc',
- 'http/http_response_headers.h',
- 'http/http_response_info.h',
- 'http/http_transaction.h',
- 'http/http_transaction_factory.h',
- 'http/http_transaction_winhttp.cc',
- 'http/http_transaction_winhttp.h',
- 'http/http_util.cc',
- 'http/http_util.h',
- 'http/http_auth.cc',
- 'http/http_auth.h',
- 'http/http_auth_cache.cc',
- 'http/http_auth_cache.h',
- 'http/http_auth_handler.h',
- 'http/http_auth_handler.cc',
- 'http/http_auth_handler_basic.cc',
- 'http/http_auth_handler_basic.h',
- 'http/http_auth_handler_digest.cc',
- 'http/http_auth_handler_digest.h',
- 'http/http_auth.cc',
- 'http/http_auth.h',
- 'http/http_auth_handler.h',
- 'http/http_auth_handler.cc',
- 'http/http_auth_handler_basic.cc',
- 'http/http_auth_handler_basic.h',
- 'http/http_auth_handler_digest.cc',
- 'http/http_auth_handler_digest.h',
- 'http/http_vary_data.cc',
- 'http/http_vary_data.h',
- 'http/winhttp_request_throttle.cc',
- 'http/winhttp_request_throttle.h',
- ]),
- MSVSFilter('disk_cache', [
- 'disk_cache/addr.h',
- 'disk_cache/backend_impl.cc',
- 'disk_cache/backend_impl.h',
- 'disk_cache/block_files.cc',
- 'disk_cache/block_files.h',
- 'disk_cache/cache_util.h',
- 'disk_cache/cache_util_win.cc',
- 'disk_cache/disk_cache.h',
- 'disk_cache/disk_format.h',
- 'disk_cache/entry_impl.cc',
- 'disk_cache/entry_impl.h',
- 'disk_cache/errors.h',
- 'disk_cache/eviction.cc',
- 'disk_cache/eviction.h',
- 'disk_cache/file.h',
- 'disk_cache/file_block.h',
- 'disk_cache/file_lock.cc',
- 'disk_cache/file_lock.h',
- 'disk_cache/file_win.cc',
- 'disk_cache/hash.cc',
- 'disk_cache/hash.h',
- 'disk_cache/mapped_file.h',
- 'disk_cache/mapped_file_win.cc',
- 'disk_cache/mem_backend_impl.cc',
- 'disk_cache/mem_backend_impl.h',
- 'disk_cache/mem_entry_impl.cc',
- 'disk_cache/mem_entry_impl.h',
- 'disk_cache/mem_rankings.cc',
- 'disk_cache/mem_rankings.h',
- 'disk_cache/rankings.cc',
- 'disk_cache/rankings.h',
- 'disk_cache/stats.cc',
- 'disk_cache/stats.h',
- 'disk_cache/stats_histogram.cc',
- 'disk_cache/stats_histogram.h',
- 'disk_cache/storage_block-inl.h',
- 'disk_cache/storage_block.h',
- 'disk_cache/trace.cc',
- 'disk_cache/trace.h',
- ]),
- MSVSFilter('proxy', [
- 'proxy/proxy_config_service_fixed.h',
- 'proxy/proxy_config_service_win.cc',
- 'proxy/proxy_config_service_win.h',
- 'proxy/proxy_resolver_winhttp.cc',
- 'proxy/proxy_resolver_winhttp.h',
- 'proxy/proxy_script_fetcher.cc',
- 'proxy/proxy_script_fetcher.h',
- 'proxy/proxy_service.cc',
- 'proxy/proxy_service.h',
- ]),
- MSVSFilter('ftp', [
- 'ftp/ftp_network_layer.cc',
- 'ftp/ftp_network_layer.h',
- 'ftp/ftp_network_session.h',
- 'ftp/ftp_network_transaction.cc',
- 'ftp/ftp_network_transaction.h',
- 'ftp/ftp_request_info.h',
- 'ftp/ftp_response_info.h',
- 'ftp/ftp_transaction.h',
- 'ftp/ftp_transaction_factory.h',
- ]),
-])
+]
if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
@@ -274,14 +114,8 @@ if env.Bit('posix'):
for remove in to_be_ported_files:
input_files.remove(remove)
-if not env.Bit('windows'):
- # Remove windows-specific files on non-Windows platforms.
- # TODO(sgk):
- # Remove the windows-specific files from the input_files list above
- # and turn this back in to an add-on-Windows list (like we used to)
- # once we're comfortable re-ordering the files in the generated
- # .vcproj file(s).
- input_files.Remove([
+if env.Bit('windows'):
+ input_files.extend([
'base/file_stream_win.cc',
'base/net_util_win.cc',
'base/platform_mime_util_win.cc',
@@ -299,7 +133,7 @@ if not env.Bit('windows'):
])
if env.Bit('mac'):
- input_files.Extend([
+ input_files.extend([
'base/platform_mime_util_mac.cc',
'base/ssl_client_socket_mac.cc',
'base/x509_certificate_mac.cc',
@@ -307,7 +141,7 @@ if env.Bit('mac'):
])
if env.Bit('linux'):
- input_files.Extend([
+ input_files.extend([
'base/nss_memio.c',
# TODO(tc): gnome-vfs? xdgmime? /etc/mime.types?
'base/platform_mime_util_linux.cc',
@@ -316,7 +150,7 @@ if env.Bit('linux'):
])
if env.Bit('posix'):
- input_files.Extend([
+ input_files.extend([
'base/file_stream_posix.cc',
'base/net_util_posix.cc',
'base/tcp_client_socket_libevent.cc',
@@ -329,108 +163,17 @@ if env.Bit('windows'):
# TODO(bradnelson): This step generates file precompiled_net.pch.ib_tag
# possibly only on incredibuild, scons doesn't know this.
env_p = env.Clone()
- # TODO(sgk): for now, add the same _LIB flag that Hammer adds to
- # the other .obj files
- env_p.Append(CCFLAGS='/Ylnet',
- CPPDEFINES=['_LIB'])
+ env_p.Append(CCFLAGS='/Ylnet')
pch, obj = env_p.PCH('precompiled_net.pch', 'build/precompiled_net.cc')
env['PCH'] = pch
env['PCHSTOP'] = 'precompiled_net.h'
env.Append(CCPCHFLAGS = ['/FIprecompiled_net.h'])
- input_files.Replace('build/precompiled_net.cc', obj)
-
-lib = env.ChromeLibrary('net', input_files)
-
-p = env.ChromeMSVSProject('$NET_DIR/build/net.vcproj',
- guid='{326E9795-E760-410A-B69A-3F79DB3F5243}',
- dependencies = [
- '$NET_DIR/build/tld_cleanup.vcproj'
- ],
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=[lib[0]],
- files=input_files,
- ConfigurationType='4')
-
-p.AddToolFile('build/convert_tld_data.rules')
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- '$(SolutionDir)../third_party/icu38/build/using_icu.vsprops',
- '$(SolutionDir)../third_party/zlib/using_zlib.vsprops',
- '$(SolutionDir)../sdch/using_sdch.vsprops',
- '$(SolutionDir)../tools/grit/build/using_generated_resources.vsprops',
- ],
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'Convert TLD Data File',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- MSVSTool('VCCLCompilerTool',
- PrecompiledHeaderThrough='precompiled_net.h',
- ForcedIncludeFiles='precompiled_net.h',
- UsePrecompiledHeader='2'),
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- 'VCLibrarianTool',
- 'VCALinkTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCPostBuildEventTool',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- '$(SolutionDir)../third_party/icu38/build/using_icu.vsprops',
- '$(SolutionDir)../third_party/zlib/using_zlib.vsprops',
- '$(SolutionDir)../sdch/using_sdch.vsprops',
- '$(SolutionDir)../tools/grit/build/using_generated_resources.vsprops',
- ],
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'Convert TLD Data File',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- 'VCCLCompilerTool',
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- 'VCLibrarianTool',
- 'VCALinkTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCPostBuildEventTool',
- ])
-
-# TODO(sgk): remove when we can derive this information
-p.AddFileConfig('build/precompiled_net.cc',
- 'Debug|Win32',
- tools=[
- MSVSTool('VCCLCompilerTool',
- UsePrecompiledHeader='1'),
- ])
-
-# TODO(sgk): remove when we can derive this information
-p.AddFileConfig('build/precompiled_net.cc',
- 'Release|Win32',
- ExcludedFromBuild='true',
- tools=[
- 'VCCLCompilerTool',
- ])
+ input_files += [obj]
-env.AlwaysBuild(p)
+env.ChromeLibrary('net', input_files)
-i = env.Command('$CHROME_SRC_DIR/net/build/net.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
+env.ChromeMSVSProject('$NET_DIR/build/net.vcproj',
+ dependencies = [
+ '$NET_DIR/build/tld_cleanup.vcproj'
+ ],
+ guid='{326E9795-E760-410A-B69A-3F79DB3F5243}')
diff --git a/net/net_perftests.scons b/net/net_perftests.scons
index 5f0529a..c2b16a2 100644
--- a/net/net_perftests.scons
+++ b/net/net_perftests.scons
@@ -37,85 +37,27 @@ elif env.Bit('linux'):
CCFLAGS = ['-fno-strict-aliasing'],
)
-input_files = ChromeFileList([
- # TODO(sgk): violate standard indentation so we don't have to
- # reindent too much when we remove the explicit MSVSFilter() calls
- # in favor of generating the hierarchy to reflect the file system.
- MSVSFilter('support', [
- '../base/perftimer$OBJSUFFIX',
- '../base/run_all_perftests$OBJSUFFIX',
- ]),
- MSVSFilter('tests', [
+input_files = [
'base/cookie_monster_perftest.cc',
'disk_cache/disk_cache_perftest.cc',
'disk_cache/disk_cache_test_util$OBJSUFFIX',
- ]),
-])
+
+ # TODO(sgk): avoid using .cc from base directly
+ '$OBJ_ROOT/base/run_all_perftests$OBJSUFFIX',
+ '$OBJ_ROOT/base/perftimer$OBJSUFFIX',
+]
if not env.Bit('mac'):
env.ChromeTestProgram('net_perftests', input_files)
env.ChromeMSVSProject('$NET_DIR/build/net_perftests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ ],
guid='{AAC78796-B9A2-4CD9-BF89-09B03E92BF73}')
-
-# TODO########################################################################
-
-p = env.ChromeMSVSProject('$NET_DIR/build/net_perftests.vcproj',
- guid='{AAC78796-B9A2-4CD9-BF89-09B03E92BF73}',
- dependencies = [
- '$BASE_DIR/build/base.vcproj',
- '$NET_DIR/build/net.vcproj',
- '$MODP_B64_DIR/modp_b64.vcproj',
- '$ICU38_DIR/build/icu.vcproj',
- '$TESTING_DIR/gtest.vcproj',
- '$GOOGLEURL_DIR/build/googleurl.vcproj',
- '$SDCH_DIR/sdch.vcproj',
- ],
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=TODO,
- files=input_files,
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- # TODO(sgk): pull this from CPPDEFINES.
- MSVSTool('VCCLCompilerTool',
- PreprocessorDefinitions='PERF_TEST'),
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- 'VCLinkerTool',
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ],
- ConfigurationType='1')
-
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- '$(SolutionDir)../testing/using_gtest.vsprops',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- '$(SolutionDir)../testing/using_gtest.vsprops',
- ])
-
-env.AlwaysBuild(p)
-
-i = env.Command('$CHROME_SRC_DIR/net/build/net_perftests.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
diff --git a/net/net_unittests.scons b/net/net_unittests.scons
index a00078c..9d4fe72 100644
--- a/net/net_unittests.scons
+++ b/net/net_unittests.scons
@@ -34,46 +34,7 @@ if env.Bit('windows'):
],
)
-input_files = ChromeFileList([
- # TODO(sgk): violate standard indentation so we don't have to
- # reindent too much when we remove the explicit MSVSFilter() calls
- # in favor of generating the hierarchy to reflect the file system.
- MSVSFilter('support', [
- 'build/precompiled_net.cc',
- 'build/precompiled_net.h',
- 'base/run_all_unittests.cc',
- ]),
- MSVSFilter('tests', [
- MSVSFilter('disk_cache', [
- 'disk_cache/addr_unittest.cc',
- 'disk_cache/backend_unittest.cc',
- 'disk_cache/block_files_unittest.cc',
- 'disk_cache/disk_cache_test_base.cc',
- 'disk_cache/disk_cache_test_base.h',
- 'disk_cache/disk_cache_test_util.cc',
- 'disk_cache/disk_cache_test_util.h',
- 'disk_cache/entry_unittest.cc',
- 'disk_cache/mapped_file_unittest.cc',
- 'disk_cache/storage_block_unittest.cc',
- ]),
- MSVSFilter('http', [
- 'http/http_auth_cache_unittest.cc',
- 'http/http_auth_handler_basic_unittest.cc',
- 'http/http_auth_handler_digest_unittest.cc',
- 'http/http_auth_unittest.cc',
- 'http/http_cache_unittest.cc',
- 'http/http_chunked_decoder_unittest.cc',
- 'http/http_network_layer_unittest.cc',
- 'http/http_network_transaction_unittest.cc',
- 'http/http_response_headers_unittest.cc',
- 'http/http_transaction_unittest.cc',
- 'http/http_transaction_unittest.h',
- 'http/http_transaction_winhttp_unittest.cc',
- 'http/http_util_unittest.cc',
- 'http/http_vary_data_unittest.cc',
- 'http/winhttp_request_throttle_unittest.cc',
- ]),
- MSVSFilter('base', [
+input_files = [
'base/auth_cache_unittest.cc',
'base/base64_unittest.cc',
'base/bzip2_filter_unittest.cc',
@@ -88,33 +49,44 @@ input_files = ChromeFileList([
'base/gzip_filter_unittest.cc',
'base/host_resolver_unittest.cc',
'base/listen_socket_unittest.cc',
- 'base/listen_socket_unittest.h',
'base/mime_sniffer_unittest.cc',
'base/mime_util_unittest.cc',
'base/net_util_unittest.cc',
'base/registry_controlled_domain_unittest.cc',
- 'base/sdch_filter_unittest.cc',
+ 'base/run_all_unittests.cc',
+ 'base/ssl_test_util.cc',
'base/ssl_client_socket_unittest.cc',
- 'base/ssl_config_service_unittest.cc',
'base/tcp_client_socket_unittest.cc',
'base/telnet_server_unittest.cc',
'base/test_completion_callback_unittest.cc',
- 'base/wininet_util_unittest.cc',
'base/x509_certificate_unittest.cc',
- ]),
- MSVSFilter('url_request', [
- 'url_request/url_request_unittest.cc',
- 'url_request/url_request_unittest.h',
- ]),
- MSVSFilter('proxy', [
+ 'disk_cache/addr_unittest.cc',
+ 'disk_cache/backend_unittest.cc',
+ 'disk_cache/block_files_unittest.cc',
+ 'disk_cache/disk_cache_test_base.cc',
+ 'disk_cache/disk_cache_test_util.cc',
+ 'disk_cache/entry_unittest.cc',
+ 'disk_cache/mapped_file_unittest.cc',
+ 'disk_cache/storage_block_unittest.cc',
+ 'http/http_auth_cache_unittest.cc',
+ 'http/http_auth_handler_basic_unittest.cc',
+ 'http/http_auth_handler_digest_unittest.cc',
+ 'http/http_auth_unittest.cc',
+ 'http/http_cache_unittest.cc',
+ 'http/http_chunked_decoder_unittest.cc',
+ 'http/http_network_layer_unittest.cc',
+ 'http/http_network_transaction_unittest.cc',
+ 'http/http_response_headers_unittest.cc',
+ 'http/http_transaction_unittest.cc',
+ 'http/http_util_unittest.cc',
+ 'http/http_vary_data_unittest.cc',
'proxy/proxy_script_fetcher_unittest.cc',
'proxy/proxy_service_unittest.cc',
- ]),
- ]),
-])
+ 'url_request/url_request_unittest.cc',
+]
-if not env.Bit('windows'):
- input_files.Remove([
+if env.Bit('windows'):
+ input_files.extend([
'base/wininet_util_unittest.cc',
'http/http_transaction_winhttp_unittest.cc',
'http/winhttp_request_throttle_unittest.cc',
@@ -122,122 +94,38 @@ if not env.Bit('windows'):
if env.Bit('linux'):
# TODO(port):
- input_files.Remove([
+ to_be_ported_files = [
'base/sdch_filter_unittest.cc',
'base/ssl_config_service_unittest.cc',
- ])
+ ]
+ input_files = list(set(input_files) - set(to_be_ported_files))
if env.Bit('mac'):
- input_files.Extend([
+ input_files.extend([
'../base/platform_test_mac$OBJSUFFIX',
])
# TODO(port):
- input_files.Remove([
+ to_be_ported_files = [
'base/x509_certificate_unittest.cc',
'base/sdch_filter_unittest.cc',
'base/ssl_config_service_unittest.cc',
'url_request/url_request_unittest.cc',
- ])
-
-net_unittests = env.ChromeTestProgram('net_unittests', input_files)
-
-p = env.ChromeMSVSProject('$NET_DIR/build/net_unittests.vcproj',
- dependencies = [
- '$BASE_DIR/build/base.vcproj',
- '$BZIP2_DIR/bzip2.vcproj',
- '$NET_DIR/build/net.vcproj',
- '$MODP_B64_DIR/modp_b64.vcproj',
- '$ZLIB_DIR/zlib.vcproj',
- '$ICU38_DIR/build/icu.vcproj',
- '$TESTING_DIR/gtest.vcproj',
- '$GOOGLEURL_DIR/build/googleurl.vcproj',
- '$SDCH_DIR/sdch.vcproj',
- ],
- guid='{E99DA267-BE90-4F45-88A1-6919DB2C7567}',
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=net_unittests,
- files=input_files,
- ConfigurationType='1')
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- '$(SolutionDir)../testing/using_gtest.vsprops',
- ],
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- MSVSTool('VCCLCompilerTool',
- PrecompiledHeaderThrough='precompiled_net.h',
- ForcedIncludeFiles='precompiled_net.h',
- PreprocessorDefinitions='UNIT_TEST',
- UsePrecompiledHeader='2'),
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- 'VCLinkerTool',
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- '$(SolutionDir)../testing/using_gtest.vsprops',
- ],
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- MSVSTool('VCCLCompilerTool',
- PreprocessorDefinitions='UNIT_TEST'),
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- 'VCLinkerTool',
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ])
-
-# TODO: Remove when we can derive this information
-p.AddFileConfig('build/precompiled_net.cc',
- 'Debug|Win32',
- tools=[
- MSVSTool('VCCLCompilerTool',
- UsePrecompiledHeader='1'),
- ])
-
-# TODO: Remove when we can derive this information
-p.AddFileConfig('build/precompiled_net.cc',
- 'Release|Win32',
- ExcludedFromBuild='true',
- tools=[
- 'VCCLCompilerTool',
- ])
-
-env.AlwaysBuild(p)
-
-i = env.Command('$CHROME_SRC_DIR/net/build/net_unittests.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
+ ]
+ input_files = list(set(input_files) - set(to_be_ported_files))
+
+env.ChromeTestProgram('net_unittests', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/net_unittests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ ],
+ guid='{E99DA267-BE90-4F45-88A1-6919DB2C7567}')
diff --git a/net/stress_cache.scons b/net/stress_cache.scons
index 9f926e4..008683d 100644
--- a/net/stress_cache.scons
+++ b/net/stress_cache.scons
@@ -36,64 +36,19 @@ if env.Bit('windows'):
],
)
-input_files = ChromeFileList([
+input_files = [
'disk_cache/disk_cache_test_util$OBJSUFFIX',
'disk_cache/stress_cache.cc',
-])
+]
if not env.Bit('mac'):
env.ChromeTestProgram('stress_cache', input_files)
-p = env.ChromeMSVSProject('$NET_DIR/build/stress_cache.vcproj',
- guid='{B491C3A1-DE5F-4843-A1BB-AB8C4337187B}',
- dependencies = [
- '$BASE_DIR/build/base.vcproj',
- '$NET_DIR/build/net.vcproj',
- '$ICU38_DIR/build/icu.vcproj',
- '$TESTING_DIR/gtest.vcproj',
- ],
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=TODO,
- files=input_files,
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- 'VCCLCompilerTool',
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- MSVSTool('VCLinkerTool',
- SubSystem='1'),
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ],
- ConfigurationType='1')
-
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- ])
-
-env.AlwaysBuild(p)
-
-i = env.Command('$CHROME_SRC_DIR/net/build/stress_cache.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
+env.ChromeMSVSProject('$NET_DIR/build/stress_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{B491C3A1-DE5F-4843-A1BB-AB8C4337187B}')
diff --git a/net/tools/tld_cleanup/tld_cleanup.scons b/net/tools/tld_cleanup/tld_cleanup.scons
index 5f366c4..cd937ca 100644
--- a/net/tools/tld_cleanup/tld_cleanup.scons
+++ b/net/tools/tld_cleanup/tld_cleanup.scons
@@ -23,61 +23,16 @@ if env.Bit('windows'):
],
)
-input_files = ChromeFileList([
+input_files = [
'tld_cleanup.cc',
-])
+]
env.ChromeProgram('tld_cleanup', input_files)
-p = env.ChromeMSVSProject('$NET_DIR/build/tld_cleanup.vcproj',
- guid='{E13045CD-7E1F-4A41-9B18-8D288B2E7B41}',
- dependencies = [
- '$BASE_DIR/build/base.vcproj',
- '$ICU38_DIR/build/icu.vcproj',
- '$GOOGLEURL_DIR/build/googleurl.vcproj',
- ],
- # TODO: restore when we can derive all info,
- # on all platforms, from the windows build targets.
- #buildtargets=TODO,
- files=input_files,
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- 'VCCLCompilerTool',
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- MSVSTool('VCLinkerTool',
- SubSystem='1'),
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ],
- ConfigurationType='1')
-
-
-p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/debug.vsprops',
- ])
-
-p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/common.vsprops',
- '$(SolutionDir)../build/release.vsprops',
- ])
-
-env.AlwaysBuild(p)
-
-i = env.Command('$CHROME_SRC_DIR/net/build/tld_cleanup.vcproj', p,
- Copy('$TARGET', '$SOURCE'))
-Alias('msvs', i)
+env.ChromeMSVSProject('$NET_DIR/build/tld_cleanup.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ ],
+ guid='{E13045CD-7E1F-4A41-9B18-8D288B2E7B41}')
diff --git a/site_scons/site_tools/_Node_MSVS.py b/site_scons/site_tools/_Node_MSVS.py
index b421de2..d394d28 100644
--- a/site_scons/site_tools/_Node_MSVS.py
+++ b/site_scons/site_tools/_Node_MSVS.py
@@ -39,8 +39,6 @@ import xml.dom.minidom
import SCons.Node.FS
import SCons.Script
-from SCons.Debug import Trace
-TODO = 0
# Initialize random number generator
random.seed()
@@ -266,7 +264,7 @@ def MSVSFolder(env, item, *args, **kw):
class MSVSConfig(object):
"""Visual Studio configuration."""
- def __init__(self, Name, config_type, tools=None, **attrs):
+ def __init__(self, Name, config_type, tools=[], **attrs):
"""Initializes the configuration.
Args:
@@ -280,12 +278,21 @@ class MSVSConfig(object):
ips = ';'.join(ips)
attrs['InheritedPropertySheets'] = ips.replace('/', '\\')
+ tools = tools or []
+ if not SCons.Util.is_List(tools):
+ tools = [tools]
+ tool_objects = []
+ for t in tools:
+ if not isinstance(t, MSVSTool):
+ t = MSVSTool(t)
+ tool_objects.append(t)
+
self.Name = Name
self.config_type = config_type
- self.tools = tools
+ self.tools = tool_objects
self.attrs = attrs
- def CreateElement(self, doc, project):
+ def CreateElement(self, doc):
"""Creates an element for the configuration.
Args:
@@ -298,20 +305,8 @@ class MSVSConfig(object):
node.setAttribute('Name', self.Name)
for k, v in self.attrs.items():
node.setAttribute(k, v)
-
- tools = self.tools
- if tools is None:
- tools = project.tools or []
- if not SCons.Util.is_List(tools):
- tools = [tools]
- tool_objects = []
- for t in tools:
- if not isinstance(t, MSVSTool):
- t = MSVSTool(t)
- tool_objects.append(t)
- for t in tool_objects:
+ for t in self.tools:
node.appendChild(t.CreateElement(doc))
-
return node
@@ -403,17 +398,6 @@ class MSVSTool(object):
node.setAttribute(k, v)
return node
- def _format(self):
- """Formats a tool specification for debug printing"""
- xml_impl = xml.dom.getDOMImplementation()
- doc = xml_impl.createDocument(None, 'VisualStudioProject', None)
- return self.CreateElement(doc).toprettyxml()
-
- def diff(self, other):
- for key, value in self.attrs.items():
- if other.attrs[key] == value:
- del self.attrs[key]
-
class MSVSToolFile(object):
"""Visual Studio tool file specification."""
@@ -445,7 +429,6 @@ class _MSVSProject(SCons.Node.FS.File):
"""Visual Studio project."""
entry_type_guid = '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}'
- initialized = False
def initialize(self, env, path, name = None,
dependencies = None,
@@ -455,8 +438,7 @@ class _MSVSProject(SCons.Node.FS.File):
root_namespace = None,
relative_path_prefix = '',
tools = None,
- configurations = None,
- **attrs):
+ configurations = None):
"""Initializes the project.
Args:
@@ -482,51 +464,32 @@ class _MSVSProject(SCons.Node.FS.File):
configurations: A list of MSVSConfig objects representing
configurations built by this project.
"""
+ self.msvs_path = path
+ self.msvs_node = env.File(path)
if name is None:
if buildtargets:
name = os.path.splitext(buildtargets[0].name)[0]
else:
name = os.path.splitext(os.path.basename(path))[0]
- if not root_namespace:
- root_namespace or name
-
- if self.initialized:
- # TODO(sgk): fill in
- if self.msvs_name != name:
- pass
- if self.root_namespace != root_namespace:
- pass
- if self.relative_path_prefix != relative_path_prefix:
- pass
- if self.guid != guid:
- pass
- #if self.env != env:
- # pass
- else:
- self.buildtargets = []
- self.configurations = []
- self.dependencies = []
- self.file_configurations = {}
- self.files = MSVSFiles([])
- self.tool_files = []
- self.file_lists = []
- self.initialized = True
-
- self.attrs = attrs
- self.env = env
- self.guid = guid
self.msvs_name = name
- self.msvs_path = path
- self.relative_path_prefix = relative_path_prefix
self.root_namespace = root_namespace or self.msvs_name
+ self.buildtargets = buildtargets
+ self.relative_path_prefix = relative_path_prefix
self.tools = tools
- self.buildtargets.extend(buildtargets)
- self.configurations.extend(configurations or [])
- self.dependencies.extend(list(dependencies or []))
- self.AddFiles(files)
+ self.env = env
+ self.guid = guid
+
+ self.dependencies = list(dependencies or [])
+ self.configurations = list(configurations or [])
+ self.file_configurations = {}
+ self.tool_files = []
- env.Command(self, [], MSVSProjectAction)
+ if not isinstance(files, MSVSFiles):
+ files = MSVSFiles(self.args2nodes(files))
+ self.files = files
+
+ env.Command(self, [], MSVSSolutionAction)
def args2nodes(self, entries):
result = []
@@ -542,7 +505,7 @@ class _MSVSProject(SCons.Node.FS.File):
elif hasattr(entry, 'sources') and entry.sources:
result.extend(entry.sources)
else:
- result.append(entry.srcnode())
+ result.append(entry)
return result
def FindFile(self, node):
@@ -560,11 +523,9 @@ class _MSVSProject(SCons.Node.FS.File):
file_list.extend(f.entries)
else:
flat_file_dict[f] = True
- flat_file_dict[f.srcnode()] = True
if hasattr(f, 'sources'):
for s in f.sources:
flat_file_dict[s] = True
- flat_file_dict[s.srcnode()] = True
self.flat_file_dict = flat_file_dict
return flat_file_dict.get(node)
@@ -594,7 +555,7 @@ class _MSVSProject(SCons.Node.FS.File):
return sln.rel_path(self).replace('/', '\\')
def get_rel_path(self, node):
- result = self.relative_path_prefix + self.rel_path(node)
+ result = self.relative_path_prefix + self.msvs_node.rel_path(node)
return result.replace('/', '\\')
def AddConfig(self, Name, tools=None, **attrs):
@@ -609,16 +570,6 @@ class _MSVSProject(SCons.Node.FS.File):
# No tool list specifically for this configuration,
# use the Project's as a default.
tools = self.tools
- if not attrs.has_key('ConfigurationType'):
- # No ConfigurationType specifically for this configuration,
- # use the Project's as a default.
- try:
- attrs['ConfigurationType'] = self.attrs['ConfigurationType']
- except KeyError:
- pass
- if attrs.has_key('InheritedPropertySheets'):
- ips = attrs['InheritedPropertySheets']
- attrs['InheritedPropertySheets'] = self.env.subst(ips)
c = MSVSConfig(Name, 'Configuration', tools=tools, **attrs)
self.configurations.append(c)
@@ -632,35 +583,9 @@ class _MSVSProject(SCons.Node.FS.File):
later add files to a Filter object which was passed into a previous call
to AddFiles(), it will not be reflected in this project.
"""
- self.file_lists.append(self.args2nodes(files))
-
- def _FilesToSourceFiles(self, files):
- file_list = files[:]
- result = []
- while file_list:
- entry = file_list.pop(0)
- if not isinstance(entry, (list, UserList.UserList)):
- entry = [entry]
- for f in entry:
- if hasattr(f, 'entries'):
- self._FilesToSourceFiles(f.entries)
- result.append(f)
- else:
- if f.sources:
- flist = f.sources
- else:
- flist = [f]
- for x in flist:
- result.append(x.srcnode())
- files[:] = result
-
- def _MergeFiles(self, dest_list, src_list):
- for f in src_list:
- if f not in dest_list:
- dest_list.append(f)
- continue
- #if hasattr(f, 'entries'):
- # self._FilesToSourceFiles(f.entries)
+ # TODO(rspangler) This also doesn't handle adding files to an existing
+ # filter. That is, it doesn't merge the trees.
+ self.files.extend(self.args2nodes(files))
def AddFileConfig(self, path, Name, tools=None, **attrs):
"""Adds a configuration to a file.
@@ -674,8 +599,9 @@ class _MSVSProject(SCons.Node.FS.File):
Raises:
ValueError: Relative path does not match any file added via AddFiles().
"""
- # Store as the VariantDir node, not as the source node.
node = self.env.File(path)
+ if not self.FindFile(node):
+ raise ValueError('AddFileConfig: file "%s" not in project' % path)
c = MSVSConfig(Name, 'FileConfiguration', tools=tools, **attrs)
config_list = self.file_configurations.get(node)
if config_list is None:
@@ -729,7 +655,7 @@ class _MSVSProject(SCons.Node.FS.File):
configs = self.doc.createElement('Configurations')
root.appendChild(configs)
for c in self.configurations:
- configs.appendChild(c.CreateElement(self.doc, self))
+ configs.appendChild(c.CreateElement(self.doc))
# Add empty References section
root.appendChild(self.doc.createElement('References'))
@@ -755,194 +681,10 @@ class _MSVSProject(SCons.Node.FS.File):
node = self.doc.createElement('File')
node.setAttribute('RelativePath', self.get_rel_path(file))
for c in self.file_configurations.get(file, []):
- node.appendChild(c.CreateElement(self.doc, self))
+ node.appendChild(c.CreateElement(self.doc))
return node
- def VCCLCompilerTool(self, args):
- default_attrs = {
- 'BufferSecurityCheck' : "false",
- 'CompileAs' : 0, # default
- 'DebugInformationFormat' : 0, # TODO(???)
- 'DisableSpecificWarnings' : [],
- 'EnableFiberSafeOptimizations' : "false",
- 'EnableFunctionLevelLinking' : "false",
- 'EnableIntrinsicFunctions' : "false",
- 'FavorSizeOrSpeed' : 0, # favorNone
- 'InlineFunctionExpansion' : 1, # expandDisable
- 'MinimalRebuild' : "false",
- 'OmitFramePointers' : "false",
- 'Optimization' : 1, # optimizeDisabled TODO(???)
- 'PreprocessorDefinitions' : [],
- 'RuntimeLibrary' : TODO,
- 'RuntimeTypeInfo' : "false",
- 'StringPooling' : "false",
- 'SuppressStartupBanner' : "false",
- 'WarningAsError' : "false",
- 'WarningLevel' : 1, # warningLevel_1
- 'WholeProgramOptimization' : "false",
- }
-
- tool = MSVSTool('VCCLCompilerTool', **default_attrs)
- attrs = tool.attrs
-
- for arg in args:
- if arg in ('/c',):
- continue
- if arg.startswith('/Fo'):
- continue
- if arg.startswith('/D'):
- attrs['PreprocessorDefinitions'].append(arg[2:])
- elif arg == '/EH':
- attrs['ExceptionHandling'] = 0
- elif arg == '/GF':
- attrs['StringPooling'] = "true"
- elif arg == '/GL':
- attrs['WholeProgramOptimization'] = "true"
- elif arg == '/GM':
- attrs['MinimalRebuild'] = "true"
- elif arg == '/GR-':
- attrs['RuntimeTypeInfo'] = "true"
- elif arg == '/Gs':
- attrs['BufferSecurityCheck'] = "true"
- elif arg == '/Gs-':
- attrs['BufferSecurityCheck'] = "false"
- elif arg == '/GT':
- attrs['EnableFiberSafeOptimizations'] = "true"
- elif arg == '/Gy':
- attrs['EnableFunctionLevelLinking'] = "true"
- elif arg == '/MD':
- attrs['RuntimeLibrary'] = 1 # rtMultiThreadedDebug
- elif arg == '/MDd':
- attrs['RuntimeLibrary'] = 2 # rtMultiThreadedDebugDLL
- elif arg == '/MT':
- attrs['RuntimeLibrary'] = 0 # rtMultiThreaded
- elif arg == '/MTd':
- attrs['RuntimeLibrary'] = 3 # rtMultiThreadedDLL
- elif arg == '/nologo':
- attrs['SuppressStartupBanner'] = "true"
- elif arg == '/O1':
- attrs['InlineFunctionExpansion'] = 4 # optimizeMinSpace
- elif arg == '/O2':
- attrs['InlineFunctionExpansion'] = 3 # optimizeMaxSpeed
- elif arg == '/Ob1':
- attrs['InlineFunctionExpansion'] = 2 # expandOnlyInline
- elif arg == '/Ob2':
- attrs['InlineFunctionExpansion'] = 0 # expandAnySuitable
- elif arg == '/Od':
- attrs['Optimization'] = 0
- elif arg == '/Oi':
- attrs['EnableIntrinsicFunctions'] = "true"
- elif arg == '/Os':
- attrs['FavorSizeOrSpeed'] = 1 # favorSize
- elif arg == '/Ot':
- attrs['FavorSizeOrSpeed'] = 2 # favorSpeed
- elif arg == '/Ox':
- attrs['Optimization'] = 2 # optimizeFull
- elif arg == '/Oy':
- attrs['OmitFramePointers'] = "true"
- elif arg == '/Oy-':
- attrs['TODO'] = "true"
- elif arg in ('/Tc', '/TC'):
- attrs['CompileAs'] = 1 # compileAsC
- elif arg in ('/Tp', '/TP'):
- attrs['CompileAs'] = 2 # compileAsCPlusPlus
- elif arg == '/WX':
- attrs['WarnAsError'] = "true"
- elif arg.startswith('/W'):
- attrs['WarningLevel'] = int(arg[2:]) # 0 through 4
- elif arg.startswith('/wd'):
- attrs['DisableSpecificWarnings'].append(str(arg[3:]))
- elif arg == '/Z7':
- attrs['DebugInformationFormat'] = 3 # debugOldSytleInfo TODO(???)
- elif arg == '/Zd':
- attrs['DebugInformationFormat'] = 0 # debugDisabled
- elif arg == '/Zi':
- attrs['DebugInformationFormat'] = 2 # debugEnabled TODO(???)
- elif arg == '/ZI':
- attrs['DebugInformationFormat'] = 1 # debugEditAndContinue TODO(???)
-
- cppdefines = attrs['PreprocessorDefinitions']
- if cppdefines:
- attrs['PreprocessorDefinitions'] = ';'.join(cppdefines)
- warnings = attrs['DisableSpecificWarnings']
- if warnings:
- warnings = SCons.Util.uniquer(warnings)
- attrs['DisableSpecificWarnings'] = ';'.join(warnings)
-
- return tool
-
- def VCLibrarianTool(self, args):
- default_attrs = {
- 'LinkTimeCodeGeneration' : "false",
- 'SuppressStartupBanner' : "false",
- }
-
- tool = MSVSTool('VCLibrarianTool', **default_attrs)
- attrs = tool.attrs
-
- for arg in args:
- if arg.startswith('/OUT'):
- continue
- if arg == '/ltcg':
- attrs['LinkTimeCodeGeneration'] = "true"
- elif arg == '/nologo':
- attrs['SuppressStartupBanner'] = "true"
-
- return tool
-
- def VCLinkerTool(self, args):
- default_attrs = {
- 'LinkIncremental' : "false",
- 'LinkTimeCodeGeneration' : "false",
- 'EnableCOMDATFolding' : TODO,
- 'OptimizeForWindows98' : TODO,
- 'OptimizeReferences' : TODO,
- 'Profile' : "false",
- 'SuppressStartupBanner' : "false",
- }
-
- tool = MSVSTool('VCLinkerTool', **default_attrs)
- attrs = tool.attrs
-
- for arg in args:
- if arg == '':
- continue
- if arg == '/INCREMENTAL':
- attrs['LinkIncremental'] = "true"
- elif arg == '/INCREMENTAL:NO':
- attrs['LinkIncremental'] = "false"
- elif arg == '/LTCG':
- attrs['LinkTimeCodeGeneration'] = "true"
- elif arg == '/nologo':
- attrs['SuppressStartupBanner'] = "true"
- elif arg == '/OPT:NOICF':
- attrs['EnableCOMDATFolding'] = 2 #
- elif arg == '/OPT:NOWIN98':
- attrs['OptimizeForWindows98'] = 1 #
- elif arg == '/OPT:REF':
- attrs['OptimizeReferences'] = 2 #
- elif arg == '/PROFILE':
- attrs['Profile'] = "true"
-
- return tool
-
- command_to_tool_map = {
- 'cl' : 'VCCLCompilerTool',
- 'cl.exe' : 'VCCLCompilerTool',
- 'lib' : 'VCLibrarianTool',
- 'lib.exe' : 'VCLibrarianTool',
- 'link' : 'VCLinkerTool',
- 'link.exe' : 'VCLinkerTool',
- }
-
- def cl_to_tool(self, args):
- command = os.path.basename(args[0])
- method_name = self.command_to_tool_map.get(command)
- if not method_name:
- return None
- return getattr(self, method_name)(args[1:])
-
- def _AddFileConfigurationDifferences(self, target, source, base_env, file_env, name):
+ def _AddFileConfigurationDifferences(self, target, source, base_env, file_env):
"""Adds a per-file configuration.
Args:
@@ -954,18 +696,7 @@ class _MSVSProject(SCons.Node.FS.File):
file_env: The construction environment for the target, containing
the per-target settings.
"""
- executor = target.get_executor()
- base_cl = map(str, base_env.subst_list(executor)[0])
- file_cl = map(str, file_env.subst_list(executor)[0])
- if base_cl == file_cl:
- return
-
- base_tool = self.cl_to_tool(base_cl)
- file_tool = self.cl_to_tool(file_cl)
-
- file_tool.diff(base_tool)
-
- self.AddFileConfig(source, name, tools=[file_tool])
+ pass
def _AddFileConfigurations(self, env):
"""Adds per-file configurations for the buildtarget's sources.
@@ -976,53 +707,25 @@ class _MSVSProject(SCons.Node.FS.File):
if not self.buildtargets:
return
- for bt in self.buildtargets:
- executor = bt.get_executor()
- build_env = bt.get_build_env()
- bt_cl = map(str, build_env.subst_list(executor)[0])
- tool = self.cl_to_tool(bt_cl)
- default_tool = self.cl_to_tool([bt_cl[0]])
- if default_tool:
- tool.diff(default_tool)
- else:
- print "no tool for %r" % bt_cl[0]
- for t in bt.sources:
+ bt = self.buildtargets[0]
+ additional_files = []
+ for t in bt.sources:
e = t.get_build_env()
- additional_files = SCons.Util.UniqueList()
for s in t.sources:
- s = env.arg2nodes([s])[0].srcnode()
+ s = env.arg2nodes([s])[0]
if not self.FindFile(s):
additional_files.append(s)
- if not build_env is e:
- # TODO(sgk): This test may be bogus, but it works for now.
- # We're trying to figure out if the file configuration
- # differences need to be added one per build target, or one
- # per configuration for the entire project. The assumption
- # is that if the number of buildtargets configured matches
- # the number of project configurations, that we use those
- # in preference to the project configurations.
- if len(self.buildtargets) == len(self.configurations):
- self._AddFileConfigurationDifferences(t, s, build_env, e, e.subst('$MSVSCONFIGURATIONNAME'))
- else:
- for config in self.configurations:
- self._AddFileConfigurationDifferences(t, s, build_env, e, config.Name)
- self._MergeFiles(self.files, additional_files)
+ if not env is e:
+ self._AddFileConfigurationDifferences(t, s, env, e)
+ self.AddFiles(additional_files)
def Write(self, env):
"""Writes the project file."""
- for flist in self.file_lists:
- self._FilesToSourceFiles(flist)
- self._MergeFiles(self.files, flist)
- for k, v in self.file_configurations.items():
- self.file_configurations[str(k)] = v
- k = self.env.File(k).srcnode()
- self.file_configurations[k] = v
- self.file_configurations[str(k)] = v
self._AddFileConfigurations(env)
self.Create()
- f = open(str(self), 'wt')
+ f = open(str(self.msvs_node), 'wt')
f.write(self.formatMSVSProjectXML(self.doc))
f.close()
@@ -1086,11 +789,6 @@ class _MSVSProject(SCons.Node.FS.File):
'Tool' : [
'Name',
'DisableSpecificWarnings',
-
- 'PreprocessorDefinitions',
- 'UsePrecompiledHeader',
- 'PrecompiledHeaderThrough',
- 'ForcedIncludeFiles',
],
'VisualStudioProject' : [
'ProjectType',
@@ -1364,7 +1062,6 @@ def MSVSSolution(env, item, *args, **kw):
import __builtin__
-__builtin__.MSVSConfig = MSVSConfig
__builtin__.MSVSFilter = MSVSFilter
__builtin__.MSVSProject = MSVSProject
__builtin__.MSVSSolution = MSVSSolution
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py
index 7ee8928..6088203 100644
--- a/site_scons/site_tools/chromium_builders.py
+++ b/site_scons/site_tools/chromium_builders.py
@@ -53,12 +53,10 @@ __builtin__.ChromeFileList = ChromeFileList
def compilable_files(sources):
if not hasattr(sources, 'entries'):
- return [x for x in sources if not str(x).endswith('.h')
- and not str(x).endswith('.dat')]
+ return [x for x in sources if not str(x).endswith('.h')]
result = []
for top, folders, nonfolders in MSVS.FileListWalk(sources):
- result.extend([x for x in nonfolders if not str(x).endswith('.h')
- and not str(x).endswith('.dat')])
+ result.extend([x for x in nonfolders if not str(x).endswith('.h')])
return result
def ChromeProgram(env, target, source, *args, **kw):