mirror of
https://github.com/denoland/deno.git
synced 2024-12-31 03:29:10 -05:00
Deprecate DENO_BUILD_MODE=release
Instead use: tools/build.py --release
This commit is contained in:
parent
cdfd32dd74
commit
8f3d0ca664
2 changed files with 14 additions and 4 deletions
|
@ -1,16 +1,27 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
from __future__ import print_function
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
import third_party
|
||||
from util import build_path, enable_ansi_colors, run
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
"--release", help="Use target/release", action="store_true")
|
||||
|
||||
|
||||
def main(argv):
|
||||
enable_ansi_colors()
|
||||
|
||||
ninja_args = argv[1:]
|
||||
args, rest_argv = parser.parse_known_args(argv)
|
||||
|
||||
if "DENO_BUILD_MODE" not in os.environ:
|
||||
if args.release:
|
||||
os.environ["DENO_BUILD_MODE"] = "release"
|
||||
|
||||
ninja_args = rest_argv[1:]
|
||||
if not "-C" in ninja_args:
|
||||
if not os.path.isdir(build_path()):
|
||||
print("Build directory '%s' does not exist." % build_path(),
|
||||
|
|
|
@ -176,7 +176,7 @@ Extra steps for Windows users:
|
|||
./third_party/depot_tools/ninja -C target/debug
|
||||
|
||||
# Build a release binary.
|
||||
DENO_BUILD_MODE=release ./tools/build.py :deno
|
||||
./tools/build.py --release deno
|
||||
|
||||
# List executable targets.
|
||||
./third_party/depot_tools/gn ls target/debug //:* --as=output --type=executable
|
||||
|
@ -622,9 +622,8 @@ To start profiling,
|
|||
|
||||
```sh
|
||||
# Make sure we're only building release.
|
||||
export DENO_BUILD_MODE=release
|
||||
# Build deno and V8's d8.
|
||||
./tools/build.py d8 deno
|
||||
./tools/build.py --release d8 deno
|
||||
# Start the program we want to benchmark with --prof
|
||||
./target/release/deno tests/http_bench.ts --allow-net --prof &
|
||||
# Exercise it.
|
||||
|
|
Loading…
Reference in a new issue