From 482e83bc78a8efc96584da1bb5c129aba4ecbbc1 Mon Sep 17 00:00:00 2001 From: Gaurav Gautam Date: Sat, 18 Mar 2023 00:57:50 +0530 Subject: [PATCH 1/5] How to build and find stable branch --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88f6cd0..f1426eb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,67 @@ -### d8 build scripts +## d8 build scripts The repository is part of the [Compiler Explorer](https://godbolt.org/) project. It builds the docker images used to build the d8 runtime/compiler/tooling used on the site. + +### Using the Dockerfile to make a d8 build locally + +You need to have docker installed on your machine. If you do not have docker installed you can +get it from [here](https://docs.docker.com/engine/install/) + +After doing this, run the following command in the root directory of this repository: + +``` +docker build -t d8:trunk . +``` +This will create a container in your machine named `d8:trunk` + +You can check if the container has been built by running the following command: +``` +docker images +``` +You should see the image listed as follows: +``` +REPOSITORY TAG IMAGE ID CREATED SIZE +d8 trunk fcd7f69f0e42 3 weeks ago 8.31GB +``` + +Once you have this, you can run a container with this image using the following command: +``` +docker run -d -t d8:trunk +``` + +You can see the running container by running the following command: +``` +docker ps +``` + +You will see something like this: +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +cfdab51b3818 d8:trunk "fish" About a minute ago Up About a minute compassionate_lamport +``` + +You can then open a shell inside this container using: +``` +docker exec -it cfdab51b3818 fish +``` + +You can then build the d8 executable inside the container by running the following commands +``` +cd /root/v8 +python ./tools/dev/gm.py x64.release +``` + +After this you will see that the d8 executale is present in /root/v8/out/x64.release + +You can then start a d8 shell by running the following command + +``` +cd /root/v8/out/x64.release +./d8 +``` + +### Which version of d8 is the latest +According to [this blogpost](https://v8.dev/docs/release-process) on v8's blog, the release process of v8 is coupled with chrome. You +probably want the latest version of d8 that is associated with the latest chrome release. To find this version you have to look at [OmahaProxy](https://omahaproxy.appspot.com/). +If you are using this container you want the stable branch for linux. Look at the the column `true branch` in the table and get the number corresponding to `linux` and `stable` channel. At the time of writing this, the number is `5563`. So the branch you want to checkout is `chromium/5563`. From 1e95bbab2879a56a7285e41ff73a6ed2db43c733 Mon Sep 17 00:00:00 2001 From: Gaurav Gautam Date: Sun, 19 Mar 2023 09:13:28 +0530 Subject: [PATCH 2/5] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f1426eb..2a4d5fc 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ cd /root/v8/out/x64.release ``` ### Which version of d8 is the latest -According to [this blogpost](https://v8.dev/docs/release-process) on v8's blog, the release process of v8 is coupled with chrome. You -probably want the latest version of d8 that is associated with the latest chrome release. To find this version you have to look at [OmahaProxy](https://omahaproxy.appspot.com/). -If you are using this container you want the stable branch for linux. Look at the the column `true branch` in the table and get the number corresponding to `linux` and `stable` channel. At the time of writing this, the number is `5563`. So the branch you want to checkout is `chromium/5563`. +To get the latest version of v8 you can list the branches that start with `branch-heads`. You can use this command to get the latest version: +``` +git branch -a | grep remotes/branch-heads | awk -F/ '{print $NF}' | sort -t. -k1,1n +r -k2,2nr -k3,3nr | head -n1 +``` From c6ac98f9a9fa054c29172a79fed11e834a9f522d Mon Sep 17 00:00:00 2001 From: Gaurav Gautam Date: Mon, 20 Mar 2023 18:30:49 +0530 Subject: [PATCH 3/5] Fix command to list version and modify shell command --- README.md | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 2a4d5fc..744ee82 100644 --- a/README.md +++ b/README.md @@ -25,25 +25,10 @@ REPOSITORY TAG IMAGE ID CREATED SIZE d8 trunk fcd7f69f0e42 3 weeks ago 8.31GB ``` -Once you have this, you can run a container with this image using the following command: +Once you have this, you can run a container with this image using the following command, which +will drop you into a shell inside the container ``` -docker run -d -t d8:trunk -``` - -You can see the running container by running the following command: -``` -docker ps -``` - -You will see something like this: -``` -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -cfdab51b3818 d8:trunk "fish" About a minute ago Up About a minute compassionate_lamport -``` - -You can then open a shell inside this container using: -``` -docker exec -it cfdab51b3818 fish +docker run --rm -it d8:trunk bash ``` You can then build the d8 executable inside the container by running the following commands @@ -64,6 +49,5 @@ cd /root/v8/out/x64.release ### Which version of d8 is the latest To get the latest version of v8 you can list the branches that start with `branch-heads`. You can use this command to get the latest version: ``` -git branch -a | grep remotes/branch-heads | awk -F/ '{print $NF}' | sort -t. -k1,1n -r -k2,2nr -k3,3nr | head -n1 + git branch -a | grep remotes/branch-heads | awk -F/ '{print $NF}' | sort -t. -k1,1nr -k2,2nr -k3,3nr | head -n1 ``` From aebfb7be379428bda99b38d41aaa5a017c61b92b Mon Sep 17 00:00:00 2001 From: Gaurav Gautam Date: Mon, 20 Mar 2023 18:33:24 +0530 Subject: [PATCH 4/5] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 744ee82..9906f51 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,7 @@ REPOSITORY TAG IMAGE ID CREATED SIZE d8 trunk fcd7f69f0e42 3 weeks ago 8.31GB ``` -Once you have this, you can run a container with this image using the following command, which -will drop you into a shell inside the container +Once you have this, you can start a shell with this image using the following command. ``` docker run --rm -it d8:trunk bash ``` From 0ab46269f82a76cf4c06c6ea35e3d1a09e8868a5 Mon Sep 17 00:00:00 2001 From: Gaurav Gautam Date: Mon, 20 Mar 2023 19:09:38 +0530 Subject: [PATCH 5/5] Add linebreak in command --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9906f51..c0ea691 100644 --- a/README.md +++ b/README.md @@ -48,5 +48,6 @@ cd /root/v8/out/x64.release ### Which version of d8 is the latest To get the latest version of v8 you can list the branches that start with `branch-heads`. You can use this command to get the latest version: ``` - git branch -a | grep remotes/branch-heads | awk -F/ '{print $NF}' | sort -t. -k1,1nr -k2,2nr -k3,3nr | head -n1 + git branch -a | grep remotes/branch-heads | awk -F/ '{print $NF}' \ + | sort -t. -k1,1nr -k2,2nr -k3,3nr | head -n1 ```