-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README.md, UPDATE.md added. Fixes and tweaks. Ready for CI
- Loading branch information
1 parent
eb36682
commit 3b471e0
Showing
8 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
v8 | ||
.cipd | ||
.cipd | ||
build_results | ||
.gclient | ||
.gclient_entries | ||
.gclient_previous_sync_commits | ||
.gcs_entries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# V8 Build Tools | ||
|
||
This repository contains all the necessary tools and scripts to build Google's V8 for embedding. | ||
|
||
## Prerequisites | ||
|
||
1. **Clone this repository:** | ||
|
||
```sh | ||
git clone https://github.com/citizenfx/v8-build.git | ||
cd v8-build | ||
``` | ||
|
||
2. **Python 3.8+ must be installed on your system.** | ||
|
||
3. **Drive Mapping:** | ||
|
||
Ensure you do not have a drive mapped to the letter 'Y'. If you do, change the mapping drive target to another letter in the `prepare-depot.ps1` and `build.ps1` files. | ||
|
||
## Building V8 | ||
|
||
1. **Prepare the depot:** | ||
|
||
Run the following script to prepare the depot: | ||
|
||
```sh | ||
.\build\prepare-depot.ps1 | ||
``` | ||
|
||
2. **Build V8:** | ||
|
||
Run the build script: | ||
|
||
```sh | ||
.\build\build.ps1 | ||
``` | ||
|
||
3. **Wait approximately 20 minutes** for the build process to complete. | ||
|
||
## Build Results | ||
|
||
The build results will be located in the `builds_results` folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# In case if update needed | ||
## Things you need to know | ||
* There was bug in ICU script that generating ASM file with icudata for embedding. If it still generates ASM file with `icudata` variable that prefixed with `_` - bug still exists and clang compilation will fail. We are doing trick to remove underscore in build script | ||
* By default v8_monolith use static crt, so are forcing it to use dynamic CRT. Maybe with some time Google will fix it, so then you need to check flags with `gn args` and look for flag that forcing dynamic crt to be used. | ||
|
||
## How to update to newer V8 | ||
Simply put new commit hash/tag/branch from [V8 repository](https://github.com/v8/v8) into `target.txt`. It will be added to `git checkout` command |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 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" | ||
New-Item -ItemType Directory -Force -Path "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.debug" | ||
Copy-Item -Path "${MOUNT_TARGET_DRIVE}:\build\args_debug.gn" -Destination "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.debug\args.gn" | ||
Copy-Item -Path "${MOUNT_TARGET_DRIVE}:\build\args_release.gn" -Destination "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.release\args.gn" | ||
Set-Location "${MOUNT_TARGET_DRIVE}:\v8" | ||
git checkout $COMMIT | ||
gclient sync | ||
gn gen out.gn/x64.debug | ||
ninja -C out.gn/x64.debug -j16 v8_monolith | ||
|
||
gn gen out.gn/x64.release | ||
ninja -C out.gn/x64.release -j16 v8_monolith | ||
|
||
# Attempt to clean up and remove X: mapping at the end; ignore errors | ||
Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: /D" -ErrorAction SilentlyContinue |
File renamed without changes.
Submodule depot_tools
updated
from e13852 to 9a8c80