Merge pull request #2514 from mozilla/remove-first-party-common

Remove first party code from common.a
This commit is contained in:
Reuben Morais 2019-11-08 16:54:29 +00:00 committed by GitHub
commit acbf6583ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -32,8 +32,6 @@ COMMON_FILES = [
'unittest.cc'))
]
COMMON_FILES += glob.glob('*.cpp')
def build_common(out_name='common.a', build_dir='temp_build/temp_build', debug=False, num_parallel=1):
compiler = os.environ.get('CXX', 'g++')
ar = os.environ.get('AR', 'ar')

View File

@ -49,14 +49,18 @@ if not os.path.exists(common_build):
if not os.path.exists(build_dir):
os.makedirs(build_dir)
build_common(out_name='common.a',
build_common(out_name=common_build,
build_dir=build_dir,
num_parallel=known_args.num_processes,
debug=debug)
decoder_module = Extension(
name='ds_ctcdecoder._swigwrapper',
sources=['swigwrapper.i'],
sources=['swigwrapper.i',
'ctc_beam_search_decoder.cpp',
'scorer.cpp',
'path_trie.cpp',
'decoder_utils.cpp'],
swig_opts=['-c++', '-extranative'],
language='c++',
include_dirs=INCLUDES + [numpy_include],