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

ndk-build: Switch NDK r23 -lgcc workaround to CARGO_ENCODED_RUSTFLAGS env var for paths with spaces #298

Merged

Commits on Jun 16, 2022

  1. ndk-build: Switch NDK r23 -lgcc workaround to `CARGO_ENCODED_RUSTFL…

    …AGS` env var for paths with spaces
    
    On Windows user paths usually include people's full name, with a space.
    If they have their Rust project somewhere in their user profile `cargo`
    fails to parse the workaround path:
    
        process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -L '"C:\Users\Bla' 'Haj\Desktop\Breda\target\cargo-apk-temp-extra-link-libraries"' ... (exit code: 1)
    
    As per the [documentation for `RUSTFLAGS`] its contents are split by a
    very simple `.split(" ")` algorithm without caring for quotation
    delimiters or escape characters. To retain backwards compatibility this
    has been implemented in a new environment variable named
    `CARGO_ENCODED_RUSTFLAGS`, which separates by ASCII Unit Separators
    (`0x1f`) instead.
    
    [documentation for `RUSTFLAGS`]: https://doc.rust-lang.org/cargo/reference/environment-variables.html
    EmilioLaiso authored and MarijnS95 committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    9438a9d View commit details
    Browse the repository at this point in the history