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
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,25 @@ The resulting binary will be placed in the `build/artifacts/` directory.
135
135
136
136
</details>
137
137
138
+
<detailsopen>
139
+
<summary>
140
+
Adding a custom architecture
141
+
</summary> <br />
142
+
143
+
Adding a new architecture to the build system is straightforward. Follow these steps:
144
+
145
+
-**Add a cross compiler**: <br />
146
+
Add a musl-based compiler to the `ARCHS` dictionary in `src/docker_utils/download_musl_toolchains.py`. You can find musl-based compilers [here](https://more.musl.cc/). <br />
147
+
If a musl-based compiler is not available for your architecture, you can instead install a compiler via `apt` in the Dockerfile. However, using a musl-based toolchain is highly recommended.
148
+
-**Update the Makefile**: <br />
149
+
Add the new architecture to the `ARCHS` variable in the Makefile.
150
+
-**Modify `build.sh`**: <br />
151
+
Locate the `set_compilation_variables` function in `build.sh`.
152
+
- Add the new architecture to the `supported_archs` variable (in the same way as in the Makefile).
153
+
- Add a new `if` branch to check for the new architecture, and within it, export the appropriate `HOST` variable using the compiler's target triple.
0 commit comments