From 0e53718e0120b51f9cbe1af29d8d949259127fb0 Mon Sep 17 00:00:00 2001 From: "kjellander@google.com" Date: Tue, 10 Mar 2015 08:16:49 +0000 Subject: [PATCH] Fix standalone GN build. Add dependencies and move the neon target to only be specified for ARM builds so a standalone GN build can be performed. TESTED=Ran: gn gen out/Release --args=is_debug=false ninja -C out/Release gn gen out/Debug --args=is_debug=true ninja -C out/Debug gn gen out/Debug --args="is_debug=true os=\"android\" "cpu_arch=\"arm\"" ninja -C out/Debug gn gen out/Release --args="is_debug=false os=\"android\" "cpu_arch=\"arm\"" ninja -C out/Release R=fbarchard@google.com Review URL: https://webrtc-codereview.appspot.com/42289004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1317 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- .gitignore | 1 + BUILD.gn | 34 +++++++++++++++++++--------------- setup_links.py | 2 ++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 336943ee6..6cb8a9aba 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ third_party/ tools/android tools/clang tools/find_depot_tools.py +tools/generate_library_loader tools/gn tools/gyp tools/memory diff --git a/BUILD.gn b/BUILD.gn index 905c8c08f..87543e58e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -15,6 +15,8 @@ config("libyuv_config") { ] } +use_neon = current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon) + source_set("libyuv") { sources = [ "include/libyuv.h", @@ -90,25 +92,27 @@ source_set("libyuv") { "//third_party:jpeg", ] - if (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) { + if (use_neon) { deps += [ ":libyuv_neon" ] } } -static_library("libyuv_neon") { - sources = [ - "source/compare_neon.cc", - "source/compare_neon64.cc", - "source/rotate_neon.cc", - "source/rotate_neon64.cc", - "source/row_neon.cc", - "source/row_neon64.cc", - "source/scale_neon.cc", - "source/scale_neon64.cc", - ] +if (use_neon) { + static_library("libyuv_neon") { + sources = [ + "source/compare_neon.cc", + "source/compare_neon64.cc", + "source/rotate_neon.cc", + "source/rotate_neon64.cc", + "source/row_neon.cc", + "source/row_neon64.cc", + "source/scale_neon.cc", + "source/scale_neon64.cc", + ] - public_configs = [ ":libyuv_config" ] + public_configs = [ ":libyuv_config" ] - configs -= [ "//build/config/compiler:compiler_arm_fpu" ] - cflags = [ "-mfpu=neon" ] + configs -= [ "//build/config/compiler:compiler_arm_fpu" ] + cflags = [ "-mfpu=neon" ] + } } diff --git a/setup_links.py b/setup_links.py index 80b6c4d59..dad868b78 100755 --- a/setup_links.py +++ b/setup_links.py @@ -43,11 +43,13 @@ DIRECTORIES = [ 'third_party/binutils', 'third_party/libjpeg', 'third_party/libjpeg_turbo', + 'third_party/libudev', 'third_party/llvm-build', 'third_party/nss', 'third_party/yasm', 'tools/android', 'tools/clang', + 'tools/generate_library_loader', 'tools/gn', 'tools/gyp', 'tools/memory',