Finished basic README.md
This commit is contained in:
parent
48a76da07e
commit
832ab3daf6
43
README.md
43
README.md
@ -70,4 +70,47 @@ String fmt = 'const io from @%ccore/io%c;%cString fmt = %c%s%c;%clet @main in {%
|
||||
let @main in {
|
||||
io.outf(fmt,39,39,10,39,fmt,39,10,10,9,10,10);
|
||||
}
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
More documentation is available at [Documentation](docs/Documentation.md).
|
||||
|
||||
## Building
|
||||
First, install the required packages. (ninja is required only for the quick build, you can use other build systems (like GNU Make) for the manual build)
|
||||
|
||||
Debian/Ubuntu:
|
||||
`# apt install cmake ninja-build llvm-dev`
|
||||
|
||||
CentOS/Fedora/RHEL: `# dnf install cmake ninja-build llvm-devel`
|
||||
|
||||
Arch: `# pacman -S cmake ninja llvm-libs`
|
||||
|
||||
Then, you can either use the quick-build script or do a manual build.
|
||||
|
||||
Quick build: `./build.sh`
|
||||
|
||||
Manual build first-time setup:
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
```
|
||||
|
||||
Then, every time you want to build:
|
||||
```
|
||||
cd build
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
## Running
|
||||
The compiler is built at `build/sapphirec`.
|
||||
|
||||
A few example commands:
|
||||
```
|
||||
$ build/sapphirec --version # prints the compiler version
|
||||
$ build/sapphirec --help # shows usage
|
||||
$ build/sapphirec main.sp # compiles a file
|
||||
$ build/sapphirec main.sp -o main # compiles a file with output filename
|
||||
$ build/sapphirec main.sp -o main --msystem darwin # compiles a file for macOS
|
||||
```
|
Loading…
Reference in New Issue
Block a user