Automatically convert target API from 25 to 24.

  - There is no new APIs introduced for 25 and devices shipped with
  N-MR1 and N-MR2 can only support 24 or lower. This change will
  automatically convert target API 25 to 24.

Bug: 35767071
Test: mm and manually invoked llvm-rs-cc with -target-api 25 and
verified that it is converted to 24.

Change-Id: I1da7c94a0a594633c949d6ce080893d2b6027fc6
diff --git a/rs_cc_options.cpp b/rs_cc_options.cpp
index 8c8ae58..7aa185d 100644
--- a/rs_cc_options.cpp
+++ b/rs_cc_options.cpp
@@ -290,6 +290,10 @@
 
   if (Opts.mTargetAPI == 0) {
     Opts.mTargetAPI = UINT_MAX;
+  } else if (Opts.mTargetAPI == SLANG_N_MR1_TARGET_API) {
+    // Bug: http://b/35767071
+    // No new APIs for N_MR1, convert to N.
+    Opts.mTargetAPI = SLANG_N_TARGET_API;
   }
 
   if ((Opts.mTargetAPI < 21) || (Opts.mBitcodeStorage == BCST_CPP_CODE))
diff --git a/slang_version.h b/slang_version.h
index 74cd09e..6f96f76 100644
--- a/slang_version.h
+++ b/slang_version.h
@@ -41,6 +41,7 @@
   SLANG_KK_TARGET_API = 19,
   SLANG_M_TARGET_API = 23,
   SLANG_N_TARGET_API = 24,
+  SLANG_N_MR1_TARGET_API = 25,
   SLANG_MAXIMUM_TARGET_API = RS_VERSION,
   SLANG_DEVELOPMENT_TARGET_API = RS_DEVELOPMENT_API
 };