You can't remove -pthread. Either special-case this or add an android-specific fix-up:

```python
['OS=="android"', {
  'ldflags!': '-pthread']  # remove -pthread from linker flags
}]
```