From 6b6bf20a579f4571204eb1b7837ecfa7640a353e Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:06:14 -0400 Subject: [PATCH 01/27] mv src --- .gitmodules | 2 +- build_overrides | 1 - buildtools | 1 - build => src/build | 0 src/build_overrides | 1 + src/buildtools | 1 + src/testing | 1 + {third_party => src/third_party}/depot_tools | 0 {third_party => src/third_party}/googletest | 0 {third_party => src/third_party}/llvm-build | 0 testing | 1 - {third_party => tools}/gclient_config.py | 0 12 files changed, 4 insertions(+), 4 deletions(-) delete mode 120000 build_overrides delete mode 120000 buildtools rename build => src/build (100%) create mode 120000 src/build_overrides create mode 120000 src/buildtools create mode 120000 src/testing rename {third_party => src/third_party}/depot_tools (100%) rename {third_party => src/third_party}/googletest (100%) rename {third_party => src/third_party}/llvm-build (100%) delete mode 120000 testing rename {third_party => tools}/gclient_config.py (100%) diff --git a/.gitmodules b/.gitmodules index d94f62c0a0..763487e217 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "depot_tools"] - path = third_party/depot_tools + path = src/third_party/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git diff --git a/build_overrides b/build_overrides deleted file mode 120000 index 5d2fd54688..0000000000 --- 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 5ae69d7fb0..0000000000 --- a/buildtools +++ /dev/null @@ -1 +0,0 @@ -third_party/v8/buildtools/ \ No newline at end of file diff --git a/build b/src/build similarity index 100% rename from build rename to src/build diff --git a/src/build_overrides b/src/build_overrides new file mode 120000 index 0000000000..3e199c0e10 --- /dev/null +++ b/src/build_overrides @@ -0,0 +1 @@ +third_party/v8/build_overrides \ No newline at end of file diff --git a/src/buildtools b/src/buildtools new file mode 120000 index 0000000000..25713c88ac --- /dev/null +++ b/src/buildtools @@ -0,0 +1 @@ +third_party/v8/buildtools \ No newline at end of file diff --git a/src/testing b/src/testing new file mode 120000 index 0000000000..ee58868150 --- /dev/null +++ b/src/testing @@ -0,0 +1 @@ +third_party/v8/testing \ No newline at end of file diff --git a/third_party/depot_tools b/src/third_party/depot_tools similarity index 100% rename from third_party/depot_tools rename to src/third_party/depot_tools diff --git a/third_party/googletest b/src/third_party/googletest similarity index 100% rename from third_party/googletest rename to src/third_party/googletest diff --git a/third_party/llvm-build b/src/third_party/llvm-build similarity index 100% rename from third_party/llvm-build rename to src/third_party/llvm-build diff --git a/testing b/testing deleted file mode 120000 index 79ec0ba0f6..0000000000 --- a/testing +++ /dev/null @@ -1 +0,0 @@ -third_party/v8/testing/ \ No newline at end of file diff --git a/third_party/gclient_config.py b/tools/gclient_config.py similarity index 100% rename from third_party/gclient_config.py rename to tools/gclient_config.py From e681c21b7595fa46ffa6bc153d0be0c8c5d16123 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:09:32 -0400 Subject: [PATCH 02/27] fix --- build.rs | 12 ++++++------ .gn => src/.gn | 0 BUILD.gn => src/BUILD.gn | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename .gn => src/.gn (100%) rename BUILD.gn => src/BUILD.gn (100%) diff --git a/build.rs b/build.rs index c41d99631e..c8a2f0d43f 100644 --- a/build.rs +++ b/build.rs @@ -25,7 +25,7 @@ fn main() { println!("cargo:warning=Not using sccache"); } - let gn_out = cargo_gn::maybe_gen(".", gn_args); + let gn_out = cargo_gn::maybe_gen("src", gn_args); assert!(gn_out.exists()); assert!(gn_out.join("args.gn").exists()); cargo_gn::build("rusty_v8"); @@ -54,22 +54,22 @@ fn git_submodule_update() { } fn gclient_sync() { - let gclient = Path::new("third_party/depot_tools/gclient.py"); + let third_party = PathBuf::new("src/third_party"); + let gclient_rel = PathBuf::new("depot_tools/gclient.py"); - if !gclient.exists() { + if !third_party.join(gclient_rel).exists() { git_submodule_update(); } - assert!(gclient.exists()); disable_depot_tools_update(); println!("cargo:warning=Running gclient sync to download V8. This could take a while."); let mut cmd = Command::new("python"); - cmd.arg("depot_tools/gclient.py"); + cmd.arg(gclient_rel); cmd.arg("sync"); cmd.arg("--gclientfile=gclient_config.py"); cmd.arg("--no-history"); cmd.arg("--shallow"); - cmd.current_dir("third_party"); + cmd.current_dir(third_party); let status = cmd.status().expect("gclient sync failed"); assert!(status.success()); } diff --git a/.gn b/src/.gn similarity index 100% rename from .gn rename to src/.gn diff --git a/BUILD.gn b/src/BUILD.gn similarity index 100% rename from BUILD.gn rename to src/BUILD.gn From 1f1d8dc33e369014e868d5ef26dea5f8323bd217 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:24:09 -0400 Subject: [PATCH 03/27] working locally --- build.rs | 29 +++++++++++++++++++++++------ env.bat | 3 --- src/third_party/gclient_config.py | 25 +++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 9 deletions(-) delete mode 100644 env.bat create mode 100644 src/third_party/gclient_config.py diff --git a/build.rs b/build.rs index c8a2f0d43f..92bb5d5571 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,7 @@ use cargo_gn; use std::env; use std::path::Path; +use std::path::PathBuf; use std::process::Command; use which::which; @@ -35,9 +36,10 @@ fn main() { } } +// TODO(ry) Remove fn disable_depot_tools_update() { Command::new("python") - .arg("third_party/depot_tools/update_depot_tools_toggle.py") + .arg("src/third_party/depot_tools/update_depot_tools_toggle.py") .arg("--disable") .status() .expect("update_depot_tools_toggle.py failed"); @@ -54,21 +56,36 @@ fn git_submodule_update() { } fn gclient_sync() { - let third_party = PathBuf::new("src/third_party"); - let gclient_rel = PathBuf::new("depot_tools/gclient.py"); + let third_party = PathBuf::from("src/third_party"); + let gclient_rel = PathBuf::from("depot_tools/gclient.py"); - if !third_party.join(gclient_rel).exists() { + if !third_party.join(&gclient_rel).exists() { git_submodule_update(); } disable_depot_tools_update(); - println!("cargo:warning=Running gclient sync to download V8. This could take a while."); + // Command::new(gclient config http://src.chromium.org/svn/trunk/src + + /* + let mut cmd = Command::new("depot_tools/gclient"); + cmd.arg("config"); + cmd.arg("--gclientfile=gclient_config.py"); + cmd.current_dir(third_party); + let status = cmd.status().expect("gclient sync failed"); + assert!(status.success()); + */ + + println!( + "cargo:warn=Running gclient sync to download V8. This could take a while." + ); + let mut cmd = Command::new("python"); cmd.arg(gclient_rel); cmd.arg("sync"); - cmd.arg("--gclientfile=gclient_config.py"); cmd.arg("--no-history"); cmd.arg("--shallow"); + cmd.env("DEPOT_TOOLS_UPDATE", "0"); + cmd.env("GCLIENT_FILE", "gclient_config.py"); cmd.current_dir(third_party); let status = cmd.status().expect("gclient sync failed"); assert!(status.success()); diff --git a/env.bat b/env.bat deleted file mode 100644 index 4855965e61..0000000000 --- a/env.bat +++ /dev/null @@ -1,3 +0,0 @@ -set DEPOT_TOOLS_WIN_TOOLCHAIN=0 -set PATH=%~dp0\goog\depot_tools;%PATH% -set RUSTFLAGS=-C target-feature=+crt-static -C linker=%~dp0goog\v8\third_party\llvm-build\Release+Asserts\bin\lld-link.exe diff --git a/src/third_party/gclient_config.py b/src/third_party/gclient_config.py new file mode 100644 index 0000000000..d6173ea910 --- /dev/null +++ b/src/third_party/gclient_config.py @@ -0,0 +1,25 @@ +solutions = [ + { + 'url': 'https://chromium.googlesource.com/v8/v8.git@7.9.317.12', + 'name': 'v8', + 'deps_file': 'DEPS', + 'custom_deps': { + # 'v8/build': None, + 'v8/third_party/catapult': None, + 'v8/third_party/colorama/src': None, + 'v8/testing/gmock': None, + 'v8/tools/swarming_client': None, + 'v8/tools/gyp': None, + 'v8/third_party/instrumented_libraries': None, + 'v8/third_party/android_tools': None, + # 'v8/third_party/depot_tools': None, + 'v8/test/wasm-js': None, + 'v8/test/benchmarks/data': None, + 'v8/test/mozilla/data': None, + 'v8/third_party/icu': None, + 'v8/test/test262/data': None, + 'v8/test/test262/harness': None, + 'v8/tools/luci-go': None + } + } +] From ff331aa64b98413928c178b1330e322dfd2f839f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:33:57 -0400 Subject: [PATCH 04/27] fix --- .gitignore | 6 +++--- build.rs | 18 ++++++------------ src/BUILD.gn | 8 ++++---- {tools => src/tools}/clang | 0 {tools => src/tools}/gclient_config.py | 0 5 files changed, 13 insertions(+), 19 deletions(-) rename {tools => src/tools}/clang (100%) rename {tools => src/tools}/gclient_config.py (100%) diff --git a/.gitignore b/.gitignore index b76c115fdc..c5850a7af2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /target **/*.rs.bk -/third_party/.cipd/ -/third_party/gclient_config.py_entries -/third_party/v8 +/src/third_party/.cipd/ +/src/third_party/gclient_config.py_entries +/src/third_party/v8/ diff --git a/build.rs b/build.rs index 92bb5d5571..2532f083a5 100644 --- a/build.rs +++ b/build.rs @@ -37,6 +37,7 @@ fn main() { } // TODO(ry) Remove +/* fn disable_depot_tools_update() { Command::new("python") .arg("src/third_party/depot_tools/update_depot_tools_toggle.py") @@ -44,6 +45,7 @@ fn disable_depot_tools_update() { .status() .expect("update_depot_tools_toggle.py failed"); } +*/ fn git_submodule_update() { println!("cargo:warning=Running git submodule update"); @@ -62,21 +64,11 @@ fn gclient_sync() { if !third_party.join(&gclient_rel).exists() { git_submodule_update(); } - disable_depot_tools_update(); - + // disable_depot_tools_update(); // Command::new(gclient config http://src.chromium.org/svn/trunk/src - /* - let mut cmd = Command::new("depot_tools/gclient"); - cmd.arg("config"); - cmd.arg("--gclientfile=gclient_config.py"); - cmd.current_dir(third_party); - let status = cmd.status().expect("gclient sync failed"); - assert!(status.success()); - */ - println!( - "cargo:warn=Running gclient sync to download V8. This could take a while." + "cargo:warning=Running gclient sync to download V8. This could take a while." ); let mut cmd = Command::new("python"); @@ -87,6 +79,8 @@ fn gclient_sync() { cmd.env("DEPOT_TOOLS_UPDATE", "0"); cmd.env("GCLIENT_FILE", "gclient_config.py"); cmd.current_dir(third_party); + + println!("running: {:?}", cmd); let status = cmd.status().expect("gclient sync failed"); assert!(status.success()); } diff --git a/src/BUILD.gn b/src/BUILD.gn index 8f372386a8..0e6a5aa357 100644 --- a/src/BUILD.gn +++ b/src/BUILD.gn @@ -3,10 +3,10 @@ import("//third_party/v8/gni/v8.gni") v8_static_library("rusty_v8") { sources = [ - "src/inspector/channel.cpp", - "src/inspector/client.cpp", - "src/platform/task.cpp", - "src/string_buffer.cpp", + "inspector/channel.cpp", + "inspector/client.cpp", + "platform/task.cpp", + "string_buffer.cpp", ] deps = [ "//build/config:shared_library_deps", diff --git a/tools/clang b/src/tools/clang similarity index 100% rename from tools/clang rename to src/tools/clang diff --git a/tools/gclient_config.py b/src/tools/gclient_config.py similarity index 100% rename from tools/gclient_config.py rename to src/tools/gclient_config.py From 198b396a3d45e3c174a12499195d05392576180a Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:42:32 -0400 Subject: [PATCH 05/27] undo disable --- build.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 2532f083a5..d5a65f1ff9 100644 --- a/build.rs +++ b/build.rs @@ -37,7 +37,6 @@ fn main() { } // TODO(ry) Remove -/* fn disable_depot_tools_update() { Command::new("python") .arg("src/third_party/depot_tools/update_depot_tools_toggle.py") @@ -45,7 +44,6 @@ fn disable_depot_tools_update() { .status() .expect("update_depot_tools_toggle.py failed"); } -*/ fn git_submodule_update() { println!("cargo:warning=Running git submodule update"); @@ -64,7 +62,7 @@ fn gclient_sync() { if !third_party.join(&gclient_rel).exists() { git_submodule_update(); } - // disable_depot_tools_update(); + disable_depot_tools_update(); // Command::new(gclient config http://src.chromium.org/svn/trunk/src println!( From 8c3afb8d342319bf9c82d229e06c300f53d1c2a7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:48:09 -0400 Subject: [PATCH 06/27] fix --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index d5a65f1ff9..d4a4808ba9 100644 --- a/build.rs +++ b/build.rs @@ -6,7 +6,7 @@ use std::process::Command; use which::which; fn main() { - if !Path::new("third_party/v8/src").is_dir() + if !Path::new("src/third_party/v8/src").is_dir() || env::var_os("GCLIENT_SYNC").is_some() { gclient_sync(); From 9506ca95bc5ab4d58de161ce3104aa92a66de452 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:51:07 -0400 Subject: [PATCH 07/27] verbose --- build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/build.rs b/build.rs index d4a4808ba9..c243fad486 100644 --- a/build.rs +++ b/build.rs @@ -74,6 +74,7 @@ fn gclient_sync() { cmd.arg("sync"); cmd.arg("--no-history"); cmd.arg("--shallow"); + cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); cmd.env("GCLIENT_FILE", "gclient_config.py"); cmd.current_dir(third_party); From e27cd5db6114b2c30b4b4e0c9d29a20e551d0bf6 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:51:41 -0400 Subject: [PATCH 08/27] try running git --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 198ebb7829..0fefa0ebf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,7 +76,9 @@ jobs: run: sccache --start-server - name: Build - run: cargo build -vv --release --locked --all-targets + run: | + git status + cargo build -vv --release --locked --all-targets - name: Test if: matrix.kind == 'test' From 49fcdcb4f24f6449ca80f384b2755e9a048df301 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 21:59:16 -0400 Subject: [PATCH 09/27] try without shallow --- .github/workflows/ci.yml | 2 +- build.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fefa0ebf8..06bfaede6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,7 +77,7 @@ jobs: - name: Build run: | - git status + git --version cargo build -vv --release --locked --all-targets - name: Test diff --git a/build.rs b/build.rs index c243fad486..fb40fe77bb 100644 --- a/build.rs +++ b/build.rs @@ -73,7 +73,7 @@ fn gclient_sync() { cmd.arg(gclient_rel); cmd.arg("sync"); cmd.arg("--no-history"); - cmd.arg("--shallow"); + // cmd.arg("--shallow"); cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); cmd.env("GCLIENT_FILE", "gclient_config.py"); From 621915d8b6cd1782250850686328b3ec14e4264f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:01:15 -0400 Subject: [PATCH 10/27] full path --- build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index fb40fe77bb..7f1eb04373 100644 --- a/build.rs +++ b/build.rs @@ -56,7 +56,8 @@ fn git_submodule_update() { } fn gclient_sync() { - let third_party = PathBuf::from("src/third_party"); + let root = env::current_dir().unwrap(); + let third_party = root.join("src/third_party"); let gclient_rel = PathBuf::from("depot_tools/gclient.py"); if !third_party.join(&gclient_rel).exists() { @@ -76,7 +77,7 @@ fn gclient_sync() { // cmd.arg("--shallow"); cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); - cmd.env("GCLIENT_FILE", "gclient_config.py"); + cmd.env("GCLIENT_FILE", third_party.join("gclient_config.py")); cmd.current_dir(third_party); println!("running: {:?}", cmd); From 96fa942d8ea1a2d3487091b886866eb8149d60f4 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:08:01 -0400 Subject: [PATCH 11/27] DEPOT_TOOLS_WIN_TOOLCHAIN --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 7f1eb04373..f323caa34e 100644 --- a/build.rs +++ b/build.rs @@ -71,6 +71,7 @@ fn gclient_sync() { ); let mut cmd = Command::new("python"); + cmd.current_dir(third_party); cmd.arg(gclient_rel); cmd.arg("sync"); cmd.arg("--no-history"); @@ -78,7 +79,8 @@ fn gclient_sync() { cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); cmd.env("GCLIENT_FILE", third_party.join("gclient_config.py")); - cmd.current_dir(third_party); + // We're not using Google's internal infrastructure. + cmd.env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0"); println!("running: {:?}", cmd); let status = cmd.status().expect("gclient sync failed"); From e473f524182eb1c05216e15edcbbb61f9791de37 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:08:45 -0400 Subject: [PATCH 12/27] remove windows from ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06bfaede6c..14509d114a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - os: [macOS-10.14, windows-2019, ubuntu-16.04] + os: [macOS-10.14, ubuntu-16.04] # TODO(ry) windows-2019 steps: - name: Configure git run: git config --global core.symlinks true From 688afebe1e4b1a1cb4424025eb7d7202cbf584a0 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:14:08 -0400 Subject: [PATCH 13/27] fix --- build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index f323caa34e..fa8fe6329a 100644 --- a/build.rs +++ b/build.rs @@ -71,8 +71,8 @@ fn gclient_sync() { ); let mut cmd = Command::new("python"); - cmd.current_dir(third_party); - cmd.arg(gclient_rel); + cmd.current_dir(&third_party); + cmd.arg(&gclient_rel); cmd.arg("sync"); cmd.arg("--no-history"); // cmd.arg("--shallow"); From f151e563c2c980828abd89566399f03ecf0734ec Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:17:00 -0400 Subject: [PATCH 14/27] badge --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6d8e7526a9..dfee7c28f6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ +# rusty_v8 + +[![Build Status](https://github.com/denoland/rusty_v8/workflows/ci/badge.svg?branch=master)](https://github.com/denoland/rusty_v8/actions) + This is a project to replace libdeno with a full V8 binding. It's very much under construction and not usable. I'll update this message if it ever is. From 608bb78a139407ad9c8f555e0460769641ab0c2d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:27:16 -0400 Subject: [PATCH 15/27] change depot_tools version --- src/third_party/depot_tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/third_party/depot_tools b/src/third_party/depot_tools index acf922ce48..ba97f6065e 160000 --- a/src/third_party/depot_tools +++ b/src/third_party/depot_tools @@ -1 +1 @@ -Subproject commit acf922ce48cfd1ecf88582d9dbecf14e8d1fe369 +Subproject commit ba97f6065ed1e9336585468dd85e680cf09d5166 From e565ac68e273e89502057e4e36346e1dd7e0ba2f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:28:24 -0400 Subject: [PATCH 16/27] bring back --shallow --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index fa8fe6329a..dd0bb3e646 100644 --- a/build.rs +++ b/build.rs @@ -75,7 +75,7 @@ fn gclient_sync() { cmd.arg(&gclient_rel); cmd.arg("sync"); cmd.arg("--no-history"); - // cmd.arg("--shallow"); + cmd.arg("--shallow"); cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); cmd.env("GCLIENT_FILE", third_party.join("gclient_config.py")); From 3775d83923e3feba3a4ff220bc46ce959ad1d627 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:40:03 -0400 Subject: [PATCH 17/27] DEPOT_TOOLS_METRICS=0 --- build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/build.rs b/build.rs index dd0bb3e646..ac3ea39dce 100644 --- a/build.rs +++ b/build.rs @@ -78,6 +78,7 @@ fn gclient_sync() { cmd.arg("--shallow"); cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); + cmd.env("DEPOT_TOOLS_METRICS", "0"); cmd.env("GCLIENT_FILE", third_party.join("gclient_config.py")); // We're not using Google's internal infrastructure. cmd.env("DEPOT_TOOLS_WIN_TOOLCHAIN", "0"); From 1d3942b0c5990653b22d07da2575740c0256a424 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:46:07 -0400 Subject: [PATCH 18/27] update path --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14509d114a..6c6ab61719 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,8 +46,7 @@ jobs: curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz tar -xzvf sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz echo ::add-path::`pwd`/sccache-0.2.12-x86_64-unknown-linux-musl/ - echo ::add-path::`pwd`/third_party/sscache/linux64 - echo ::add-path::`pwd`/target/release + echo ::add-path::`pwd`/src/third_party/depot_tools/ - name: Environment (mac) if: startsWith(matrix.os, 'macOS') @@ -55,6 +54,7 @@ jobs: curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-apple-darwin.tar.gz tar -xzvf sccache-0.2.12-x86_64-apple-darwin.tar.gz echo ::add-path::`pwd`/sccache-0.2.12-x86_64-apple-darwin/ + echo ::add-path::`pwd`/src/third_party/depot_tools/ - name: Environment (windows) if: startsWith(matrix.os, 'windows') @@ -65,7 +65,7 @@ jobs: curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz tar -zxvf sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz echo ::add-path::$(pwd)\sccache-0.2.12-x86_64-pc-windows-msvc\ - echo ::add-path::$(pwd)\target\release + echo ::add-path::$(pwd)\src\third_party\depot_tools\ - name: Start sccache env: From d7ba8a11ab64ccb6854d4f1faad137fef77a5b23 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:53:29 -0400 Subject: [PATCH 19/27] turn off --verbose --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index ac3ea39dce..ab62d3b86d 100644 --- a/build.rs +++ b/build.rs @@ -76,7 +76,7 @@ fn gclient_sync() { cmd.arg("sync"); cmd.arg("--no-history"); cmd.arg("--shallow"); - cmd.arg("--verbose"); + // cmd.arg("--verbose"); cmd.env("DEPOT_TOOLS_UPDATE", "0"); cmd.env("DEPOT_TOOLS_METRICS", "0"); cmd.env("GCLIENT_FILE", third_party.join("gclient_config.py")); From 6838cb197903044440fc6c4393e2852dbbe285b7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 22:57:20 -0400 Subject: [PATCH 20/27] move everything back to root --- .github/workflows/ci.yml | 6 +++--- .gitignore | 6 +++--- .gitmodules | 2 +- src/.gn => .gn | 0 src/BUILD.gn => BUILD.gn | 8 ++++---- src/build => build | 0 build.rs | 8 ++++---- build_overrides | 1 + buildtools | 1 + src/build_overrides | 1 - src/buildtools | 1 - src/testing => testing | 0 {src/third_party => third_party}/depot_tools | 0 {src/third_party => third_party}/gclient_config.py | 0 {src/third_party => third_party}/googletest | 0 {src/third_party => third_party}/llvm-build | 0 {src/tools => tools}/clang | 0 {src/tools => tools}/gclient_config.py | 0 18 files changed, 17 insertions(+), 17 deletions(-) rename src/.gn => .gn (100%) rename src/BUILD.gn => BUILD.gn (89%) rename src/build => build (100%) create mode 120000 build_overrides create mode 120000 buildtools delete mode 120000 src/build_overrides delete mode 120000 src/buildtools rename src/testing => testing (100%) rename {src/third_party => third_party}/depot_tools (100%) rename {src/third_party => third_party}/gclient_config.py (100%) rename {src/third_party => third_party}/googletest (100%) rename {src/third_party => third_party}/llvm-build (100%) rename {src/tools => tools}/clang (100%) rename {src/tools => tools}/gclient_config.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c6ab61719..85c3c6be22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz tar -xzvf sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz echo ::add-path::`pwd`/sccache-0.2.12-x86_64-unknown-linux-musl/ - echo ::add-path::`pwd`/src/third_party/depot_tools/ + echo ::add-path::`pwd`/third_party/depot_tools/ - name: Environment (mac) if: startsWith(matrix.os, 'macOS') @@ -54,7 +54,7 @@ jobs: curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-apple-darwin.tar.gz tar -xzvf sccache-0.2.12-x86_64-apple-darwin.tar.gz echo ::add-path::`pwd`/sccache-0.2.12-x86_64-apple-darwin/ - echo ::add-path::`pwd`/src/third_party/depot_tools/ + echo ::add-path::`pwd`/third_party/depot_tools/ - name: Environment (windows) if: startsWith(matrix.os, 'windows') @@ -65,7 +65,7 @@ jobs: curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz tar -zxvf sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz echo ::add-path::$(pwd)\sccache-0.2.12-x86_64-pc-windows-msvc\ - echo ::add-path::$(pwd)\src\third_party\depot_tools\ + echo ::add-path::$(pwd)\third_party\depot_tools\ - name: Start sccache env: diff --git a/.gitignore b/.gitignore index c5850a7af2..aadc2094d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /target **/*.rs.bk -/src/third_party/.cipd/ -/src/third_party/gclient_config.py_entries -/src/third_party/v8/ +/third_party/.cipd/ +/third_party/gclient_config.py_entries +/third_party/v8/ diff --git a/.gitmodules b/.gitmodules index 763487e217..d94f62c0a0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "depot_tools"] - path = src/third_party/depot_tools + path = third_party/depot_tools url = https://chromium.googlesource.com/chromium/tools/depot_tools.git diff --git a/src/.gn b/.gn similarity index 100% rename from src/.gn rename to .gn diff --git a/src/BUILD.gn b/BUILD.gn similarity index 89% rename from src/BUILD.gn rename to BUILD.gn index 0e6a5aa357..8f372386a8 100644 --- a/src/BUILD.gn +++ b/BUILD.gn @@ -3,10 +3,10 @@ import("//third_party/v8/gni/v8.gni") v8_static_library("rusty_v8") { sources = [ - "inspector/channel.cpp", - "inspector/client.cpp", - "platform/task.cpp", - "string_buffer.cpp", + "src/inspector/channel.cpp", + "src/inspector/client.cpp", + "src/platform/task.cpp", + "src/string_buffer.cpp", ] deps = [ "//build/config:shared_library_deps", diff --git a/src/build b/build similarity index 100% rename from src/build rename to build diff --git a/build.rs b/build.rs index ab62d3b86d..443012d900 100644 --- a/build.rs +++ b/build.rs @@ -6,7 +6,7 @@ use std::process::Command; use which::which; fn main() { - if !Path::new("src/third_party/v8/src").is_dir() + if !Path::new("third_party/v8/src").is_dir() || env::var_os("GCLIENT_SYNC").is_some() { gclient_sync(); @@ -26,7 +26,7 @@ fn main() { println!("cargo:warning=Not using sccache"); } - let gn_out = cargo_gn::maybe_gen("src", gn_args); + let gn_out = cargo_gn::maybe_gen(".", gn_args); assert!(gn_out.exists()); assert!(gn_out.join("args.gn").exists()); cargo_gn::build("rusty_v8"); @@ -39,7 +39,7 @@ fn main() { // TODO(ry) Remove fn disable_depot_tools_update() { Command::new("python") - .arg("src/third_party/depot_tools/update_depot_tools_toggle.py") + .arg("third_party/depot_tools/update_depot_tools_toggle.py") .arg("--disable") .status() .expect("update_depot_tools_toggle.py failed"); @@ -57,7 +57,7 @@ fn git_submodule_update() { fn gclient_sync() { let root = env::current_dir().unwrap(); - let third_party = root.join("src/third_party"); + let third_party = root.join("third_party"); let gclient_rel = PathBuf::from("depot_tools/gclient.py"); if !third_party.join(&gclient_rel).exists() { diff --git a/build_overrides b/build_overrides new file mode 120000 index 0000000000..5d2fd54688 --- /dev/null +++ b/build_overrides @@ -0,0 +1 @@ +third_party/v8/build_overrides/ \ No newline at end of file diff --git a/buildtools b/buildtools new file mode 120000 index 0000000000..5ae69d7fb0 --- /dev/null +++ b/buildtools @@ -0,0 +1 @@ +third_party/v8/buildtools/ \ No newline at end of file diff --git a/src/build_overrides b/src/build_overrides deleted file mode 120000 index 3e199c0e10..0000000000 --- a/src/build_overrides +++ /dev/null @@ -1 +0,0 @@ -third_party/v8/build_overrides \ No newline at end of file diff --git a/src/buildtools b/src/buildtools deleted file mode 120000 index 25713c88ac..0000000000 --- a/src/buildtools +++ /dev/null @@ -1 +0,0 @@ -third_party/v8/buildtools \ No newline at end of file diff --git a/src/testing b/testing similarity index 100% rename from src/testing rename to testing diff --git a/src/third_party/depot_tools b/third_party/depot_tools similarity index 100% rename from src/third_party/depot_tools rename to third_party/depot_tools diff --git a/src/third_party/gclient_config.py b/third_party/gclient_config.py similarity index 100% rename from src/third_party/gclient_config.py rename to third_party/gclient_config.py diff --git a/src/third_party/googletest b/third_party/googletest similarity index 100% rename from src/third_party/googletest rename to third_party/googletest diff --git a/src/third_party/llvm-build b/third_party/llvm-build similarity index 100% rename from src/third_party/llvm-build rename to third_party/llvm-build diff --git a/src/tools/clang b/tools/clang similarity index 100% rename from src/tools/clang rename to tools/clang diff --git a/src/tools/gclient_config.py b/tools/gclient_config.py similarity index 100% rename from src/tools/gclient_config.py rename to tools/gclient_config.py From 202c3916ec95fd8a32d3b522ce3e125a4c596150 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:01:26 -0400 Subject: [PATCH 21/27] gn_root should be absolute --- build.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 443012d900..5815d5eb17 100644 --- a/build.rs +++ b/build.rs @@ -26,7 +26,14 @@ fn main() { println!("cargo:warning=Not using sccache"); } - let gn_out = cargo_gn::maybe_gen(".", gn_args); + // gn_root should be absolute. + let gn_root = env::current_dir() + .unwrap() + .into_os_string() + .into_string() + .unwrap();; + + let gn_out = cargo_gn::maybe_gen(gn_root, gn_args); assert!(gn_out.exists()); assert!(gn_out.join("args.gn").exists()); cargo_gn::build("rusty_v8"); From 0d6c0bc98daea7d233cadf01e6ec1de4d9da35c3 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:07:10 -0400 Subject: [PATCH 22/27] try jinja2 symlink --- third_party/jinja2 | 1 + 1 file changed, 1 insertion(+) create mode 120000 third_party/jinja2 diff --git a/third_party/jinja2 b/third_party/jinja2 new file mode 120000 index 0000000000..678f5812e5 --- /dev/null +++ b/third_party/jinja2 @@ -0,0 +1 @@ +v8/third_party/jinja2/ \ No newline at end of file From fad3eedc6b55a5653dbdb98f1bd856296e6c4803 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:07:28 -0400 Subject: [PATCH 23/27] ci: only push --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85c3c6be22..39f42023e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: ci -on: [pull_request] # TODO(ry) [push, pull_request] +on: [push] # TODO(ry) [push, pull_request] jobs: build: From 54a46359766526f89e1047628e7d8994f6b560b2 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:26:09 -0400 Subject: [PATCH 24/27] fix --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 5815d5eb17..ee204cb299 100644 --- a/build.rs +++ b/build.rs @@ -33,7 +33,7 @@ fn main() { .into_string() .unwrap();; - let gn_out = cargo_gn::maybe_gen(gn_root, gn_args); + let gn_out = cargo_gn::maybe_gen(&gn_root, gn_args); assert!(gn_out.exists()); assert!(gn_out.join("args.gn").exists()); cargo_gn::build("rusty_v8"); From 225ed0606d821e7bab30fce4ad0ad64d9d768651 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:33:24 -0400 Subject: [PATCH 25/27] markupsafe --- third_party/markupsafe | 1 + 1 file changed, 1 insertion(+) create mode 120000 third_party/markupsafe diff --git a/third_party/markupsafe b/third_party/markupsafe new file mode 120000 index 0000000000..e4779e1295 --- /dev/null +++ b/third_party/markupsafe @@ -0,0 +1 @@ +v8/third_party/markupsafe/ \ No newline at end of file From 9261e9af55dd464402e0535ab9914c5bf2abf647 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:44:21 -0400 Subject: [PATCH 26/27] clippy fix --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39f42023e0..96c1d849c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,8 +81,9 @@ jobs: cargo build -vv --release --locked --all-targets - name: Test - if: matrix.kind == 'test' run: cargo test -vv --release --locked --all-targets - name: Clippy - run: cargo clippy --all-targets --release --locked -- -D clippy::all + run: | + rustup component add clippy + cargo clippy --all-targets --release --locked -- -D clippy::all From e31d052b0a1ae1303d9c0447cbd31bcf9011b0c1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 31 Oct 2019 23:55:28 -0400 Subject: [PATCH 27/27] Update AWS_SECRET_ACCESS_KEY --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96c1d849c2..8c7727226f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: - name: Start sccache env: - AWS_ACCESS_KEY_ID: AKIAIVRN52PLDBP55LBQ + AWS_ACCESS_KEY_ID: AKIA6QEJVNZDGHRMR2KF AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} SCCACHE_BUCKET: deno-sccache SCCACHE_IDLE_TIMEOUT: 0