summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes6
-rw-r--r--.gitmodules2
-rw-r--r--BUILD.gn6
l---------build_overrides1
l---------buildtools1
-rw-r--r--core/build.rs7
-rw-r--r--core/libdeno/.gn (renamed from .gn)0
-rw-r--r--core/libdeno/BUILD.gn14
-rw-r--r--core/libdeno/api.cc6
-rw-r--r--core/libdeno/binding.cc4
-rw-r--r--core/libdeno/buffer.h4
m---------core/libdeno/build (renamed from build)0
l---------core/libdeno/build_overrides1
l---------core/libdeno/buildtools1
-rw-r--r--core/libdeno/exceptions.h2
-rw-r--r--core/libdeno/internal.h4
l---------core/libdeno/testing1
l---------core/libdeno/third_party1
l---------core/libdeno/tools1
l---------core/libdeno/v81
-rw-r--r--js/stat_test.ts24
l---------testing1
m---------third_party0
-rwxr-xr-xtools/cargo_package.py2
l---------tools/clang1
-rwxr-xr-xtools/format.py8
-rwxr-xr-xtools/lint.py7
-rwxr-xr-xtools/setup.py20
-rw-r--r--tools/third_party.py24
-rw-r--r--tools/util.py1
-rw-r--r--website/manual.md8
31 files changed, 80 insertions, 79 deletions
diff --git a/.gitattributes b/.gitattributes
index 356dc788c..15deed7bc 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4,7 +4,7 @@
# Tell git which symlinks point to files, and which ones point to directories.
# This is relevant for Windows only, and requires git >= 2.19.2 to work.
-/* symlink=dir
-/website/* symlink=dir
-/tools/clang symlink=dir
+/core/libdeno/* symlink=dir
+/node_modules symlink=dir
/tools/memory symlink=dir
+/website/* symlink=dir
diff --git a/.gitmodules b/.gitmodules
index 10e1215d7..248beb8eb 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,7 +2,7 @@
path = third_party
url = https://github.com/denoland/deno_third_party.git
[submodule "build"]
- path = build
+ path = core/libdeno/build
url = https://github.com/denoland/chromium_build.git
[submodule "js/deps/https/deno.land/x/std"]
path = js/deps/https/deno.land/std
diff --git a/BUILD.gn b/BUILD.gn
deleted file mode 100644
index b8e196655..000000000
--- a/BUILD.gn
+++ /dev/null
@@ -1,6 +0,0 @@
-group("default") {
- testonly = true
- deps = [
- "core/libdeno:default",
- ]
-}
diff --git a/build_overrides b/build_overrides
deleted file mode 120000
index 3e199c0e1..000000000
--- a/build_overrides
+++ /dev/null
@@ -1 +0,0 @@
-third_party/v8/build_overrides \ No newline at end of file
diff --git a/buildtools b/buildtools
deleted file mode 120000
index 25713c88a..000000000
--- a/buildtools
+++ /dev/null
@@ -1 +0,0 @@
-third_party/v8/buildtools \ No newline at end of file
diff --git a/core/build.rs b/core/build.rs
index 83569eeee..ead65476a 100644
--- a/core/build.rs
+++ b/core/build.rs
@@ -4,12 +4,9 @@
fn main() {
let build = gn::Build::setup();
- println!(
- "cargo:rustc-link-search=native={}/obj/core/libdeno",
- build.gn_out_dir
- );
+ println!("cargo:rustc-link-search=native={}/obj", build.gn_out_dir);
- build.run("core/libdeno:default");
+ build.run("default");
}
mod gn {
diff --git a/.gn b/core/libdeno/.gn
index e0d902808..e0d902808 100644
--- a/.gn
+++ b/core/libdeno/.gn
diff --git a/core/libdeno/BUILD.gn b/core/libdeno/BUILD.gn
index 2eb0b7128..d2322c678 100644
--- a/core/libdeno/BUILD.gn
+++ b/core/libdeno/BUILD.gn
@@ -1,5 +1,5 @@
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-import("//third_party/v8/gni/v8.gni")
+import("//v8/gni/v8.gni")
group("default") {
testonly = true
@@ -11,8 +11,8 @@ group("default") {
}
config("deno_config") {
- include_dirs = [ "//third_party/v8" ] # This allows us to v8/src/base/ libraries.
- configs = [ "//third_party/v8:external_config" ]
+ include_dirs = [ "//v8" ] # This allows us to v8/src/base/ libraries.
+ configs = [ "//v8:external_config" ]
cflags = []
if (is_debug) {
@@ -39,10 +39,10 @@ config("deno_config") {
v8_source_set("v8") {
deps = [
- "//third_party/v8:v8",
- "//third_party/v8:v8_libbase",
- "//third_party/v8:v8_libplatform",
- "//third_party/v8:v8_libsampler",
+ "//v8:v8",
+ "//v8:v8_libbase",
+ "//v8:v8_libplatform",
+ "//v8:v8_libsampler",
]
configs = [ ":deno_config" ]
}
diff --git a/core/libdeno/api.cc b/core/libdeno/api.cc
index 2e926f793..54501f543 100644
--- a/core/libdeno/api.cc
+++ b/core/libdeno/api.cc
@@ -5,9 +5,9 @@
#include <iostream>
#include <string>
-#include "third_party/v8/include/libplatform/libplatform.h"
-#include "third_party/v8/include/v8.h"
-#include "third_party/v8/src/base/logging.h"
+#include "v8/include/libplatform/libplatform.h"
+#include "v8/include/v8.h"
+#include "v8/src/base/logging.h"
#include "deno.h"
#include "exceptions.h"
diff --git a/core/libdeno/binding.cc b/core/libdeno/binding.cc
index 7827cd522..911c61499 100644
--- a/core/libdeno/binding.cc
+++ b/core/libdeno/binding.cc
@@ -14,8 +14,8 @@
#include <windows.h>
#endif // _WIN32
-#include "third_party/v8/include/v8.h"
-#include "third_party/v8/src/base/logging.h"
+#include "v8/include/v8.h"
+#include "v8/src/base/logging.h"
#include "deno.h"
#include "exceptions.h"
diff --git a/core/libdeno/buffer.h b/core/libdeno/buffer.h
index 636c241b0..9a6e3acf7 100644
--- a/core/libdeno/buffer.h
+++ b/core/libdeno/buffer.h
@@ -10,8 +10,8 @@
#include <unordered_map>
#include <utility>
-#include "third_party/v8/include/v8.h"
-#include "third_party/v8/src/base/logging.h"
+#include "v8/include/v8.h"
+#include "v8/src/base/logging.h"
namespace deno {
diff --git a/build b/core/libdeno/build
-Subproject 6af664c48ed657b89e99a9a8692dc15d7f7a6d9
+Subproject 6af664c48ed657b89e99a9a8692dc15d7f7a6d9
diff --git a/core/libdeno/build_overrides b/core/libdeno/build_overrides
new file mode 120000
index 000000000..f1aca1a07
--- /dev/null
+++ b/core/libdeno/build_overrides
@@ -0,0 +1 @@
+v8/build_overrides \ No newline at end of file
diff --git a/core/libdeno/buildtools b/core/libdeno/buildtools
new file mode 120000
index 000000000..c5b1c451c
--- /dev/null
+++ b/core/libdeno/buildtools
@@ -0,0 +1 @@
+v8/buildtools \ No newline at end of file
diff --git a/core/libdeno/exceptions.h b/core/libdeno/exceptions.h
index 2c0947be2..d8852f544 100644
--- a/core/libdeno/exceptions.h
+++ b/core/libdeno/exceptions.h
@@ -3,7 +3,7 @@
#define EXCEPTIONS_H_
#include <string>
-#include "third_party/v8/include/v8.h"
+#include "v8/include/v8.h"
namespace deno {
diff --git a/core/libdeno/internal.h b/core/libdeno/internal.h
index f3789fcc3..89c746d04 100644
--- a/core/libdeno/internal.h
+++ b/core/libdeno/internal.h
@@ -9,8 +9,8 @@
#include "buffer.h"
#include "deno.h"
-#include "third_party/v8/include/v8.h"
-#include "third_party/v8/src/base/logging.h"
+#include "v8/include/v8.h"
+#include "v8/src/base/logging.h"
namespace deno {
diff --git a/core/libdeno/testing b/core/libdeno/testing
new file mode 120000
index 000000000..ed34f4824
--- /dev/null
+++ b/core/libdeno/testing
@@ -0,0 +1 @@
+v8/testing \ No newline at end of file
diff --git a/core/libdeno/third_party b/core/libdeno/third_party
new file mode 120000
index 000000000..48370cbe7
--- /dev/null
+++ b/core/libdeno/third_party
@@ -0,0 +1 @@
+v8/third_party \ No newline at end of file
diff --git a/core/libdeno/tools b/core/libdeno/tools
new file mode 120000
index 000000000..7b6c53ae9
--- /dev/null
+++ b/core/libdeno/tools
@@ -0,0 +1 @@
+v8/tools \ No newline at end of file
diff --git a/core/libdeno/v8 b/core/libdeno/v8
new file mode 120000
index 000000000..efdcb44da
--- /dev/null
+++ b/core/libdeno/v8
@@ -0,0 +1 @@
+../../third_party/v8 \ No newline at end of file
diff --git a/js/stat_test.ts b/js/stat_test.ts
index 50ee6c9d3..1de98f984 100644
--- a/js/stat_test.ts
+++ b/js/stat_test.ts
@@ -8,9 +8,9 @@ testPerm({ read: true }, async function statSyncSuccess(): Promise<void> {
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
- const testingInfo = Deno.statSync("testing");
- assert(testingInfo.isDirectory());
- assert(!testingInfo.isSymlink());
+ const modulesInfo = Deno.statSync("node_modules");
+ assert(modulesInfo.isDirectory());
+ assert(!modulesInfo.isSymlink());
const testsInfo = Deno.statSync("tests");
assert(testsInfo.isDirectory());
@@ -50,9 +50,9 @@ testPerm({ read: true }, async function lstatSyncSuccess(): Promise<void> {
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
- const testingInfo = Deno.lstatSync("testing");
- assert(!testingInfo.isDirectory());
- assert(testingInfo.isSymlink());
+ const modulesInfo = Deno.lstatSync("node_modules");
+ assert(!modulesInfo.isDirectory());
+ assert(modulesInfo.isSymlink());
const testsInfo = Deno.lstatSync("tests");
assert(testsInfo.isDirectory());
@@ -92,9 +92,9 @@ testPerm({ read: true }, async function statSuccess(): Promise<void> {
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
- const testingInfo = await Deno.stat("testing");
- assert(testingInfo.isDirectory());
- assert(!testingInfo.isSymlink());
+ const modulesInfo = await Deno.stat("node_modules");
+ assert(modulesInfo.isDirectory());
+ assert(!modulesInfo.isSymlink());
const testsInfo = await Deno.stat("tests");
assert(testsInfo.isDirectory());
@@ -134,9 +134,9 @@ testPerm({ read: true }, async function lstatSuccess(): Promise<void> {
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
- const testingInfo = await Deno.lstat("testing");
- assert(!testingInfo.isDirectory());
- assert(testingInfo.isSymlink());
+ const modulesInfo = await Deno.lstat("node_modules");
+ assert(!modulesInfo.isDirectory());
+ assert(modulesInfo.isSymlink());
const testsInfo = await Deno.lstat("tests");
assert(testsInfo.isDirectory());
diff --git a/testing b/testing
deleted file mode 120000
index ee5886815..000000000
--- a/testing
+++ /dev/null
@@ -1 +0,0 @@
-third_party/v8/testing \ No newline at end of file
diff --git a/third_party b/third_party
-Subproject 4b36ce22a2ef7310f815acb6a2de0d26766a24b
+Subproject 5f9af82470e8770a1c0170bbcf30502509332da
diff --git a/tools/cargo_package.py b/tools/cargo_package.py
index 152685d6b..7696681e7 100755
--- a/tools/cargo_package.py
+++ b/tools/cargo_package.py
@@ -30,7 +30,7 @@ elif sys.platform == "win32":
else:
assert (False)
-lib_name = os.path.join(root_path, "target/release/obj/core/libdeno",
+lib_name = os.path.join(root_path, "target", "release", "obj",
"libdeno" + static_lib_suffix)
diff --git a/tools/clang b/tools/clang
deleted file mode 120000
index e3fc67857..000000000
--- a/tools/clang
+++ /dev/null
@@ -1 +0,0 @@
-../third_party/v8/tools/clang \ No newline at end of file
diff --git a/tools/format.py b/tools/format.py
index 2628928f1..ac6035804 100755
--- a/tools/format.py
+++ b/tools/format.py
@@ -3,7 +3,7 @@
import os
import sys
import argparse
-from third_party import google_env, python_env
+from third_party import get_buildtools_tool_path, google_env, python_env
from util import git_ls_files, third_party_path, root_path, run
@@ -44,8 +44,8 @@ def main():
def clang_format():
- print "clang_format"
- exe = os.path.join(third_party_path, "depot_tools", "clang-format")
+ print "clang-format"
+ exe = get_buildtools_tool_path("clang-format")
source_files = git_ls_files(root_path, ["*.cc", "*.h"])
run([exe, "-i", "-style", "Google", "--"] + source_files,
env=google_env(),
@@ -54,7 +54,7 @@ def clang_format():
def gn_format():
print "gn format"
- exe = os.path.join(third_party_path, "depot_tools", "gn")
+ exe = get_buildtools_tool_path("gn")
source_files = git_ls_files(root_path, ["*.gn", "*.gni"])
run([exe, "format", "--"] + source_files, env=google_env(), quiet=True)
diff --git a/tools/lint.py b/tools/lint.py
index 29ed86fa9..61c6c59ce 100755
--- a/tools/lint.py
+++ b/tools/lint.py
@@ -4,7 +4,7 @@
import os
import sys
-from util import enable_ansi_colors, git_ls_files, root_path, run
+from util import enable_ansi_colors, git_ls_files, libdeno_path, root_path, run
from util import third_party_path
from third_party import python_env
@@ -20,14 +20,13 @@ def main():
def cpplint():
print "cpplint"
script = os.path.join(third_party_path, "cpplint", "cpplint.py")
- libdeno_dir = os.path.join(root_path, "core", "libdeno")
- source_files = git_ls_files(libdeno_dir, ["*.cc", "*.h"])
+ source_files = git_ls_files(libdeno_path, ["*.cc", "*.h"])
run([
sys.executable,
script,
"--quiet",
"--filter=-build/include_subdir",
- "--repository=" + libdeno_dir,
+ "--repository=" + libdeno_path,
"--",
] + source_files,
env=python_env(),
diff --git a/tools/setup.py b/tools/setup.py
index b8b9da324..aef65924d 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -6,8 +6,8 @@ import sys
from distutils.spawn import find_executable
import argparse
import third_party
-from util import build_mode, build_path, enable_ansi_colors, run, shell_quote
-from util import root_path, third_party_path
+from util import build_mode, build_path, enable_ansi_colors, libdeno_path
+from util import shell_quote, root_path, run, third_party_path
parser = argparse.ArgumentParser()
parser.add_argument(
@@ -49,15 +49,17 @@ def write_if_not_exists(filename, contents):
def write_lastchange():
+ lastchange_file = os.path.join(libdeno_path, "build", "util", "LASTCHANGE")
+ committime_file = lastchange_file + ".committime"
write_if_not_exists(
- "build/util/LASTCHANGE",
+ lastchange_file,
"LASTCHANGE=c42e4ddbb7973bfb0c57a49ab6bf6dc432baad7e-\n")
- write_if_not_exists("build/util/LASTCHANGE.committime", "1535518087")
+ write_if_not_exists(committime_file, "1535518087")
# TODO Properly we should call the following script, but it seems to cause
# a rebuild on every commit.
# run([
- # sys.executable, "build/util/lastchange.py", "-o",
- # "build/util/LASTCHANGE", "--source-dir", root_path, "--filter="
+ # sys.executable, "build/util/lastchange.py", "-o", lastchange_file,
+ # "--source-dir", root_path, "--filter="
# ])
@@ -146,7 +148,7 @@ def gn_exe():
if "DENO_GN_PATH" in os.environ:
return os.environ["DENO_GN_PATH"]
else:
- return os.path.join(third_party_path, "depot_tools", "gn")
+ return third_party.get_buildtools_tool_path("gn")
# gn gen.
@@ -175,7 +177,9 @@ def gn_gen(mode):
for line in gn_args:
print " " + line
- run([gn_exe(), "gen", build_path()], env=third_party.google_env())
+ run([gn_exe(), "gen", build_path()],
+ cwd=libdeno_path,
+ env=third_party.google_env())
if __name__ == '__main__':
diff --git a/tools/third_party.py b/tools/third_party.py
index bcac9a5b4..bdb5662af 100644
--- a/tools/third_party.py
+++ b/tools/third_party.py
@@ -7,10 +7,9 @@ import re
import site
import sys
from tempfile import mkdtemp
-from util import add_env_path, executable_suffix, make_env, rmtree, root_path
-from util import run, third_party_path
+from util import add_env_path, executable_suffix, libdeno_path, make_env, rmtree
+from util import root_path, run, third_party_path
-chromium_build_path = os.path.join(root_path, "build")
depot_tools_path = os.path.join(third_party_path, "depot_tools")
prebuilt_path = os.path.join(root_path, "prebuilt")
python_packages_path = os.path.join(third_party_path, "python_packages")
@@ -32,7 +31,8 @@ def python_env(env=None, merge_env=None):
python_site_env = {}
temp = os.environ["PATH"], sys.path
os.environ["PATH"], sys.path = "", []
- site.addsitedir(chromium_build_path) # Modifies PATH and sys.path.
+ site.addsitedir(os.path.join(libdeno_path,
+ "build")) # Modifies PATH and sys.path.
site.addsitedir(python_packages_path) # Modifies PATH and sys.path.
python_site_env = {"PATH": os.environ["PATH"], "PYTHONPATH": sys.path}
os.environ["PATH"], sys.path = temp
@@ -181,6 +181,11 @@ def get_prebuilt_tool_path(tool):
tool + executable_suffix)
+def get_buildtools_tool_path(tool):
+ return os.path.join(libdeno_path, "buildtools", get_platform_dir_name(),
+ tool + executable_suffix)
+
+
# Download the given item from Google storage.
def download_from_google_storage(item, bucket, base_dir):
download_script = os.path.join(depot_tools_path,
@@ -202,7 +207,7 @@ def download_from_google_storage(item, bucket, base_dir):
# Download the given item from Chrome Infrastructure Package Deployment.
def download_from_cipd(item, version):
cipd_exe = os.path.join(depot_tools_path, "cipd")
- download_dir = os.path.join(third_party_path, "v8", "buildtools",
+ download_dir = os.path.join(libdeno_path, "buildtools",
get_platform_dir_name())
if sys.platform == "win32":
@@ -239,9 +244,8 @@ def download_gn():
# Download clang-format from Google storage.
def download_clang_format():
- download_from_google_storage(
- "clang-format", "chromium-clang-format",
- os.path.join(third_party_path, "v8", "buildtools"))
+ download_from_google_storage("clang-format", "chromium-clang-format",
+ os.path.join(libdeno_path, "buildtools"))
def download_sccache():
@@ -254,13 +258,13 @@ def download_hyperfine():
# Download clang by calling the clang update script.
def download_clang():
- update_script = os.path.join(third_party_path, "v8", "tools", "clang",
+ update_script = os.path.join(libdeno_path, "v8", "tools", "clang",
"scripts", "update.py")
run([sys.executable, update_script], env=google_env())
def maybe_download_sysroot():
if sys.platform.startswith("linux"):
- install_script = os.path.join(chromium_build_path, "linux",
+ install_script = os.path.join(libdeno_path, "build", "linux",
"sysroot_scripts", "install-sysroot.py")
run([sys.executable, install_script, "--arch=amd64"], env=google_env())
diff --git a/tools/util.py b/tools/util.py
index 82465f865..93502b06d 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -20,6 +20,7 @@ else:
executable_suffix = ".exe" if os.name == "nt" else ""
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+libdeno_path = os.path.join(root_path, "core", "libdeno")
tests_path = os.path.join(root_path, "tests")
third_party_path = os.path.join(root_path, "third_party")
diff --git a/website/manual.md b/website/manual.md
index a3315eeec..1016aea65 100644
--- a/website/manual.md
+++ b/website/manual.md
@@ -204,16 +204,16 @@ ninja -C target/debug
cargo build --release
# List executable targets.
-gn ls target/debug //:* --as=output --type=executable
+gn --root=core/libdeno ls target/debug "//:*" --as=output --type=executable
# List build configuration.
-gn args target/debug/ --list
+gn --root=core/libdeno args target/debug/ --list
# Edit build configuration.
-gn args target/debug/
+gn --root=core/libdeno args target/debug/
# Describe a target.
-gn desc target/debug/ :deno
+gn --root=core/libdeno desc target/debug/ :deno
gn help
# Update third_party modules