|
|
|
|
|
|
|
|
@contextmanager |
|
|
@contextmanager |
|
|
def _generate_toolchain(cxx: str): |
|
|
def _generate_toolchain(cxx: str): |
|
|
with tempfile.NamedTemporaryFile( |
|
|
with tempfile.NamedTemporaryFile( |
|
|
suffix='-dds-toolchain.dds', mode='wb') as f: |
|
|
|
|
|
|
|
|
suffix='-dds-toolchain.dds', mode='wb', delete=False) as f: |
|
|
comp_id = 'GNU' |
|
|
comp_id = 'GNU' |
|
|
flags = '' |
|
|
flags = '' |
|
|
link_flags = '' |
|
|
link_flags = '' |
|
|
|
|
|
|
|
|
Link-Flags: {link_flags}''' |
|
|
Link-Flags: {link_flags}''' |
|
|
print('Using generated toolchain file: ' + content) |
|
|
print('Using generated toolchain file: ' + content) |
|
|
f.write(content.encode('utf-8')) |
|
|
f.write(content.encode('utf-8')) |
|
|
f.flush() |
|
|
|
|
|
|
|
|
f.close() |
|
|
yield Path(f.name) |
|
|
yield Path(f.name) |
|
|
|
|
|
os.unlink(f.name) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main(argv: Sequence[str]) -> int: |
|
|
def main(argv: Sequence[str]) -> int: |