summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/msvccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* Define NDEBUG for releae builds, just like Python.Jeremy Hylton2002-06-181-1/+2
| | | | XXX Why doesn't distutils on Windows use the same set of flags as Python?
* Refactor compile() method implementations.Jeremy Hylton2002-06-131-86/+69
| | | | | | | | Always use _setup_compile() to do the grunt work of processing arguments, figuring out which files to compile, and emitting debug messages for files that are up-to-date. Use _get_cc_args() when possible.
* Make setup.py less chatty by default.Jeremy Hylton2002-06-041-3/+4
| | | | | | | | | | | | | | | This is a conservative version of SF patch 504889. It uses the log module instead of calling print in various places, and it ignores the verbose argument passed to many functions and set as an attribute on some objects. Instead, it uses the verbosity set on the logger via the command line. The log module is now preferred over announce() and warn() methods that exist only for backwards compatibility. XXX This checkin changes a lot of modules that have no test suite and aren't exercised by the Python build process. It will need substantial testing.
* Pass the full pathname to MSVC when compiling a debug version. ThisThomas Heller2002-04-251-0/+6
| | | | | allows the debugger to find the source without asking the user to browse for it.
* Make it 1.5.2 compatible again.Thomas Heller2002-02-081-4/+5
|
* Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate.Martin v. Löwis2002-01-291-0/+4
|
* Whitespace normalization.Fred Drake2001-12-061-9/+9
|
* Big patch from Rene Liebscher to simplify the CCompiler API andGreg Ward2000-09-271-102/+33
| | | | | | | | | | | | | | | | | | | | implementations. Details: * replace 'link_shared_object()', 'link_shared_lib()', and 'link_executable()' with 'link()', which is (roughly) the union of the three methods it replaces * in all implementation classes (UnixCCompiler, MSVCCompiler, etc.), ditch the old 'link_*()' methods and replace them with 'link()' * in the abstract base class (CCompiler), add the old 'link_*()' methods as wrappers around the new 'link()' (they also print a warning of the deprecated interface) Also increases consistency between MSVCCompiler and BCPPCompiler, hopefully to make it easier to factor out the mythical WindowsCCompiler class. Details: * use 'self.linker' instead of 'self.link' * add ability to compile resource files to BCPPCompiler * added (redundant?) 'object_filename()' method to BCPPCompiler * only generate a .def file if 'export_symbols' defined
* *Very* belated application of Thomas Heller's patch to handleGreg Ward2000-09-191-3/+86
| | | | | | | resource files. The gist of the patch is to treat ".rc" and ".mc" files as source files; ".mc" files are compiled to ".rc" and then ".res", and ".rc" files are compiled to ".res". Wish I knew what all these things stood for...
* Add /GX to 'compile_options'. This is definitely needed for C++ source;Greg Ward2000-08-311-2/+3
| | | | | | | | according to the MS docs it enables exception-handling, and (according to Alex Martelli <aleaxit@yahoo.com>) is needed to compile without getting warnings from standard C++ library headers. Apparently it doesn't cause any problems with C code, so I haven't bothered conditionalizing the use of /GX.
* Add ".cxx" to the list of known C++ extensions.Greg Ward2000-08-301-1/+1
|
* Added 'debug' flag to 'find_library_file()', and changed code to handle it.Greg Ward2000-08-041-6/+11
|
* Ditched some debugging prints.Greg Ward2000-08-021-3/+0
|
* Patch from Rene Liebscher: generate an /IMPLIB: option to ensure thatGreg Ward2000-08-021-1/+13
| | | | | the linker leaves the (temporary) .lib file in the temporary dir. (Moved from 'msvc_prelink_hack()' method in build_ext.py.)
* Simplify the registry-module-finding code: _winreg or win32api/win32con.Greg Ward2000-06-301-4/+1
| | | | | | This'll work fine with 2.0 or 1.5.2, but is less than ideal for 1.6a1/a2. But the code to accomodate 1.6a1/a2 was released with Distutils 0.9, so it can go away now.
* On second thought, first try for _winreg, and then winreg. Only if bothGreg Ward2000-06-291-1/+5
| | | | | fail do we try for win32api/win32con. If *those* both fail, then we don't have registry access. Phew!
* Changed to use _winreg module instead of winreg.Greg Ward2000-06-291-6/+6
|
* Lyle Johnson: added 'build_temp' parameter to 'link_shared_{lib,object}()'Greg Ward2000-06-281-4/+7
| | | | | | | methods (but not 'link_executable()', hmmm). Currently only used by BCPPCompiler; it's a dummy parameter for UnixCCompiler and MSVCCompiler. Also added 'bcpp' to compiler table used by 'new_compiler()'.
* Define the 'executables' class attribute so the CCompiler constructorGreg Ward2000-06-251-1/+8
| | | | | doesn't blow up. We don't currently use the 'set_executables()' bureaucracy, although it would be nice to do so for consistency with UnixCCompiler.
* Import exceptions from errors.py, not ccompiler.py.Greg Ward2000-05-301-4/+4
|
* Changed to catch compile/link failures and raise CompileError, LibError,Greg Ward2000-05-301-7/+21
| | | | or LinkError (exception classes defined in ccompiler.py).
* Added support for the 'export_symbols' parameter to 'link_shared_object()'Greg Ward2000-05-201-2/+10
| | | | | | and 'link_shared_lib()'. In MSVCCompiler, this is meaningful: it adds /EXPORT: options to the linker command line. In UnixCCompiler, it is ignored.
* Added 'link_executable()' method (Berthold Hoellmann).Greg Ward2000-04-191-3/+48
| | | | Two small fixes to 'link_shared_object()'.
* Cleaned up/simplified error-handling:Greg Ward2000-04-151-0/+3
| | | | | | | | | | | | | - DistutilsOptionError is now documented as it's actually used, ie. to indicate bogus option values (usually user options, eg. from the command-line) - added DistutilsSetupError to indicate errors that definitely arise in the setup script - got rid of DistutilsValueError, and changed all usage of it to either DistutilsSetupError or ValueError as appropriate - simplified a bunch of option get/set methods in Command and Distribution classes -- just pass on AttributeError most of the time, rather than turning it into something else
* Fixed my simplification to Thomas' patch: winreg and win32api export the sameGreg Ward2000-03-311-8/+13
| | | | functions, but with different names.
* Simplified Thomas Heller's registry patch: just assign all thoseGreg Ward2000-03-311-32/+32
| | | | | | | | HKEY_* and Reg* names once, rather than having near-duplicate code in the two import attempts. Also dropped the leading underscore on all the imported symbols, as it's not appropriate (they're not local to this module).
* Patch from Thomas Heller: use the new winreg module if available.Greg Ward2000-03-311-24/+47
|
* Don't perpetrate the "_d" hack for naming debugging extensions -- that'sGreg Ward2000-03-311-4/+0
| | | | now done in the 'build_ext' command.
* Don't put Python's library directory into the library search path -- that'sGreg Ward2000-03-311-3/+0
| | | | specific to building Python extensions.
* Call 'find_exe()', not '_find_exe()'.Greg Ward2000-03-291-3/+3
|
* Added 'runtime_library_dirs' parameter to 'link_*()' methods, and warn thatGreg Ward2000-03-261-6/+11
| | | | | | we don't know what to do with it when we see it. Call '_fix_object_args()' and/or '_fix_lib_args()' as appropriate, rather than just '_fix_link_args()'.
* Changed to pay attention to the 'runtime_library_dirs' list (= 'rpath'Greg Ward2000-03-181-1/+7
| | | | | | | | | | option in the 'build_ext' command): * in ccompiler.py: 'gen_lib_options()' now takes 'runtime_library_dirs' parameter * in unixccompiler.py and msvccompiler.py: now pass 'self.runtime_library_dirs' to 'gen_lib_options()', and define 'runtime_library_dir_option()' (although in msvccompiler.py it blows up with a DistutilsPlatformError right now!)
* Renamed 'link_static_lib() to 'create_static_lib()', and rewrote it createGreg Ward2000-03-101-25/+15
| | | | | a static library (using lib.exe as found by '__init__()', hopefully through registry entries pointing to DevStudio).
* Serious overhaul of the C compiler interface and the two classes thatGreg Ward2000-03-061-130/+105
| | | | | | | | | | | | implement it (so far): * moved filename generation methods into CCompiler base class, driven by data supplied by implementation classes * moved a bunch of common code from UnixCCompiler to convenience methods in CCompiler * overhauled MSVCCompiler's compile/link methods to look and act as much as possible like UnixCCompiler's, in order to regularize both interface and behaviour (especially by using those new convenience methods)
* Changed '__rcsid__' to '__revision__'.Greg Ward2000-03-021-1/+1
|
* Ditched '_find_SET()', since it was a no-value-added wrapper aroundGreg Ward2000-02-111-23/+14
| | | | | | | | 'get_msvc_paths()'. Renamed '_do_SET()' to 'set_path_env_var()', tweaked docstring, and cosmetically tweaked code. Stylistic changes to MSVCCompiler constructor (variable renaming and type consistency).
* Latest patch from Thomas Heller/Robin Becker:Greg Ward2000-02-111-47/+68
| | | | | | | | | | * tweak my docstrings * fix None returns to empty list * reshuffle responsibilities between '_find_exe()', '_find_SET()', and the MSVCCompiler constructor -- now the constructor worries about fetching the version list and determining the most recent one * added "/W3" compile option Also, I added/tweaked some docstrings.
* Stylistic changes to the registry-grovelling code: code formatting, changedGreg Ward2000-02-101-23/+51
| | | | function names, dbetter (hopefully) ocstrings, and comments.
* Patch from Thomas heller:Greg Ward2000-02-101-11/+33
| | | | | | | * don't need to mention python<ver>.lib -- it's done by a pragma * add debug flags for compile and link, and use them * fix 'link_shared_library()' to pass everything to 'link_shared_object()' * change filename when shared object with debug info (ugh)
* Added 'debug' flags to compile and link methods, and added dummy code forGreg Ward2000-02-091-3/+13
| | | | | | someone who knows Windows/MSVC++ to come along and add the right flags. Comment noting that 'link_static_lib()' signature is inconsistent with the other compiler classes (uh-oh!)
* Revised version (thank to Thomas Heller and Robin Becker) that tries a lotGreg Ward2000-02-081-3/+98
| | | | harder to find the MSVC compiler (mainly by using the registry).
* Removed /GD switch -- currently ignored by MSVC.Greg Ward2000-01-171-1/+1
|
* Added compiler flags suggested by Thomas Heller: optimize, use multi-threadedGreg Ward2000-01-171-1/+1
| | | | RT library.
* Fix library filename methods -- there is no 'lib' prefix under DOS/Windows.Greg Ward2000-01-171-5/+2
|
* Catch up with terminology change in UnixCCompiler: 'includes' -> 'include_dirs'.Greg Ward1999-12-121-5/+6
|
* Catch up with changes in 'gen_lib_options()':Greg Ward1999-10-031-5/+30
| | | | | | | | - change how we call it - added methods 'library_dir_option()', 'library_option()', and 'find_library_file()' that it calls Added 'force' flag; it's automatically "respected", because this class always rebuilds everything! (Which it to say, "force=0" is not respected.)
* Catch up with latest changes in CCompiler:Greg Ward1999-09-291-58/+45
| | | | | | | | | | | | - add 'extra_preargs' and 'extra_postargs' parameters (and use them!) - got rid of 'build_info' kludge parameter - added 'compiler_type' class attribute - respect reordered arguments to 'gen_lib_options()' Also added 'output_dir' parameter (catching up with older change in CCompiler) -- BUT this is presently ignored by all methods! Deleted some more docstrings redundant with CCompiler. Dropped generated of "/DEF:" argument --- that's now done by the 'build_ext' command.
* Ditched redundant docstrings and comments (overlap with ccompiler.py).Greg Ward1999-09-081-111/+20
| | | | | | | Ditched redundant '_gen_preprocess_options()' and '_gen_lib_options()' -- now provided by ccompiler.py. Fixed some filename extension variables -- added missing period. Cosmetic tweaks.
* Added msvccompiler module exactly as supplied by Perry Stoll.Greg Ward1999-08-291-0/+317