Changeset f2f9d8b
- Timestamp:
- Oct 3, 2017, 9:07:14 AM (7 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- 8774047
- Parents:
- dfe058a0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/wscript_build
rdfe058a0 rf2f9d8b 26 26 build_features = ['cstlib', 'cshlib'] 27 27 elif ctx.env['DEST_OS'] in ['win32', 'win64']: 28 build_features = ['cstlib', 'cshlib ']28 build_features = ['cstlib', 'cshlib gensyms'] 29 29 elif ctx.env['DEST_OS'] in ['emscripten']: 30 30 build_features = ['cstlib','cshlib'] … … 41 41 fcstlib.inst_to = cstlib.inst_to = '${LIBDIR}' 42 42 43 import re 44 from waflib import TaskGen, Task 45 from waflib.Context import STDOUT 46 from waflib.Utils import O644 47 48 class gen_sym_file(Task.Task): 49 color = 'BLUE' 50 inst_to = '${LIBDIR}' 51 def run(self): 52 syms = {} 53 reg = getattr(self.generator, 'export_symbols_regex','.+?') 54 binary_path = self.generator.link_task.outputs[0].abspath() 55 if 'msvc' in self.env.CC_NAME: 56 reg_compiled = re.compile(r'External\s+\|\s+_(?P<symbol>%s)\b' % reg) 57 cmd =(self.env.DUMPBIN or['dumpbin'])+['/symbols', binary_path] 58 else: # using gcc? assume we have nm 59 reg_compiled = re.compile(r'(T|D)\s+_(?P<symbol>%s)\b'%reg) 60 cmd = (self.env.NM or ['nm']) + ['-g', binary_path] 61 print (cmd) 62 dump_output = self.generator.bld.cmd_and_log(cmd, quiet=STDOUT) 63 print (dump_output) 64 syms = [] 65 for m in reg_compiled.finditer(dump_output): 66 syms += [m.group('symbol')] 67 print (m.group('symbol')) 68 self.outputs[0].write('EXPORTS\n'+'\n'.join(syms)) 69 70 @TaskGen.feature('gensyms') 71 @TaskGen.after_method('process_source','process_use','apply_link','process_uselib_local','propagate_uselib_vars') 72 def gen_symbols(self): 73 #sym_file = self.path.find_or_declare(self.target + '.def') 74 sym_file_name = os.path.splitext(self.link_task.outputs[0].abspath())[0] + '.def' 75 sym_file = self.path.find_or_declare(sym_file_name) 76 symtask = self.create_task('gen_sym_file', self.link_task.outputs, sym_file) 77 self.add_install_files(install_to=self.link_task.inst_to, install_from=sym_file, 78 chmod=O644, task=self.link_task) 79 43 80 for target in build_features: 44 81 ctx(features = 'c ' + target, 45 82 use = uselib + ['lib_objects'], 46 83 target = 'aubio', 84 export_symbols_regex=r'(?:.*aubio|fvec|lvec|cvec|fmat)_.*', 47 85 vnum = ctx.env['LIB_VERSION']) 48 86
Note: See TracChangeset
for help on using the changeset viewer.