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

Androidndk standalone toolchain support #45757

Merged
merged 2 commits into from Sep 8, 2018

Conversation

bkchr
Copy link
Contributor

@bkchr bkchr commented Aug 29, 2018

Motivation for this change

I wanted to use the android standalone toolchain ;)

Now a standalone toolchain is available via:

    let
      toolchain = (androidenv.androidndk.makeStandaloneToolchain 24 "arm64");
    in
    ...

CC @matthewbauer

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Python path needs to be absolute and the generated scripts will use also
an absolute path to `bash`.
@bkchr bkchr force-pushed the androidndk_standalone_toolchain branch from 045739a to ba6a199 Compare September 7, 2018 19:46
@bkchr
Copy link
Contributor Author

bkchr commented Sep 7, 2018

@matthewbauer ping

Example:
```
let
  toolchain = (androidenv.androidndk.makeStandaloneToolchain 24 "arm64");
in
...
```
@bkchr bkchr force-pushed the androidndk_standalone_toolchain branch from ba6a199 to dd0b3da Compare September 7, 2018 20:03
@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@matthewbauer
Copy link
Member

@GrahamcOfBorg build pkgsCross.aarch64-android-prebuilt.hello

@NixOS NixOS deleted a comment from GrahamcOfBorg Sep 7, 2018
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: pkgsCross.aarch64-android-prebuilt.hello

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: pkgsCross.androidndk.android64.gmp

Partial log (click to expand)

Cannot nix-instantiate `pkgsCross.androidndk.android64.gmp' because:
error: attribute 'androidndk' in selection path 'pkgsCross.androidndk.android64.gmp' not found

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: pkgsCross.android64.gmp

Partial log (click to expand)

Cannot nix-instantiate `pkgsCross.android64.gmp' because:
error: attribute 'android64' in selection path 'pkgsCross.android64.gmp' not found

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: pkgsCross.aarch64-android-prebuilt.hello

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pkgsCross.aarch64-android-prebuilt.hello

Partial log (click to expand)

make[2]: Leaving directory '/build/hello-2.10'
make[1]: Leaving directory '/build/hello-2.10'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android
shrinking /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android/bin/hello
gzipping man pages under /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android/share/man/
aarch64-unknown-linux-android-strip is /nix/store/rrdhzmwx0n9s014hscdiggsa7d641169-ndk-gcc-binutils/bin/aarch64-unknown-linux-android-strip
stripping (with command aarch64-unknown-linux-android-strip and flags -S) in /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android/lib  /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android/bin
patching script interpreter paths in /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android
checking for references to /build in /nix/store/4y5a8x39fqmd10wva90r93dvzvbgzb4k-hello-2.10-aarch64-unknown-linux-android...

@matthewbauer matthewbauer merged commit 1acfddb into NixOS:master Sep 8, 2018
@bkchr bkchr deleted the androidndk_standalone_toolchain branch September 18, 2018 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants