Browse Source

Trying to fix bootstrap process on Windows

default_compile_flags
vector-of-bool 5 years ago
parent
commit
0e71d14fc6
3 changed files with 6 additions and 3 deletions
  1. +1
    -1
      external/wil.lml
  2. +2
    -0
      tools/bootstrap.py
  3. +3
    -2
      tools/build.py

+ 1
- 1
external/wil.lml View File



Name: WIL Name: WIL


Include-Path: wil/include
Include-Path: repo/wil/include

+ 2
- 0
tools/bootstrap.py View File

assert len(generated) == 1, repr(generated) assert len(generated) == 1, repr(generated)
exe, = generated exe, = generated
dest = prebuild_dir / exe.name dest = prebuild_dir / exe.name
if dest.exists():
dest.unlink()
exe.rename(dest) exe.rename(dest)
return dest return dest



+ 3
- 2
tools/build.py View File

@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:

Loading…
Cancel
Save