summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_clib.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-02-09 02:20:14 (GMT)
committerGreg Ward <gward@python.net>2000-02-09 02:20:14 (GMT)
commite8c6ce4684eaae101d9053abdc9df8df828e92a7 (patch)
tree3a81ed74c381236b03fe844898905a20f42c004a /Lib/distutils/command/build_clib.py
parent324620015d0cd1616af5e1a5787b2b0c9d345fd3 (diff)
downloadcpython-e8c6ce4684eaae101d9053abdc9df8df828e92a7.zip
cpython-e8c6ce4684eaae101d9053abdc9df8df828e92a7.tar.gz
cpython-e8c6ce4684eaae101d9053abdc9df8df828e92a7.tar.bz2
Added 'debug' option, and changed compile/link calls to use it.
Diffstat (limited to 'Lib/distutils/command/build_clib.py')
-rw-r--r--Lib/distutils/command/build_clib.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/distutils/command/build_clib.py b/Lib/distutils/command/build_clib.py
index c638fd5..6571281 100644
--- a/Lib/distutils/command/build_clib.py
+++ b/Lib/distutils/command/build_clib.py
@@ -28,7 +28,9 @@ from distutils.ccompiler import new_compiler
class BuildLib (Command):
- options = []
+ options = [('debug', 'g',
+ "compile with debugging information"),
+ ]
def set_default_options (self):
# List of libraries to build
@@ -38,10 +40,13 @@ class BuildLib (Command):
self.include_dirs = None
self.define = None
self.undef = None
+ self.debug = None
# set_default_options()
def set_final_options (self):
+ self.set_undefined_options ('build',
+ ('debug', 'debug'))
self.libraries = self.distribution.libraries
if self.include_dirs is None:
self.include_dirs = self.distribution.include_dirs or []
@@ -146,12 +151,13 @@ class BuildLib (Command):
objects = self.compiler.compile (sources,
macros=macros,
include_dirs=include_dirs,
- output_dir=lib_dir)
+ output_dir=lib_dir,
+ debug=self.debug)
# Now "link" the object files together into a static library.
# (On Unix at least, this isn't really linking -- it just
# builds an archive. Whatever.)
- self.compiler.link_static_lib (objects, lib_name)
+ self.compiler.link_static_lib (objects, lib_name, debug=self.debug)
# for libraries