diff options
author | sdefresne <sdefresne@chromium.org> | 2016-03-25 17:06:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-26 00:07:47 +0000 |
commit | 3bdd5635f4dba38c3035fe992039a833988e147b (patch) | |
tree | 83ec0f14deaddad3ff8bb3062300222f993ea894 /build | |
parent | 2edf9869450cdd9337eab5bc92623a0f074cc7ed (diff) | |
download | chromium_src-3bdd5635f4dba38c3035fe992039a833988e147b.zip chromium_src-3bdd5635f4dba38c3035fe992039a833988e147b.tar.gz chromium_src-3bdd5635f4dba38c3035fe992039a833988e147b.tar.bz2 |
[iOS/GN] Fix compilation of ios_chrome_unittests with gn.
Get GN in sync with gyp by adding missing dependencies, removing
the obsoletes dependencies and adding missing files and targets.
Change the toolchain when targetting iOS devices to not build fat
binaries as this break the "gn gen"-time selection of the level of
optimisation to use from skia and libwebp. Instead, building for
devices on iOS is now similar to other platforms (i.e. the arch is
selected via "target_cpu" with "arm" an alias for "armv7").
Fixes the following errors:
Undefined symbols for architecture arm64:
"_VP8DspInitNEON", referenced from:
_VP8DspInit in dec.o
...
BUG=459705,596237
Review URL: https://codereview.chromium.org/1810423002
Cr-Commit-Position: refs/heads/master@{#383416}
Diffstat (limited to 'build')
-rw-r--r-- | build/config/arm.gni | 5 | ||||
-rw-r--r-- | build/config/mac/BUILD.gn | 12 | ||||
-rw-r--r-- | build/toolchain/mac/BUILD.gn | 29 |
3 files changed, 34 insertions, 12 deletions
diff --git a/build/config/arm.gni b/build/config/arm.gni index d9d2eae..4fd4006 100644 --- a/build/config/arm.gni +++ b/build/config/arm.gni @@ -23,11 +23,6 @@ if (current_cpu == "arm") { # Whether to enable optional NEON code paths. arm_optionally_use_neon = false - - if (is_ios) { - arm_use_neon = false - arm_optionally_use_neon = false - } } assert(arm_float_abi == "" || arm_float_abi == "hard" || diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn index af1fbbc..56e101c 100644 --- a/build/config/mac/BUILD.gn +++ b/build/config/mac/BUILD.gn @@ -24,16 +24,16 @@ config("compiler") { "-arch", "i386", ] - } else if (current_cpu == "arm") { - # TODO(GYP): we may need to distinguish between "arm64", "armv7", - # and "armv7s" for iOS, and hence need multiple current_cpu values - # rather than just "arm". + } else if (current_cpu == "armv7" || current_cpu == "arm") { common_mac_flags += [ "-arch", - "arm64", - "-arch", "armv7", ] + } else if (current_cpu == "arm64") { + common_mac_flags += [ + "-arch", + "arm64", + ] } asmflags = common_mac_flags diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn index 423de77..d198299 100644 --- a/build/toolchain/mac/BUILD.gn +++ b/build/toolchain/mac/BUILD.gn @@ -289,7 +289,6 @@ mac_toolchain("clang_arm") { } mac_toolchain("ios_clang_arm") { - # TODO(GYP): Do we need ios_clang_armv7 and ios_clang_arm64 ? toolchain_cpu = "arm" toolchain_os = "mac" @@ -303,6 +302,34 @@ mac_toolchain("ios_clang_arm") { is_clang = true } +mac_toolchain("ios_clang_armv7") { + toolchain_cpu = "armv7" + toolchain_os = "mac" + + # TODO(GYP): We need to support being able to use the version of clang + # shipped w/ XCode instead of the one pulled from upstream. + prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", + root_build_dir) + cc = "${goma_prefix}$prefix/clang" + cxx = "${goma_prefix}$prefix/clang++" + ld = cxx + is_clang = true +} + +mac_toolchain("ios_clang_arm64") { + toolchain_cpu = "arm64" + toolchain_os = "mac" + + # TODO(GYP): We need to support being able to use the version of clang + # shipped w/ XCode instead of the one pulled from upstream. + prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", + root_build_dir) + cc = "${goma_prefix}$prefix/clang" + cxx = "${goma_prefix}$prefix/clang++" + ld = cxx + is_clang = true +} + mac_toolchain("arm") { toolchain_cpu = "arm" toolchain_os = "mac" |