cxx = meson.get_compiler('cpp')
system = target_machine.system()
+
+link_no_warn_duplicate_libraries = cxx.get_supported_link_arguments([
+ '-Wl,-no_warn_duplicate_libraries',
+])
+
+add_project_link_arguments(link_no_warn_duplicate_libraries, language: ['c', 'cpp'])
import os
import re
import sys
+from pathlib import Path
class LType(Enum):
"""The type we handle in table.py"""
if os.path.isdir('../docs'):
gen_oldstyle_docs(srcdir, entries)
gen_newstyle_docs(srcdir, entries)
- # touch pseudo output file
- with open(gendir + '/timestamp', mode='w', encoding="utf-8") as file:
- file.write('')
- file.close()
+ # Remove rust generated files, they need to be re-generated after a table change and the rust dependency tracking does
+ # not do that in some cases. For the autotools case Makefile.am takes care.
+ Path(gendir, 'rust', 'librecrust.a').unlink(True)
+ Path(gendir, 'rust', 'lib.rs.h').unlink(True)
+ Path(gendir, 'rust', 'web.rs.h').unlink(True)
+ Path(gendir, 'rust', 'cxx.h').unlink(True)
+ Path(gendir, 'rust', 'misc.rs.h').unlink(True)
+ target = Path('target')
+ for root, dirs, files in target.walk(top_down=False):
+ for name in files:
+ (root / name).unlink()
+ for name in dirs:
+ (root / name).rmdir()
+
generate()
env.append('RUSTC_TARGET_ARCH', '')
lib_recrust = custom_target('librecrust.a',
- output: [outfile, 'cxx.h'],
+ output: [outfile, 'cxx.h', 'lib.rs.h', 'misc.rs.h', 'web.rs.h'],
input: infile,
command: [build,
],