Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for indirect branch tracking flags #796

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/man/required_libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Using a standalone library over the system library implementation can be enforce

### TLS

TLS protocol implementation and general-purpose cryptographic routines for the [`OpenSSL`](https://crystal-lang.org/api/OpenSSL.html) API. May be disabled with the `-Dwithout_openssl` [compile-time flag](../syntax_and_semantics/compile_time_flags.md#compiler-features).
TLS protocol implementation and general-purpose cryptographic routines for the [`OpenSSL`](https://crystal-lang.org/api/OpenSSL.html) API. May be disabled with the `-Dwithout_openssl` [compile-time flag](../syntax_and_semantics/compile_time_flags.md#stdlib-features).

Both `OpenSSL` and `LibreSSL` are supported and the bindings automatically detect which library and API version is available on the host system.

Expand Down
2 changes: 1 addition & 1 deletion docs/syntax_and_semantics/autocasting.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bar64(bar 1) # OK, a Float32 can be autocasted to a Float64

Number literals are always casted when the actual value of the literal fits the target type, despite of its type.

Expressions are casted (like in the last example above), unless the flag `no_number_autocast` is passed to the compiler (see [Compiler features](compile_time_flags.md#compiler-features)).
Expressions are casted (like in the last example above), unless the flag `no_number_autocast` is passed to the compiler (see [Compiler features](compile_time_flags.md#language-features)).

If there is ambiguity, for instance, because there is more than one option, the compiler throws an error:

Expand Down
13 changes: 11 additions & 2 deletions docs/syntax_and_semantics/compile_time_flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ Crystal program.
| `without_openssl` | Build without OpenSSL support
| `without_zlib` | Build without Zlib support

### Compiler features
### Language features

These flags enable or disable compiler features when building a Crystal program.
straight-shoota marked this conversation as resolved.
Show resolved Hide resolved
These flags enable or disable language features when building a Crystal program.

| Flag name | Description |
|-----------|-------------|
Expand All @@ -156,6 +156,15 @@ These flags enable or disable compiler features when building a Crystal program.
| `preview_overload_order` | Enable more robust ordering between def overloads. Introduced in 1.6 ([#10711](https://github.com/crystal-lang/crystal/issues/10711)).
| `strict_multi_assign` | Enable strict semantics for [one-to-many assignment](assignment.md#one-to-many-assignment). Introduced in 1.3.0 ([#11145](https://github.com/crystal-lang/crystal/pull/11145), [#11545](https://github.com/crystal-lang/crystal/pull/11545))

### Codegen features

These flags enable or disable codegen features when building a Crystal program.

| Flag name | Description |
|-----------|-------------|
| `cf-protection=branch`, `cf-protection=return`, `cf-protection=full` | Indirect branch tracking for x86 and x86_64. Implicitly set on OpenBSD. Introduced in 1.15.0 ([#15122](https://github.com/crystal-lang/crystal/pull/15122))
| `branch-protection=bti` | Indirect branch tracking for aarch64. Implicitly set on OpenBSD. Introduced in 1.15.0 ([#15122](https://github.com/crystal-lang/crystal/pull/15122))

### Compiler build features

These flags enable or disable features when building the Crystal compiler.
Expand Down