Add Deno.version.gnArgs (#1845)

To display specific build args passed to GN.
This commit is contained in:
Yoshiya Hinosawa 2019-03-02 09:33:28 +09:00 committed by Ryan Dahl
parent 8c310d3d56
commit a7bb8ccce8
6 changed files with 39 additions and 3 deletions

16
tools/write_gn_args.py Normal file
View file

@ -0,0 +1,16 @@
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import os
import sys
import third_party
from util import run_output, build_path
out_filename = sys.argv[1]
args_list = run_output([
third_party.gn_path, "args",
build_path(), "--list", "--short", "--overrides-only"
],
env=third_party.google_env())
with open(out_filename, "w") as f:
f.write(args_list)