You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/attributes/codegen.md
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,14 @@ The *`target_feature` [attribute]* may be applied to a function to enable code g
194
194
> fn foo_avx2() {}
195
195
> ```
196
196
197
+
> [!NOTE]
198
+
> See the [`target_feature` conditional compilation option] for selectively enabling or disabling compilation of code based on compile-time settings.Note that this option is not affected by the `target_feature` attribute, and is only driven by the features enabled for the entire crate.
199
+
>
200
+
> See the [`is_x86_feature_detected`] or [`is_aarch64_feature_detected`] macros in the standard library for runtime feature detection on these platforms.
201
+
202
+
> [!NOTE]
203
+
> `rustc` has a default set of features enabled for each target and CPU.TheCPU may be chosen with the [`-C target-cpu`] flag.Individual features may be enabled or disabled for an entire crate with the [`-C target-feature`] flag.
See the [`target_feature` conditional compilation option] for selectively enabling or disabling compilation of code based on compile-time settings. Note that this option is not affected by the `target_feature` attribute, and is only driven by the features enabled for the entire crate.
586
-
587
-
r[attributes.codegen.target_feature.remark-rt]
588
-
See the [`is_x86_feature_detected`] or [`is_aarch64_feature_detected`] macros in the standard library for runtime feature detection on these platforms.
589
-
590
-
> [!NOTE]
591
-
> `rustc` has a default set of features enabled for each target and CPU. The CPU may be chosen with the [`-C target-cpu`] flag. Individual features may be enabled or disabled for an entire crate with the [`-C target-feature`] flag.
0 commit comments