Disable Compiler Flags (v0.2.1)

Flags that switch off selected backend, math, sanitizer, or optimization behaviors.

Latest

Overview

These flags explicitly disable behavior that would otherwise be active or inferred by the compiler.

Reference source: thrustc/thrustc_cli/src/help.rs

Back to command line reference

--disable-frame-pointer

Omit frame pointer emission regardless of optimization level.

Accepts value: no

Details

This can reduce overhead or follow platform-specific conventions, but it can also make debugging and stack walking harder.

Examples

thrustc main.thrust --disable-frame-pointer

Notes

No extra notes for this flag.

--disable-uwtable

Omit unwind table emission.

Accepts value: no

Details

This can reduce output size, but it may hurt exception handling support or stack tracing quality.

Examples

thrustc main.thrust --disable-uwtable

Notes

No extra notes for this flag.

--disable-direct-access-external-data

Force external data references to be accessed indirectly instead of directly.

Accepts value: no

Details

This changes how the backend reaches external data symbols and can matter for relocation or platform constraints.

Examples

thrustc main.thrust --disable-direct-access-external-data

Notes

No extra notes for this flag.

--disable-rtlib-got

Disable the runtime library dependency on the Global Offset Table.

Accepts value: no

Details

The original help text describes this as useful for some ARM non-PIC situations.

Examples

thrustc main.thrust --disable-rtlib-got

Notes

No extra notes for this flag.

--disable-safe-trapping-math

Allow trapping math operations instead of forcing safer behavior.

Accepts value: no

Details

This mainly affects floating-point code paths where the backend would otherwise avoid trap-prone behavior.

Examples

thrustc main.thrust --disable-safe-trapping-math

Notes

No extra notes for this flag.

--disable-safe-math

Disable safe integer math behavior.

Accepts value: no

Details

This allows overflow-oriented or less constrained math behavior at the cost of stronger guarantees.

Examples

thrustc main.thrust --disable-safe-math

Notes

No extra notes for this flag.

--disable-default-optimizations

Disable the default optimization work that would otherwise happen even without an explicit optimization flag.

Accepts value: no

Details

This is the spelling used in the v0.2.1 compiler help.

It disables baseline optimization behavior even when no explicit `-opt` flag is selected.

Examples

thrustc main.thrust --disable-default-optimizations

Notes

No extra notes for this flag.

--disable-all-sanitizers

Disable all sanitizers.

Accepts value: no

Details

Use this to clear sanitizer instrumentation globally for the current compilation.

Examples

thrustc main.thrust --disable-all-sanitizers

Notes

No extra notes for this flag.

--disable-all-cpu-features

Disable all CPU feature toggles.

Accepts value: no

Details

This clears CPU feature assumptions back toward a minimal baseline.

Examples

thrustc main.thrust --disable-all-cpu-features

Notes

No extra notes for this flag.