| Index: BUILD.gn
 | 
| diff --git a/BUILD.gn b/BUILD.gn
 | 
| index fed8a68c0d58b15c02df72450e0193997143de3c..f9e913c0d6c4a41fec4ba006a691ee2caa963ed7 100644
 | 
| --- a/BUILD.gn
 | 
| +++ b/BUILD.gn
 | 
| @@ -7,6 +7,7 @@
 | 
|  # be found in the AUTHORS file in the root of the source tree.
 | 
|  
 | 
|  import("//build/config/arm.gni")
 | 
| +import("//build/config/mips.gni")
 | 
|  import("//build/config/sanitizers/sanitizers.gni")
 | 
|  
 | 
|  config("libyuv_config") {
 | 
| @@ -17,6 +18,7 @@ config("libyuv_config") {
 | 
|  }
 | 
|  
 | 
|  use_neon = current_cpu == "arm64" || (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon))
 | 
| +use_msa = (current_cpu == "mips64el" || current_cpu == "mipsel") && mips_use_msa
 | 
|  
 | 
|  static_library("libyuv") {
 | 
|    sources = [
 | 
| @@ -93,6 +95,10 @@ static_library("libyuv") {
 | 
|      deps += [ ":libyuv_neon" ]
 | 
|    }
 | 
|  
 | 
| +  if (use_msa) {
 | 
| +    deps += [ ":libyuv_msa" ]
 | 
| +  }
 | 
| +  
 | 
|    if (is_nacl) {
 | 
|      # Always enable optimization under NaCl to workaround crbug.com/538243 .
 | 
|      configs -= [ "//build/config/compiler:default_optimization" ]
 | 
| @@ -122,3 +128,14 @@ if (use_neon) {
 | 
|      }
 | 
|    }
 | 
|  }
 | 
| +
 | 
| +if (use_msa) {
 | 
| +  static_library("libyuv_msa") {
 | 
| +    sources = [
 | 
| +      # MSA Source Files
 | 
| +      "source/row_msa.cc",
 | 
| +    ]
 | 
| +
 | 
| +    public_configs = [ ":libyuv_config" ]
 | 
| +  }
 | 
| +}
 | 
| 
 |