Commit 65971462 authored by Greg Ward's avatar Greg Ward

Added 'debug' flags to compile and link methods, and added dummy code for

  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!)
parent 236b908c
...@@ -159,6 +159,7 @@ class MSVCCompiler (CCompiler) : ...@@ -159,6 +159,7 @@ class MSVCCompiler (CCompiler) :
output_dir=None, output_dir=None,
macros=None, macros=None,
include_dirs=None, include_dirs=None,
debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None):
...@@ -190,6 +191,8 @@ class MSVCCompiler (CCompiler) : ...@@ -190,6 +191,8 @@ class MSVCCompiler (CCompiler) :
cc_args = self.compile_options + \ cc_args = self.compile_options + \
base_pp_opts + \ base_pp_opts + \
[outputOpt, inputOpt] [outputOpt, inputOpt]
if debug:
pass # XXX what goes here?
if extra_preargs: if extra_preargs:
cc_args[:0] = extra_preargs cc_args[:0] = extra_preargs
if extra_postargs: if extra_postargs:
...@@ -200,15 +203,17 @@ class MSVCCompiler (CCompiler) : ...@@ -200,15 +203,17 @@ class MSVCCompiler (CCompiler) :
return objectFiles return objectFiles
# XXX this is kind of useless without 'link_binary()' or # XXX the signature of this method is different from CCompiler and
# 'link_executable()' or something -- or maybe 'link_static_lib()' # UnixCCompiler -- but those extra parameters (libraries, library_dirs)
# should not exist at all, and we just have 'link_binary()'? # are actually used. So: are they really *needed*, or can they be
# ditched? If needed, the CCompiler API will have to change...
def link_static_lib (self, def link_static_lib (self,
objects, objects,
output_libname, output_libname,
output_dir=None, output_dir=None,
libraries=None, libraries=None,
library_dirs=None, library_dirs=None,
debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None):
...@@ -223,6 +228,8 @@ class MSVCCompiler (CCompiler) : ...@@ -223,6 +228,8 @@ class MSVCCompiler (CCompiler) :
ld_args = self.ldflags_static + lib_opts + \ ld_args = self.ldflags_static + lib_opts + \
objects + ['/OUT:' + output_filename] objects + ['/OUT:' + output_filename]
if debug:
pass # XXX what goes here?
if extra_preargs: if extra_preargs:
ld_args[:0] = extra_preargs ld_args[:0] = extra_preargs
if extra_postargs: if extra_postargs:
...@@ -237,6 +244,7 @@ class MSVCCompiler (CCompiler) : ...@@ -237,6 +244,7 @@ class MSVCCompiler (CCompiler) :
output_dir=None, output_dir=None,
libraries=None, libraries=None,
library_dirs=None, library_dirs=None,
debug=0,
extra_preargs=None, extra_preargs=None,
extra_postargs=None): extra_postargs=None):
...@@ -267,6 +275,8 @@ class MSVCCompiler (CCompiler) : ...@@ -267,6 +275,8 @@ class MSVCCompiler (CCompiler) :
ld_args = self.ldflags_shared + lib_opts + \ ld_args = self.ldflags_shared + lib_opts + \
objects + ['/OUT:' + output_filename] objects + ['/OUT:' + output_filename]
if debug:
pass # XXX what goes here?
if extra_preargs: if extra_preargs:
ld_args[:0] = extra_preargs ld_args[:0] = extra_preargs
if extra_postargs: if extra_postargs:
......
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