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

@@ -2,4 +2,4 @@ Type: Library

Name: WIL

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

+ 2
- 0
tools/bootstrap.py View File

@@ -67,6 +67,8 @@ def _pull_executable(bts_dir: Path) -> Path:
assert len(generated) == 1, repr(generated)
exe, = generated
dest = prebuild_dir / exe.name
if dest.exists():
dest.unlink()
exe.rename(dest)
return dest


+ 3
- 2
tools/build.py View File

@@ -17,7 +17,7 @@ BUILD_DIR = ROOT / '_build'
@contextmanager
def _generate_toolchain(cxx: str):
with tempfile.NamedTemporaryFile(
suffix='-dds-toolchain.dds', mode='wb') as f:
suffix='-dds-toolchain.dds', mode='wb', delete=False) as f:
comp_id = 'GNU'
flags = ''
link_flags = ''
@@ -34,8 +34,9 @@ def _generate_toolchain(cxx: str):
Link-Flags: {link_flags}'''
print('Using generated toolchain file: ' + content)
f.write(content.encode('utf-8'))
f.flush()
f.close()
yield Path(f.name)
os.unlink(f.name)


def main(argv: Sequence[str]) -> int:

Loading…
Cancel
Save