Skip to content

Commit

Permalink
Make conditionally available NDK API feature opt-in
Browse files Browse the repository at this point in the history
This better reflects its soft launch.
See discussion in  #27
Also fixes typo.
  • Loading branch information
cpsauer committed Aug 8, 2023
1 parent 8a254a0 commit 6478869
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ndk_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,11 @@ def ndk_cc_toolchain_config(
enabled = True,
),

# By default, allow use of APIs above the api_level, so long as the use is
# Optionally, allow use of APIs above the api_level, so long as the use is
# protected with a call to __builtin_available(android <version>, *).
# For more, see https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#weak-symbols-for-api-definitions
# This takes effect with NDK r26 and greater.
feature(
name = "android_ndk_conditional_api_availabilty",
enabled = True,
),
feature(name = "android_ndk_conditional_api_availability"),

# User-settable feature controls warning aggressiveness for compilation.
feature(name = "warnings_as_errors"),
Expand Down Expand Up @@ -697,7 +694,7 @@ def ndk_cc_toolchain_config(
"-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
"-Werror=unguarded-availability",
],
features = ["android_ndk_conditional_api_availabilty"],
features = ["android_ndk_conditional_api_availability"],
),

## Options for particular compile modes:
Expand Down

0 comments on commit 6478869

Please sign in to comment.