Skip to content

Commit

Permalink
build: Use target/ instead of out/ (denoland#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
ry authored Nov 8, 2018
1 parent 1a876a7 commit a18e51f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ export DENO_BUILD_MODE=release
# Build deno and V8's d8.
./tools/build.py d8 deno
# Start the program we want to benchmark with --prof
./out/release/deno tests/http_bench.ts --allow-net --prof &
./target/release/deno tests/http_bench.ts --allow-net --prof &
# Exercise it.
third_party/wrk/linux/wrk http://localhost:4500/
kill `pgrep deno`
# When supplying --prof, V8 will write a file in the current directory that
# looks like this isolate-0x7fad98242400-v8.log
# To examine this file:
D8_PATH=out/release/ ./third_party/v8/tools/linux-tick-processor
D8_PATH=target/release/ ./third_party/v8/tools/linux-tick-processor
isolate-0x7fad98242400-v8.log
```

Expand Down Expand Up @@ -136,7 +136,7 @@ submodule. However, you need to install separately:
./tools/build.py

# Run.
./out/debug/deno tests/002_hello.ts
./target/debug/deno tests/002_hello.ts

# Test.
./tools/test.py
Expand All @@ -147,22 +147,22 @@ submodule. However, you need to install separately:
Other useful commands:

# Call ninja manually.
./third_party/depot_tools/ninja -C out/debug
./third_party/depot_tools/ninja -C target/debug

# Build a release binary.
DENO_BUILD_MODE=release ./tools/build.py :deno

# List executable targets.
./third_party/depot_tools/gn ls out/debug //:* --as=output --type=executable
./third_party/depot_tools/gn ls target/debug //:* --as=output --type=executable

# List build configuation.
./third_party/depot_tools/gn args out/debug/ --list
./third_party/depot_tools/gn args target/debug/ --list

# Edit build configuration.
./third_party/depot_tools/gn args out/debug/
./third_party/depot_tools/gn args target/debug/

# Describe a target.
./third_party/depot_tools/gn desc out/debug/ :deno
./third_party/depot_tools/gn desc target/debug/ :deno
./third_party/depot_tools/gn help

# Update third_party modules
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
- Single executable:

```
> ls -lh out/release/deno
-rwxr-xr-x 1 rld staff 48M Aug 2 13:24 out/release/deno
> otool -L out/release/deno
out/release/deno:
> ls -lh target/release/deno
-rwxr-xr-x 1 rld staff 48M Aug 2 13:24 target/release/deno
> otool -L target/release/deno
target/release/deno:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.51.6)
Expand Down
2 changes: 1 addition & 1 deletion js/unit_tests.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.

// This test is executed as part of tools/test.py
// But it can also be run manually: ./out/debug/deno js/unit_tests.ts
// But it can also be run manually: ./target/debug/deno js/unit_tests.ts
import "../website/app_test.js";
import "./blob_test.ts";
import "./buffer_test.ts";
Expand Down
2 changes: 1 addition & 1 deletion tools/deno_dir_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run_deno(deno_exe, deno_dir=None):

def main(argv):
if len(sys.argv) != 3:
print "Usage ./tools/deno_dir_test.py out/debug/deno out/debug/.deno_dir"
print "Usage ./tools/deno_dir_test.py target/debug/deno target/debug/.deno_dir"
sys.exit(1)
deno_dir_test(argv[1], argv[2])

Expand Down
2 changes: 1 addition & 1 deletion tools/http_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ def run(server_cmd):

if __name__ == '__main__':
if len(sys.argv) < 2:
print "Usage ./tools/http_benchmark.py out/debug/deno"
print "Usage ./tools/http_benchmark.py target/debug/deno"
sys.exit(1)
deno_http_benchmark(sys.argv[1])
2 changes: 1 addition & 1 deletion tools/throughput_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def tcp(deno_exe, megs):
deno_exe = sys.argv[1]
megs = int(sys.argv[2])
if not deno_exe or not megs:
print "Usage ./tools/throughput_benchmark.py out/debug/deno 100"
print "Usage ./tools/throughput_benchmark.py target/debug/deno 100"
sys.exit(1)
secs = tcp(sys.argv[1], megs)
print secs, "seconds"
2 changes: 1 addition & 1 deletion tools/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ def unit_tests(deno_exe):

if __name__ == '__main__':
if len(sys.argv) < 2:
print "Usage ./tools/unit_tests.py out/debug/deno"
print "Usage ./tools/unit_tests.py target/debug/deno"
sys.exit(1)
unit_tests(sys.argv[1])
4 changes: 2 additions & 2 deletions tools/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ def build_mode(default="debug"):
return default


# E.G. "out/debug"
# E.G. "target/debug"
def build_path():
if "DENO_BUILD_PATH" in os.environ:
return os.environ["DENO_BUILD_PATH"]
else:
return os.path.join(root_path, "out", build_mode())
return os.path.join(root_path, "target", build_mode())


# Returns True if the expected matches the actual output, allowing variation
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"noLib": true,
"noUnusedLocals": true,
"paths": {
"*": ["*", "out/debug/*", "out/default/*", "out/release/*"]
"*": ["*", "target/debug/*", "target/release/*"]
},
"preserveConstEnums": true,
"pretty": true,
Expand Down

0 comments on commit a18e51f

Please sign in to comment.