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

Unified Diff: site_scons/site_tools/target_platform_windows.py

Issue 8117: Pulling in latest software construction toolkit. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « site_scons/site_tools/target_platform_mac.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site_scons/site_tools/target_platform_windows.py
===================================================================
--- site_scons/site_tools/target_platform_windows.py (revision 3849)
+++ site_scons/site_tools/target_platform_windows.py (working copy)
@@ -103,7 +103,7 @@
"""
cmdline = env.subst(
- 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;%d'
+ 'mt.exe -nologo -manifest "$MANIFEST_FILE" -outputresource:"$TARGET";%d'
% resource_num,
target=target, source=source)
print cmdline
@@ -179,7 +179,11 @@
# NOTE: SCons requires the use of this name, which fails gpylint.
"""SCons entry point for this tool."""
- # Set up environment paths first
+ # Bring in the outside PATH, INCLUDE, and LIB if not blocked.
+ if not env.get('MSVC_BLOCK_ENVIRONMENT_CHANGES'):
+ env.AppendENVPath('PATH', os.environ.get('PATH', '[]'))
+ env.AppendENVPath('INCLUDE', os.environ.get('INCLUDE', '[]'))
+ env.AppendENVPath('LIB', os.environ.get('LIB', '[]'))
# Load various Visual Studio related tools.
env.Tool('as')
@@ -192,6 +196,14 @@
env.Tool('mslib')
env.Tool('mslink')
+ # Find VC80_DIR if it isn't already set.
+ if not env.get('VC80_DIR'):
+ # Look in each directory in the path for cl.exe.
+ for p in env['ENV']['PATH'].split(os.pathsep):
+ # Use the directory two layers up if it exists.
+ if os.path.exists(os.path.join(p, 'cl.exe')):
+ env['VC80_DIR'] = os.path.dirname(os.path.dirname(p))
+
# The msvc, mslink, and mslib tools search the registry for installed copies
# of Visual Studio and prepends them to the PATH, INCLUDE, and LIB
# environment variables. Block these changes if necessary.
@@ -210,6 +222,8 @@
# A better rebuild command (actually cleans, then rebuild)
MSVSREBUILDCOM=''.join(['$MSVSSCONSCOM -c "$MSVSBUILDTARGET" && ',
'$MSVSSCONSCOM "$MSVSBUILDTARGET"']),
+
+ CCFLAG_INCLUDE='/FI', # Command line option to include a header
)
env.Append(
@@ -244,6 +258,7 @@
)
# Add manifests to EXEs and DLLs
+ env['MANIFEST_FILE'] = '${TARGET}.manifest' # To allow override.
wait_action = SCons.Script.Action(WaitForWritable,
lambda target, source, env: ''),
env['LINKCOM'] = [
« no previous file with comments | « site_scons/site_tools/target_platform_mac.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698