Add LLVM support to documentation

This commit is contained in:
Josh Holtrop 2024-03-24 11:00:15 -04:00
parent ba71e8d5e3
commit 57db93c59b
2 changed files with 13 additions and 4 deletions

View File

@ -9,7 +9,7 @@ It supports the following features:
* multi-threaded job execution
* auto-configuration
* built-in builders for several common operations
* out-of-the-box support for C, C++, and D languages
* out-of-the-box support for Assembly, C, C++, D, and LLVM
* extensibility for other languages or custom builders
* compatible with Windows, Linux, OS X, and FreeBSD
* colorized output with build progress

View File

@ -6,7 +6,7 @@ It supports the following features:
* multi-threaded job execution
* auto-configuration
* built-in builders for several common operations
* out-of-the-box support for C, C++, and D languages
* out-of-the-box support for Assembly, C, C++, D, and LLVM
* extensibility for other languages or custom builders
* compatible with Windows, Linux, OS X, and FreeBSD
* colorized output with build progress
@ -1617,8 +1617,8 @@ end
The `Object` and `SharedObject` builders that ship with Rscons have an API that
allows the user to register extra languages that can be suppored by the
builders.
In fact, the built-in support for assembly, C, C++, and D compilation all make
use of this built-in API.
In fact, the built-in support for assembly, C, C++, D, and LLVM compilation
all make use of this built-in API.
To see an example of how this API is used, see the
`lib/rscons/builders/lang/*.rb` files in the Rscons source repository.
For example, here is how the C++ language is registered:
@ -1927,6 +1927,15 @@ env do |env|
end
```
### Example: Building a Program from C and LLVM Sources
```ruby
env do |env|
env["CFLAGS"] << "-Wall"
env.Program("program", glob("src/**/*.{c,ll}"))
end
```
### Example: Cloning an Environment
```ruby