Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index 72d6779c93109ae4b9796279af096a7d5c9daf5f..ab50ae7f00a51e05ff6ce34f18b1a779119da34e 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -8,12 +8,6 @@ import("//build/config/chrome_build.gni") |
import("//third_party/libvpx/libvpx_srcs.gni") |
import("//third_party/yasm/yasm_assemble.gni") |
-if (is_posix && !is_mac) { |
- os_category = "linux" |
-} else { |
- os_category = current_os |
-} |
- |
# Sets the architecture name for building libvpx. |
if (current_cpu == "x86") { |
cpu_arch_full = "ia32" |
@@ -35,10 +29,22 @@ if (current_cpu == "x86") { |
cpu_arch_full = current_cpu |
} |
+if (is_nacl) { |
+ platform_include_dir = "//third_party/libvpx/source/config/nacl" |
+} else { |
+ if (is_posix && !is_mac) { |
+ os_category = "linux" |
+ } else { |
+ os_category = current_os |
+ } |
+ platform_include_dir = |
+ "//third_party/libvpx/source/config/$os_category/$cpu_arch_full" |
Johann
2015/09/03 05:43:03
ah, ok this moved so you have $cpu_arch_full defin
Sergey Ulanov
2015/09/03 16:33:37
GN doesn't allow to define variable and never use
|
+} |
+ |
config("libvpx_config") { |
include_dirs = [ |
"//third_party/libvpx/source/config", |
- "//third_party/libvpx/source/config/$os_category/$cpu_arch_full", |
+ platform_include_dir, |
Johann
2015/09/03 05:43:03
$platform_include_dir?
Sergey Ulanov
2015/09/03 16:33:37
this can be either platform_include_dir or "$platf
Johann
2015/09/03 16:41:45
Weird. OK!
|
"//third_party/libvpx/source/libvpx", |
"$root_gen_dir/third_party/libvpx", # Provides vpx_rtcd.h. |
] |
@@ -79,9 +85,9 @@ if (current_cpu == "x86" || current_cpu == "x64") { |
defines = [ "CHROMIUM" ] |
include_dirs = [ |
- "//third_party/libvpx/source/config/$os_category/$cpu_arch_full", |
+ platform_include_dir, |
"//third_party/libvpx/source/config", |
- "//third_party/libvpx/source/libvpx", |
+ "//third_party/libvpx/source/libvpx", |
target_gen_dir |
] |
} |
@@ -216,7 +222,9 @@ static_library("libvpx") { |
configs += [ "//build/config/compiler:optimize_max" ] |
} |
- if (current_cpu == "x86") { |
+ if (is_nacl) { |
+ sources = libvpx_srcs_generic |
+ } else if (current_cpu == "x86") { |
sources = libvpx_srcs_x86 |
} else if (current_cpu == "x64") { |
if (is_msan) { |