Skip to content

16KB Aligned Android Binary #136

@bitmold

Description

@bitmold

Google Play requires arm64 binaries to be 16kb aligned on Android, without this, you'll see this type of warning in Android Studio:

Image

Unfortunately, I'm trying to recompile a much older version of classic-level to be 16kb aligned, otherwise I'd make a PR here.

It's pretty trivial though, in binding.gyp you want to add these ldflags "-Wl", "-z", "max-page-size=16384"

["OS == 'android'", {
        "cflags": [ "-fPIC" ],
        "ldflags": [ "-fPIC", "-Wl", "-z", "max-page-size=16384" ],
        "cflags!": [
          "-fno-tree-vrp",
          "-mfloat-abi=hard",
          "-fPIE"
        ],
        "ldflags!": [ "-fPIE" "-Wl", "-z", "max-page-size=16384" ]
      }],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions