Skip to content

Commit

Permalink
Create an abomination
Browse files Browse the repository at this point in the history
So there's a bug where NDK r25 doesn't handle command line args
properly to clang. Which is precisely what rustc calls, and breaks.

Highly paid teams at Google in their infinite wisdom implemented
argument handling with [reads notes] wizardry, wishful thinking,
and ... fucking batch scripts in 2023. `.cmd` files. For arg parsing! ON
WINDOWS! WHAT IN THE NAME OF ZOMBIE JESUS. Anyway.

So now cargo-ndk will use the actual Win32 function for parsing args
before handing them off to their cursed batch files. It took 2 hours to
workaround this issue. The bug in the NDK repo has been open for 3
months.

I should invoice Google at this point.

android/ndk#1856
  • Loading branch information
bbqsrc committed May 9, 2023
1 parent da7f44b commit 75cf74b
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 19 deletions.
190 changes: 176 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rust-version = "1.68"
maintenance = { status = "actively-developed" }

[dependencies]
anyhow = "1.0.71"
cargo_metadata = "0.15.2"
env_logger = "0.10.0"
gumdrop = "0.8.1"
Expand All @@ -30,3 +31,7 @@ pathos = "0.3.0"
serde = { version = "1.0.152", features = ["derive"] }
toml = "0.5.10"
version_check = "0.9.4"

[target.'cfg(windows)'.dependencies]
tempfile = "3.5.0"
wargs = "0.1.0"
Loading

0 comments on commit 75cf74b

Please sign in to comment.