Add LLVM support to documentation

This commit is contained in:
josh committed 2024-03-24 11:00:15 -04:00
1 parent ba71e8d5e3
commit 57db93c59b
2 files changed
+13 -4

No files matched your search

+1 -1
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
+12 -3
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