Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/cc/src/target/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 2 kB image not shown  

Quelle  apple.rs

  Sprache: Rust
 

use super::TargetInfo;

impl TargetInfo<'_> {
    pub(cratefn apple_sdk_name(&self) -> &'static str {
        match (self.os, self.abi) {
            ("macos""") => "macosx",
            ("ios""") => "iphoneos",
            ("ios""sim") => "iphonesimulator",
            ("ios""macabi") => "macosx",
            ("tvos""") => "appletvos",
            ("tvos""sim") => "appletvsimulator",
            ("watchos""") => "watchos",
            ("watchos""sim") => "watchsimulator",
            ("visionos""") => "xros",
            ("visionos""sim") => "xrsimulator",
            (os, _) => panic!("invalid Apple target OS {}", os),
        }
    }

    pub(cratefn apple_version_flag(&self, min_version: &str) -> String {
        // There are many aliases for these, and `-mtargetos=` is preferred on Clang nowadays, but
        // for compatibility with older Clang, we use the earliest supported name here.
        //
        // NOTE: GCC does not support `-miphoneos-version-min=` etc. (because it does not support
        // iOS in general), but we specify them anyhow in case we actually have a Clang-like
        // compiler disguised as a GNU-like compiler, or in case GCC adds support for these in the
        // future.
        //
        // See also:
        // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mmacos-version-min
        // https://clang.llvm.org/docs/AttributeReference.html#availability
        // https://gcc.gnu.org/onlinedocs/gcc/Darwin-Options.html#index-mmacosx-version-min
        match (self.os, self.abi) {
            ("macos""") => format!("-mmacosx-version-min={min_version}"),
            ("ios""") => format!("-miphoneos-version-min={min_version}"),
            ("ios""sim") => format!("-mios-simulator-version-min={min_version}"),
            ("ios""macabi") => format!("-mtargetos=ios{min_version}-macabi"),
            ("tvos""") => format!("-mappletvos-version-min={min_version}"),
            ("tvos""sim") => format!("-mappletvsimulator-version-min={min_version}"),
            ("watchos""") => format!("-mwatchos-version-min={min_version}"),
            ("watchos""sim") => format!("-mwatchsimulator-version-min={min_version}"),
            // `-mxros-version-min` does not exist
            // https://github.com/llvm/llvm-project/issues/88271
            ("visionos""") => format!("-mtargetos=xros{min_version}"),
            ("visionos""sim") => format!("-mtargetos=xros{min_version}-simulator"),
            (os, _) => panic!("invalid Apple target OS {}", os),
        }
    }
}

Messung V0.5 in Prozent
C=72 H=100 G=86

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.