Skip to content

Commit ed12508

Browse files
committed
Add documentation for the build script
1 parent 4f0958d commit ed12508

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tinycc/compile_tinycc.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/bin/bash
22

3+
# This build script produces wasm tinycc compiler that can compile C programs to 32-bit ELF binaries (i386 target).
4+
5+
# libtcc.a is a shared library that is required to run tinycc. Since the target is i386, libtcc.a is also compiled as i386.
6+
7+
# The required header files, shared libraries and other files (libc.so, ld.so, libc_nonshared.a, crt1.o) which are required to run tinycc is also copied to the build/ folder.
8+
9+
# To run dynamically linked executables produced by tinycc, dynamic linker is used. Since the executable is run natively, we provide a symbolic link to the 32-bit dynamic linker within /lib of the root filesystem so that the kernel can locate the dynamic linker.
10+
11+
12+
313
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
414
APPS_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
515

0 commit comments

Comments
 (0)