Ver código fonte

Unbuffered mode for bootstrap build scripts

default_compile_flags
vector-of-bool 5 anos atrás
pai
commit
42603f9370
1 arquivos alterados com 7 adições e 2 exclusões
  1. +7
    -2
      tools/bootstrap.py

+ 7
- 2
tools/bootstrap.py Ver arquivo

@@ -17,6 +17,8 @@ BUILD_DIR = PROJECT_ROOT / '_build'
BOOTSTRAP_DIR = BUILD_DIR / '_bootstrap'
PREBUILT_DIR = PROJECT_ROOT / '_prebuilt'

EXE_SUFFIX = '.exe' if os.name == 'nt' else ''


def _run_quiet(args) -> None:
cmd = [str(s) for s in args]
@@ -44,10 +46,11 @@ def _clone_bootstrap_phase(ph: str) -> None:
def _build_bootstrap_phase(ph: str, args: argparse.Namespace) -> None:
print(f'Running build: {ph} (Please wait a moment...)')
env = os.environ.copy()
env['DDS_BOOTSTRAP_PREV_EXE'] = PREBUILT_DIR / 'dds'
env['DDS_BOOTSTRAP_PREV_EXE'] = str(PREBUILT_DIR / 'dds')
subprocess.check_call(
[
sys.executable,
'-u',
str(BOOTSTRAP_DIR / 'tools/build.py'),
f'--cxx={args.cxx}',
],
@@ -58,7 +61,9 @@ def _build_bootstrap_phase(ph: str, args: argparse.Namespace) -> None:
def _pull_executable() -> Path:
prebuild_dir = (PROJECT_ROOT / '_prebuilt')
prebuild_dir.mkdir(exist_ok=True)
exe, = list(BOOTSTRAP_DIR.glob('_build/dds*'))
generated = list(BOOTSTRAP_DIR.glob(f'_build/dds{EXE_SUFFIX}'))
assert len(generated) == 1, repr(generated)
exe, = generated
dest = prebuild_dir / exe.name
exe.rename(dest)
return dest

Carregando…
Cancelar
Salvar