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

Fix cross compilation #937

Merged
merged 2 commits into from
Nov 1, 2019
Merged

Fix cross compilation #937

merged 2 commits into from
Nov 1, 2019

Commits on Nov 1, 2019

  1. Remove cfg!(target_os="x") from build.rs

    using the cfg macro breaks cross compilation. This is because the cfg
    macro gets evaluated during compile time of the binary getting built. In
    the case of build.rs, it gets built into it's own binary targeting the
    local machine. (Which then gets run to evaluate build rules for the
    primary project binary). So somewhat confusingly, the cfg(target_os..)
    evaluates differently in build.rs than the rest of the project in the
    case of cross compilation. Particularly for SDL, this is important for
    targeting emscripten. The current build.rs breaks when trying to compile
    for the web.
    bsurmanski committed Nov 1, 2019
    Configuration menu
    Copy the full SHA
    fef63d5 View commit details
    Browse the repository at this point in the history
  2. use 'darwin' instead of 'macos' in build.rs

    That is the target_os visible in the target triple.
    bsurmanski authored Nov 1, 2019
    Configuration menu
    Copy the full SHA
    dd9af21 View commit details
    Browse the repository at this point in the history