forked from sheetjs/docs.sheetjs.com
		
	Windows ARM64 demo refresh
This commit is contained in:
		
							parent
							
								
									c1ea4ba7e1
								
							
						
					
					
						commit
						b0dbe7dc43
					
				| @ -153,7 +153,7 @@ | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String"></Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String"></Data></Cell> | ||||
|    </Row> | ||||
| @ -213,7 +213,7 @@ | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"/> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|     <Cell ss:StyleID="s16"><Data ss:Type="String">✔</Data></Cell> | ||||
|    </Row> | ||||
|  | ||||
| @ -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 | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win10-x64" label="Windows"> | ||||
|   <TabItem value="win10-x64" label="Intel Windows"> | ||||
| 
 | ||||
| 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". | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win11-arm" label="ARM64 Windows"> | ||||
| 
 | ||||
| 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". | ||||
| 
 | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| @ -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 .. | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win10-x64" label="Windows"> | ||||
|   <TabItem value="win10-x64" label="Intel Windows"> | ||||
| 
 | ||||
| :::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 . | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win11-arm" label="ARM64 Windows"> | ||||
| 
 | ||||
| :::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 . | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| @ -363,10 +423,23 @@ make | ||||
|   </TabItem> | ||||
|   <TabItem value="win" label="Windows"> | ||||
| 
 | ||||
| <Tabs groupId="triple"> | ||||
|   <TabItem value="win10-x64" label="Intel Windows"> | ||||
| 
 | ||||
| ``` | ||||
| cl sheetjs.ch.cpp ChakraCore.lib /I ChakraCore\lib\Jsrt /link /LIBPATH:ChakraCore\Build\VcBuild\bin\x64_debug | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win11-arm" label="ARM64 Windows"> | ||||
| 
 | ||||
| ``` | ||||
| cl sheetjs.ch.cpp ChakraCore.lib /I ChakraCore\lib\Jsrt /link /LIBPATH:ChakraCore\Build\VcBuild\bin\arm64_debug | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| 
 | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| 
 | ||||
| @ -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: | ||||
| 
 | ||||
| <Tabs groupId="os"> | ||||
|   <TabItem value="unix" label="Linux/MacOS"> | ||||
| 
 | ||||
| ```bash | ||||
| ./ch xlsx.chakra.js | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
|   <TabItem value="win" label="Windows"> | ||||
| 
 | ||||
| ```bash | ||||
| .\ch.exe xlsx.chakra.js | ||||
| ``` | ||||
| 
 | ||||
|   </TabItem> | ||||
| </Tabs> | ||||
| 
 | ||||
| [^1]: See ["Building ChakraCore"](https://github.com/chakra-core/ChakraCore/wiki/Building-ChakraCore#deployment) in the ChakraCore project wiki | ||||
| @ -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 | | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								docz/static/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
							
								
									
								
								
								
								
								
									
									
								
							
						
						
									
										
											BIN
										
									
								
								docz/static/favicon.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 34 KiB | 
		Loading…
	
		Reference in New Issue
	
	Block a user