diff --git a/build_defs/BUILD.bazel b/build_defs/BUILD.bazel index 1c2ed237d9..540962f0e0 100644 --- a/build_defs/BUILD.bazel +++ b/build_defs/BUILD.bazel @@ -35,6 +35,7 @@ config_setting( # For more info on the various crosstool_tops used by NDK Bazel builds, see: # https://docs.bazel.build/versions/master/android-ndk.html#configuring-the-stl +# When using https://bazel.build/concepts/platforms config_setting( name = "config_android", values = { @@ -42,6 +43,15 @@ config_setting( }, ) +# When using legacy flags like --android_crosstool_top, --android_cpu, and --fat_apk_cpu +config_setting( + name = "config_android-legacy-default-crosstool", + values = { + # Default of `--android_crosstool_top` + "crosstool_top": "//external:android/crosstool", + }, +) + config_setting( name = "config_android-stlport", values = { diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl index 09c8b79179..f667a40881 100644 --- a/build_defs/cpp_opts.bzl +++ b/build_defs/cpp_opts.bzl @@ -29,6 +29,7 @@ COPTS = select({ # Android and MSVC builds do not need to link in a separate pthread library. LINK_OPTS = select({ "//build_defs:config_android": [], + "//build_defs:config_android-legacy-default-crosstool": [], "//build_defs:config_android-stlport": [], "//build_defs:config_android-libcpp": [], "//build_defs:config_android-gnu-libstdcpp": [],