Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
prikolium-cfx committed May 15, 2024
0 parents commit ffa8381
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v8
.cipd
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "depot_tools"]
path = depot_tools
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git
16 changes: 16 additions & 0 deletions build/args.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
is_debug = false
target_cpu = "x64"
v8_static_library = true
v8_use_external_startup_data = false
v8_enable_i18n_support = true
v8_enable_webassembly = true
v8_monolithic = true
is_clang = false
is_component_build = false
#is_official_build = true
icu_use_data_file = false
icu_use_stub_data = true
v8_enable_pointer_compression = true
v8_enable_pointer_compression_shared_cage = true
v8_enable_31bit_smis_on_64bit_arch = true
cppgc_enable_caged_heap = true
16 changes: 16 additions & 0 deletions build/args_debug.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
is_debug = true
target_cpu = "x64"
v8_static_library = true
v8_use_external_startup_data = false
v8_enable_i18n_support = true
v8_enable_webassembly = true
v8_monolithic = true
is_clang = false
is_component_build = false
#is_official_build = true
icu_use_data_file = false
icu_use_stub_data = true
v8_enable_pointer_compression = true
v8_enable_pointer_compression_shared_cage = true
v8_enable_31bit_smis_on_64bit_arch = true
cppgc_enable_caged_heap = true
30 changes: 30 additions & 0 deletions build/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Define environment variables
$env:DEPOT_TOOLS_WIN_TOOLCHAIN = "0"

# Get the current directory of the script
$CURRENT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Path
Write-Host "Current directory: $CURRENT_DIR"

# Define the directory to be mounted
$MOUNT_DIR = Split-Path -Path $CURRENT_DIR -Parent
$MOUNT_TARGET_DRIVE = "Y"
Write-Host "Mount directory: $MOUNT_DIR"

Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: /D" -ErrorAction SilentlyContinue
Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: $MOUNT_DIR" -ErrorAction SilentlyContinue

# Reading target commit hash
$COMMIT = Get-Content "${MOUNT_TARGET_DRIVE}:\build\target_commit.txt " -Raw

# Fetch v8 source
& fetch v8
New-Item -ItemType Directory -Force -Path "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.release"
Copy-Item -Path "${MOUNT_TARGET_DRIVE}:\build\args_debug.gn" -Destination "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.release\"
Set-Location "${MOUNT_TARGET_DRIVE}:\v8"
git checkout $COMMIT
gclient sync
gn gen out.gn/x64.release
ninja -C out.gn/x64.release -j16 v8

# Attempt to clean up and remove X: mapping at the end; ignore errors
Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: /D" -ErrorAction SilentlyContinue
12 changes: 12 additions & 0 deletions build/prepare-depot.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$ErrorActionPreference = 'SilentlyContinue'

Set-Location -Path "..\depot_tools"

Remove-Item -Path ".cipd_bin", ".cipd_client_cache", ".versions", "external_bin" -Recurse -Force
Remove-Item -Path ".cipd_client.exe", "gclient_utils.pyc", "git-bash", "git.bat", "gitk.bat", "metrics.cfg", "python_bin_reldir.txt", "python.bat", "python3_bit_reldir.txt", "python3.bat", "ssh-keygen.bat", "sh.bat", "subrpocess2.pyc" -Force

Set-Location -Path "bootstrap"

& ".\win_tools.bat"

Set-Location -Path "..\..\build"
1 change: 1 addition & 0 deletions build/target_commit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
de611e69ad517c02d16bd1f9fd450b0d20379152
1 change: 1 addition & 0 deletions depot_tools
Submodule depot_tools added at e13852

0 comments on commit ffa8381

Please sign in to comment.