| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 This module helps emulate Visual Studio 2008 behavior on top of other | 6 This module helps emulate Visual Studio 2008 behavior on top of other |
| 7 build systems, primarily ninja. | 7 build systems, primarily ninja. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import os | 10 import os |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 ld('RandomizedBaseAddress', | 395 ld('RandomizedBaseAddress', |
| 396 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE') | 396 map={'1': ':NO', '2': ''}, prefix='/DYNAMICBASE') |
| 397 ld('DataExecutionPrevention', | 397 ld('DataExecutionPrevention', |
| 398 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT') | 398 map={'1': ':NO', '2': ''}, prefix='/NXCOMPAT') |
| 399 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:') | 399 ld('OptimizeReferences', map={'1': 'NOREF', '2': 'REF'}, prefix='/OPT:') |
| 400 ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:') | 400 ld('EnableCOMDATFolding', map={'1': 'NOICF', '2': 'ICF'}, prefix='/OPT:') |
| 401 ld('LinkTimeCodeGeneration', map={'1': '/LTCG'}) | 401 ld('LinkTimeCodeGeneration', map={'1': '/LTCG'}) |
| 402 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:') | 402 ld('IgnoreDefaultLibraryNames', prefix='/NODEFAULTLIB:') |
| 403 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'}) | 403 ld('ResourceOnlyDLL', map={'true': '/NOENTRY'}) |
| 404 ld('EntryPointSymbol', prefix='/ENTRY:') | 404 ld('EntryPointSymbol', prefix='/ENTRY:') |
| 405 ld('ProgramDatabaseFile', prefix='/PDB:') |
| 405 ld('Profile', map={ 'true': '/PROFILE'}) | 406 ld('Profile', map={ 'true': '/PROFILE'}) |
| 406 # TODO(scottmg): This should sort of be somewhere else (not really a flag). | 407 # TODO(scottmg): This should sort of be somewhere else (not really a flag). |
| 407 ld('AdditionalDependencies', prefix='') | 408 ld('AdditionalDependencies', prefix='') |
| 408 # TODO(scottmg): These too. | 409 # TODO(scottmg): These too. |
| 409 ldflags.extend(('kernel32.lib', 'user32.lib', 'gdi32.lib', 'winspool.lib', | 410 ldflags.extend(('kernel32.lib', 'user32.lib', 'gdi32.lib', 'winspool.lib', |
| 410 'comdlg32.lib', 'advapi32.lib', 'shell32.lib', 'ole32.lib', | 411 'comdlg32.lib', 'advapi32.lib', 'shell32.lib', 'ole32.lib', |
| 411 'oleaut32.lib', 'uuid.lib', 'odbc32.lib', 'DelayImp.lib')) | 412 'oleaut32.lib', 'uuid.lib', 'odbc32.lib', 'DelayImp.lib')) |
| 412 | 413 |
| 413 # If the base address is not specifically controlled, DYNAMICBASE should | 414 # If the base address is not specifically controlled, DYNAMICBASE should |
| 414 # be on by default. | 415 # be on by default. |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 so they're not surprised when the VS build fails.""" | 701 so they're not surprised when the VS build fails.""" |
| 701 if int(generator_flags.get('msvs_error_on_missing_sources', 0)): | 702 if int(generator_flags.get('msvs_error_on_missing_sources', 0)): |
| 702 no_specials = filter(lambda x: '$' not in x, sources) | 703 no_specials = filter(lambda x: '$' not in x, sources) |
| 703 relative = [os.path.join(build_dir, gyp_to_ninja(s)) for s in no_specials] | 704 relative = [os.path.join(build_dir, gyp_to_ninja(s)) for s in no_specials] |
| 704 missing = filter(lambda x: not os.path.exists(x), relative) | 705 missing = filter(lambda x: not os.path.exists(x), relative) |
| 705 if missing: | 706 if missing: |
| 706 # They'll look like out\Release\..\..\stuff\things.cc, so normalize the | 707 # They'll look like out\Release\..\..\stuff\things.cc, so normalize the |
| 707 # path for a slightly less crazy looking output. | 708 # path for a slightly less crazy looking output. |
| 708 cleaned_up = [os.path.normpath(x) for x in missing] | 709 cleaned_up = [os.path.normpath(x) for x in missing] |
| 709 raise Exception('Missing input files:\n%s' % '\n'.join(cleaned_up)) | 710 raise Exception('Missing input files:\n%s' % '\n'.join(cleaned_up)) |
| OLD | NEW |