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

[FR] add branch protection option for ndk-build #1479

Closed
DanAlbert opened this issue Mar 29, 2021 · 4 comments
Closed

[FR] add branch protection option for ndk-build #1479

DanAlbert opened this issue Mar 29, 2021 · 4 comments
Assignees

Comments

@DanAlbert
Copy link
Member

Rather than requiring

ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
    libcxxabi_cppflags += -mbranch-protection=standard
endif

all over the place, we should add a LOCAL_BRANCH_PROTECTION := standard that is ignored for non-arm64.

@enh-google
Copy link
Collaborator

are you implying that we already have something similar for cmake, or should this bug cover cmake too?

@DanAlbert
Copy link
Member Author

For CMake if there is no option yet we ought to be making an upstream change that isn't Android specific, so it's a bit more involved. Worth considering.

@jfgoog jfgoog self-assigned this Nov 10, 2021
@jfgoog
Copy link
Collaborator

jfgoog commented Nov 10, 2021

Some more info from Dan:

The goal is to not require users of the NDK to add libcxxabi_cppflags += -mbranch-protection=standard to their makefiles. Instead, they should be able to write LOCAL_BRANCH_PROTECTION := standard. Then ndk-build would internally ignore that for non arm64, and for arm64 would add -mbranch-protection=$OPTION_VALUE to LOCAL_CFLAGS internally.

@jfgoog
Copy link
Collaborator

jfgoog commented Nov 11, 2021

@jfgoog jfgoog closed this as completed Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants