summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/msvccompiler.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-05-20 13:23:21 (GMT)
committerGreg Ward <gward@python.net>2000-05-20 13:23:21 (GMT)
commit5299b6afc568ac19917b93032295ad8bfbdfc711 (patch)
tree179b6618204f3c99b17e17d63aa3e01e9eebe0b1 /Lib/distutils/msvccompiler.py
parent974f70d97b2bf0fd1828d5c08bc638e25e27aca5 (diff)
downloadcpython-5299b6afc568ac19917b93032295ad8bfbdfc711.zip
cpython-5299b6afc568ac19917b93032295ad8bfbdfc711.tar.gz
cpython-5299b6afc568ac19917b93032295ad8bfbdfc711.tar.bz2
Added support for the 'export_symbols' parameter to 'link_shared_object()'
and 'link_shared_lib()'. In MSVCCompiler, this is meaningful: it adds /EXPORT: options to the linker command line. In UnixCCompiler, it is ignored.
Diffstat (limited to 'Lib/distutils/msvccompiler.py')
-rw-r--r--Lib/distutils/msvccompiler.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py
index 3667afc..b6ff432 100644
--- a/Lib/distutils/msvccompiler.py
+++ b/Lib/distutils/msvccompiler.py
@@ -304,6 +304,7 @@ class MSVCCompiler (CCompiler) :
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
+ export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None):
@@ -313,6 +314,8 @@ class MSVCCompiler (CCompiler) :
output_dir=output_dir,
libraries=libraries,
library_dirs=library_dirs,
+ runtime_library_dirs=runtime_library_dirs,
+ export_symbols=export_symbols,
debug=debug,
extra_preargs=extra_preargs,
extra_postargs=extra_postargs)
@@ -325,6 +328,7 @@ class MSVCCompiler (CCompiler) :
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
+ export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None):
@@ -350,8 +354,12 @@ class MSVCCompiler (CCompiler) :
else:
ldflags = self.ldflags_shared
- ld_args = ldflags + lib_opts + \
- objects + ['/OUT:' + output_filename]
+ export_opts = []
+ for sym in (export_symbols or []):
+ export_opts.append("/EXPORT:" + sym)
+
+ ld_args = (ldflags + lib_opts + export_opts +
+ objects + ['/OUT:' + output_filename])
if extra_preargs:
ld_args[:0] = extra_preargs