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

Support patching r25 NDK with quoting workaround on Windows #105

Closed
wants to merge 1 commit into from

Conversation

rib
Copy link
Contributor

@rib rib commented May 16, 2023

This is an alternative fix for #92 that avoids hitting command line length limitations and avoid needing to use cargo-ndk as a spring board for running clang, which avoids needing temporary hard links or copying the cargo-ndk binary to the target/ directory.

By default cargo-ndk will just emit an error message if it recognises the current NDK needs a quoting workaround, and will also emit a warning suggesting to re-run with
--apply-ndk-quote-workaround so that cargo-ndk can automatically apply the required workaround.

If --apply-ndk-quote-workaround is passed then cargo ndk will replace lines matching if "%1" == "-cc1" goto :L with if "%~1" == "-cc1" goto :L in the CC and CXX .cmd files which will avoid any double quotes when checking if the first argument == "-cc1".

Fixes #104

@rib rib force-pushed the ndk-25-quoting-workaround branch from 10a7234 to 7e0c9ed Compare May 16, 2023 20:26
This is an alternative fix for bbqsrc#92 that avoids hitting command line
length limitations and avoid needing to use `cargo-ndk` as a spring
board for running `clang`, which avoids needing temporary hard links or
copying the `cargo-ndk` binary to the target/ directory.

By default cargo-ndk will just emit an error message if it
recognises the current NDK needs a quoting workaround, and will
also emit a warning suggesting to re-run with
`--apply-ndk-quote-workaround` so that `cargo-ndk` can automatically
apply the required workaround.
@rib
Copy link
Contributor Author

rib commented May 18, 2023

I think at this point #107 (which avoids using the Clang wrappers altogether) is probably a better solution compared to this.

@rib
Copy link
Contributor Author

rib commented May 18, 2023

Closing this for now in favor of #108 as a solution instead - can potentially re-open later if it makes sense

@rib rib closed this May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workaround for .cmd quoting bug on Windows leads to command line is too long errors
1 participant