You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -139,7 +139,7 @@ To build your CMake project binaries as Arm64X, you can use any version of [CMak
139
139
140
140
If you need to use an older linker, copy the below snippet instead. This route uses an older flag [/LINK_REPRO](/cpp/build/reference/linkrepro). Using the /LINK_REPRO route will result in a slower overall build time due to the copying of files and has known issues when using Ninja generator.
141
141
142
-
```JSON
142
+
```cmake
143
143
# directory where the link_repro directories for each arm64x target will be created during arm64 build.
4. In the bottom of the top level `CMakeLists.txt` file in your project, add the snippet below. Be sure to substitute the contents of the angle brackets with actual values. This will consume the `arm64x.cmake` file you just created above.
187
187
188
-
```JSON
188
+
```cmake
189
189
if(DEFINED BUILD_AS_ARM64X)
190
190
set(ARM64X_TARGETS <Targets you want to Build as ARM64X>)
191
191
include("<directory location of the arm64x.cmake file>/arm64x.cmake")
@@ -210,7 +210,7 @@ You can build an Arm64X pure forwarder from the Arm64 developer command prompt f
210
210
211
211
1. Create empty `OBJ` files that will later be used by the linker to create the pure forwarder. These are empty as the pure forwarder has no code in it. To do this, create an empty file. For the example below, we named the file **empty.cpp**. Empty `OBJ` files are then created using `cl`, with one for Arm64 (`empty_arm64.obj`) and one for Arm64EC (`empty_x64.obj`):
212
212
213
-
```cpp
213
+
```batch
214
214
cl /c /Foempty_arm64.obj empty.cpp
215
215
cl /c /arm64EC /Foempty_x64.obj empty.cpp
216
216
```
@@ -237,7 +237,7 @@ You can build an Arm64X pure forwarder from the Arm64 developer command prompt f
237
237
238
238
3. You can then use `link` to create `LIB` import files for both x64 and Arm64:
239
239
240
-
```cpp
240
+
```batch
241
241
link /lib /machine:x64 /def:foo_x64.def /out:foo_x64.lib
242
242
link /lib /machine:arm64 /def:foo_arm64.def /out:foo_arm64.lib
0 commit comments