diff --git a/docz/data/engines.xls b/docz/data/engines.xls index ac6df1a..7ee0540 100644 --- a/docz/data/engines.xls +++ b/docz/data/engines.xls @@ -153,7 +153,7 @@ - + @@ -213,7 +213,7 @@ - + diff --git a/docz/docs/03-demos/42-engines/20-chakra.md b/docz/docs/03-demos/42-engines/20-chakra.md index 7450000..6945f75 100644 --- a/docz/docs/03-demos/42-engines/20-chakra.md +++ b/docz/docs/03-demos/42-engines/20-chakra.md @@ -135,6 +135,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `c3ead3f` | 2024-03-15 | | `darwin-arm` | `3a7b120` | 2024-05-23 | | `win10-x64` | `c3ead3f` | 2024-03-04 | +| `win11-arm` | `13358c6` | 2024-07-14 | | `linux-x64` | `1f6e17c` | 2024-04-25 | ::: @@ -165,12 +166,20 @@ sudo pacman -S cmake clang ``` - + Install Visual Studio 2022 with the "Desktop Development with C++" workflow and the "Git for Windows" individual component. -All commands in this demo should be run in a "Native Tools Command Prompt". +The commands in this demo should be run in "Native Tools Command Prompt". + + + + +Install Visual Studio 2022 with the "Desktop Development with C++" workflow and +the "Git for Windows" individual component. + +The commands in this demo should be run in "ARM64 Native Tools Command Prompt". @@ -180,7 +189,7 @@ All commands in this demo should be run in a "Native Tools Command Prompt". ```bash git clone https://github.com/chakra-core/ChakraCore.git cd ChakraCore -git checkout 3a7b120 +git checkout 13358c6 cd .. ``` @@ -265,7 +274,7 @@ cd .. ``` - + :::info pass @@ -318,6 +327,57 @@ After building, the generated DLL should be copied into the project folder: ``` copy .\ChakraCore\Build\VcBuild\bin\x64_debug\ChakraCore.dll . +``` + + + + +:::info pass + +As explained in the ChakraCore project wiki[^1], the build accepts a few flags: + +- `/p:Platform=arm64` controls the architecture +- `/p:Configuration=Debug` enables runtime checks +- `/p:RuntimeLib=static_library` ensures MSVC libraries are statically linked + +::: + +``` +cd ChakraCore +msbuild /m /p:Platform=arm64 /p:Configuration=Debug /p:RuntimeLib=static_library Build\Chakra.Core.sln +cd .. +``` + +:::caution pass + +During some test runs, the build failed with a message referencing `LegalizeMD.cpp`: + +``` + ...\ChakraCore\lib\Backend\arm64\LegalizeMD.cpp(323,16): warning C1489: 'fPostRegAlloc': local variable is initialized but not referenced [...] +``` + +The source file `lib\Backend\arm64\LegalizeMD.cpp` must be patched. The +highlighted line must be commented: + +```cpp title="lib\Backend\arm64\LegalizeMD.cpp (comment highlighted line)" +void LegalizeMD::LegalizeIndirOffset(IR::Instr * instr, IR::IndirOpnd * indirOpnd, LegalForms forms) +{ +// highlight-next-line + //const bool fPostRegAlloc = instr->m_func->ShouldLegalizePostRegAlloc(); + + // For LEA, we have special handling of indiropnds + auto correctSize = [](IR::Instr* instr, IR::IndirOpnd* indirOpnd)#if defined(_UCRT) && _CONTROL_FLOW_GUARD +``` + +After commenting the line, run the command again. + +::: + + +After building, the generated DLL should be copied into the project folder: + +``` +copy .\ChakraCore\Build\VcBuild\bin\arm64_debug\ChakraCore.dll . ``` @@ -363,10 +423,23 @@ make + + + ``` cl sheetjs.ch.cpp ChakraCore.lib /I ChakraCore\lib\Jsrt /link /LIBPATH:ChakraCore\Build\VcBuild\bin\x64_debug ``` + + + +``` +cl sheetjs.ch.cpp ChakraCore.lib /I ChakraCore\lib\Jsrt /link /LIBPATH:ChakraCore\Build\VcBuild\bin\arm64_debug +``` + + + + @@ -411,7 +484,7 @@ If successful, the program will print the contents of the first sheet as CSV. :::note Tested Deployments -This demo was last tested on 2024-05-23 against `ch` commit `3a7b120`. +This demo was last tested on 2024-07-14 against `ch` commit `13358c6`. ::: @@ -474,10 +547,29 @@ cat global.js xlsx.full.min.js payload.js chakra.js > xlsx.chakra.js The final script defines `global` before loading the standalone library. Once ready, it will read the bundled test data and print the contents as CSV. +:::note pass + +On Windows, the command should be run in WSL. + +::: + 5) Run the script using the ChakraCore standalone binary: + + + ```bash ./ch xlsx.chakra.js ``` + + + +```bash +.\ch.exe xlsx.chakra.js +``` + + + + [^1]: See ["Building ChakraCore"](https://github.com/chakra-core/ChakraCore/wiki/Building-ChakraCore#deployment) in the ChakraCore project wiki \ No newline at end of file diff --git a/docz/docs/03-demos/42-engines/26-jurassic.md b/docz/docs/03-demos/42-engines/26-jurassic.md index 92a7c7f..a2315fc 100644 --- a/docz/docs/03-demos/42-engines/26-jurassic.md +++ b/docz/docs/03-demos/42-engines/26-jurassic.md @@ -179,6 +179,7 @@ This demo was tested in the following deployments: | `darwin-x64` | `3.2.7` | 2024-06-15 | | `darwin-arm` | `3.2.7` | 2024-06-15 | | `win10-x64` | `3.2.7` | 2024-06-21 | +| `win11-arm` | `3.2.7` | 2024-07-14 | | `linux-x64` | `3.2.7` | 2024-06-20 | | `linux-arm` | `3.2.7` | 2024-06-20 | diff --git a/docz/static/favicon.ico b/docz/static/favicon.ico new file mode 100644 index 0000000..302f67a Binary files /dev/null and b/docz/static/favicon.ico differ