Skip to content

Commit 1b39af7

Browse files
Merge pull request #5282 from MicrosoftDocs/main638785251751201896sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 15423a1 + f145ebe commit 1b39af7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

landing/arm-docs/arm64x-build.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ To build your CMake project binaries as Arm64X, you can use any version of [CMak
9797

9898
3. Add a new .cmake file to your CMake project called `arm64x.cmake`. Copy the snippet below into the new .cmake file.
9999

100-
```JSON
100+
```cmake
101101
# directory where the link.rsp file generated during arm64 build will be stored
102102
set(arm64ReproDir "${CMAKE_CURRENT_SOURCE_DIR}/repros")
103103

@@ -139,7 +139,7 @@ To build your CMake project binaries as Arm64X, you can use any version of [CMak
139139

140140
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.
141141

142-
```JSON
142+
```cmake
143143
# directory where the link_repro directories for each arm64x target will be created during arm64 build.
144144
set(arm64ReproDir "${CMAKE_CURRENT_SOURCE_DIR}/repros")
145145
@@ -185,7 +185,7 @@ endif()
185185

186186
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.
187187

188-
```JSON
188+
```cmake
189189
if(DEFINED BUILD_AS_ARM64X)
190190
set(ARM64X_TARGETS <Targets you want to Build as ARM64X>)
191191
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
210210

211211
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`):
212212

213-
```cpp
213+
```batch
214214
cl /c /Foempty_arm64.obj empty.cpp
215215
cl /c /arm64EC /Foempty_x64.obj empty.cpp
216216
```
@@ -237,7 +237,7 @@ You can build an Arm64X pure forwarder from the Arm64 developer command prompt f
237237
238238
3. You can then use `link` to create `LIB` import files for both x64 and Arm64:
239239
240-
```cpp
240+
```batch
241241
link /lib /machine:x64 /def:foo_x64.def /out:foo_x64.lib
242242
link /lib /machine:arm64 /def:foo_arm64.def /out:foo_arm64.lib
243243
```

0 commit comments

Comments
 (0)