Commit bfc79d64 authored by Greg Ward's avatar Greg Ward

Lyle Johnson: added 'build_temp' parameter to 'link_shared_{lib,object}()'

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()'.
parent 7d9c705b
...@@ -492,7 +492,6 @@ class CCompiler: ...@@ -492,7 +492,6 @@ class CCompiler:
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None):
"""Compile one or more source files. 'sources' must be a list of """Compile one or more source files. 'sources' must be a list of
filenames, most likely C/C++ files, but in reality anything that filenames, most likely C/C++ files, but in reality anything that
can be handled by a particular compiler and compiler class can be handled by a particular compiler and compiler class
...@@ -572,8 +571,8 @@ class CCompiler: ...@@ -572,8 +571,8 @@ class CCompiler:
export_symbols=None, export_symbols=None,
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None,
build_temp=None):
"""Link a bunch of stuff together to create a shared library file. """Link a bunch of stuff together to create a shared library file.
Similar semantics to 'create_static_lib()', with the addition of Similar semantics to 'create_static_lib()', with the addition of
other libraries to link against and directories to search for them. other libraries to link against and directories to search for them.
...@@ -624,7 +623,8 @@ class CCompiler: ...@@ -624,7 +623,8 @@ class CCompiler:
export_symbols=None, export_symbols=None,
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None,
build_temp=None):
"""Link a bunch of stuff together to create a shared object file. """Link a bunch of stuff together to create a shared object file.
Much like 'link_shared_lib()', except the output filename is Much like 'link_shared_lib()', except the output filename is
explicitly supplied as 'output_filename'. If 'output_dir' is explicitly supplied as 'output_filename'. If 'output_dir' is
...@@ -814,6 +814,8 @@ compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler', ...@@ -814,6 +814,8 @@ compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler',
"Cygwin port of GNU C Compiler for Win32"), "Cygwin port of GNU C Compiler for Win32"),
'mingw32': ('cygwinccompiler', 'Mingw32CCompiler', 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler',
"Mingw32 port of GNU C Compiler for Win32"), "Mingw32 port of GNU C Compiler for Win32"),
'bcpp': ('bcppcompiler', 'BCPPCompiler',
"Borland C++ Compiler"),
} }
def show_compilers(): def show_compilers():
......
"""distutils.ccompiler """distutils.msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.""" for the Microsoft Visual Studio."""
...@@ -322,7 +322,8 @@ class MSVCCompiler (CCompiler) : ...@@ -322,7 +322,8 @@ class MSVCCompiler (CCompiler) :
export_symbols=None, export_symbols=None,
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None,
build_temp=None):
self.link_shared_object (objects, self.link_shared_object (objects,
self.shared_library_name(output_libname), self.shared_library_name(output_libname),
...@@ -333,7 +334,8 @@ class MSVCCompiler (CCompiler) : ...@@ -333,7 +334,8 @@ class MSVCCompiler (CCompiler) :
export_symbols=export_symbols, export_symbols=export_symbols,
debug=debug, debug=debug,
extra_preargs=extra_preargs, extra_preargs=extra_preargs,
extra_postargs=extra_postargs) extra_postargs=extra_postargs,
build_temp=build_temp)
def link_shared_object (self, def link_shared_object (self,
...@@ -346,7 +348,8 @@ class MSVCCompiler (CCompiler) : ...@@ -346,7 +348,8 @@ class MSVCCompiler (CCompiler) :
export_symbols=None, export_symbols=None,
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None,
build_temp=None):
(objects, output_dir) = self._fix_object_args (objects, output_dir) (objects, output_dir) = self._fix_object_args (objects, output_dir)
(libraries, library_dirs, runtime_library_dirs) = \ (libraries, library_dirs, runtime_library_dirs) = \
......
...@@ -74,6 +74,7 @@ class UnixCCompiler (CCompiler): ...@@ -74,6 +74,7 @@ class UnixCCompiler (CCompiler):
static_lib_format = shared_lib_format = "lib%s%s" static_lib_format = shared_lib_format = "lib%s%s"
def __init__ (self, def __init__ (self,
verbose=0, verbose=0,
dry_run=0, dry_run=0,
...@@ -199,7 +200,9 @@ class UnixCCompiler (CCompiler): ...@@ -199,7 +200,9 @@ class UnixCCompiler (CCompiler):
export_symbols=None, export_symbols=None,
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None,
build_temp=None):
self.link_shared_object ( self.link_shared_object (
objects, objects,
self.shared_library_filename (output_libname), self.shared_library_filename (output_libname),
...@@ -210,7 +213,8 @@ class UnixCCompiler (CCompiler): ...@@ -210,7 +213,8 @@ class UnixCCompiler (CCompiler):
export_symbols, export_symbols,
debug, debug,
extra_preargs, extra_preargs,
extra_postargs) extra_postargs,
build_temp)
def link_shared_object (self, def link_shared_object (self,
...@@ -223,7 +227,8 @@ class UnixCCompiler (CCompiler): ...@@ -223,7 +227,8 @@ class UnixCCompiler (CCompiler):
export_symbols=None, export_symbols=None,
debug=0, debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None,
build_temp=None):
(objects, output_dir) = self._fix_object_args (objects, output_dir) (objects, output_dir) = self._fix_object_args (objects, output_dir)
(libraries, library_dirs, runtime_library_dirs) = \ (libraries, library_dirs, runtime_library_dirs) = \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment