Skip to content

Commit

Permalink
Deprecate DENO_BUILD_MODE=release
Browse files Browse the repository at this point in the history
Instead use: tools/build.py --release
  • Loading branch information
ry committed Mar 19, 2019
1 parent cdfd32d commit 8f3d0ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 12 additions & 1 deletion tools/build.py
@@ -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(),
Expand Down
5 changes: 2 additions & 3 deletions website/manual.md
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 8f3d0ca

Please sign in to comment.