diff options
author | Dan Albert <danalbert@google.com> | 2019-09-13 15:20:38 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2019-09-13 15:20:38 -0700 |
commit | 8b681acd0e8e44d8c5a465809a128319e0e33ac7 (patch) | |
tree | 744da242023d53ec1a7e5c3621033b6e002a0c54 /build | |
parent | 47031dfe95063d70518064307954495c48249e48 (diff) | |
download | ndk-8b681acd0e8e44d8c5a465809a128319e0e33ac7.tar.gz |
Add disabling ANDROID_CPP_FEATURES.
ANDROID_CPP_FEATURES previously allowed globally enabling RTTI and
exceptions, but these are the defaults now so those aren't really
useful. Since they are on by default, there isn't a convenient way to
globally disable these. Add the no- variants of each option to support
this.
Test: ./checkbuild.py && ./run_tests.py
Bug: https://github.com/android/ndk/issues/975
Change-Id: I17aeda444a0a59b76e34b0e273ddd9f48c52b197
Diffstat (limited to 'build')
-rw-r--r-- | build/cmake/android.toolchain.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build/cmake/android.toolchain.cmake b/build/cmake/android.toolchain.cmake index 458b876dd..da5105364 100644 --- a/build/cmake/android.toolchain.cmake +++ b/build/cmake/android.toolchain.cmake @@ -507,7 +507,7 @@ endif() if(ANDROID_CPP_FEATURES) separate_arguments(ANDROID_CPP_FEATURES) foreach(feature ${ANDROID_CPP_FEATURES}) - if(NOT ${feature} MATCHES "^(rtti|exceptions)$") + if(NOT ${feature} MATCHES "^(rtti|exceptions|no-rtti|no-exceptions)$") message(FATAL_ERROR "Invalid Android C++ feature: ${feature}.") endif() list(APPEND ANDROID_COMPILER_FLAGS_CXX |