Giter Club home page Giter Club logo

Comments (6)

thedjpetersen avatar thedjpetersen commented on June 28, 2024 1

+1

from aws-lc-rs.

brongan avatar brongan commented on June 28, 2024 1

From https://rust-lang.github.io/rustup/cross-compilation.html

Note that rustup target add only installs the Rust standard library for a given target. There are typically other tools necessary to cross-compile, particularly a linker. For example, to cross compile to Android the Android NDK must be installed. In the future, rustup will provide assistance installing the NDK components as well. See the target section of the cargo configuration for how to setup a linker to use for a certain target.

from aws-lc-rs.

justsmth avatar justsmth commented on June 28, 2024

I can reproduce this on my Linux host. I'm investigating now.

from aws-lc-rs.

justsmth avatar justsmth commented on June 28, 2024

The parameter appears to be added here: https://github.com/rust-lang/cc-rs/blob/994dc909dc54caa9eaa473b9807c171e1763d27e/src/lib.rs#L2659

...
        match arch {
            AppleArchSpec::Device(_) if is_mac => {
                cmd.args
                    .push(format!("-mmacosx-version-min={}", min_version).into());
            }
...

It seems related to this issue: rust-lang/cc-rs#1030

from aws-lc-rs.

justsmth avatar justsmth commented on June 28, 2024

Another related issue: rust-lang/cc-rs#710

I'm not certain cross-compiling C/C++ code to MacOS from Linux via cc-rs is expect to work like this. I tried this same method and reproduced the failure with ring and openssl; they both generate errors about these same flags:

  cargo:warning=cc: error: unrecognized debug output level ‘full’
  cargo:warning=cc: error: unrecognized command-line option ‘-arch’
  cargo:warning=cc: error: unrecognized command-line option ‘-mmacosx-version-min=10.7’

from aws-lc-rs.

justsmth avatar justsmth commented on June 28, 2024

Since cross-compiling from Linux to Mac is not something we currently plan to support. I'm closing this issue. Feel free to open another issue as a feature request if you'd like us to further investigate this as a cross-compilation option.

from aws-lc-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.