Skip to content

Commit

Permalink
Add checkout_nacl gclient flag (default true) (attempt chromium#3).
Browse files Browse the repository at this point in the history
This is a straight (merged) re-land of {#507355}, since
the bug in gclient that this tickled was fixed.

See https://groups.google.com/a/chromium.org/d/msg/chromium-dev/tO8kIrDtQc8/bCRO-UXxBQAJ
for discussion.

TBR=phajdan.jr@chromium.org, bradnelson@chromium.org
BUG=756688

Change-Id: Ife1ed0f30285828e37170306e2723fd70f591d6d
Reviewed-on: https://chromium-review.googlesource.com/750363
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513416}
  • Loading branch information
dpranke authored and Commit Bot committed Nov 2, 2017
1 parent 2cd7540 commit 4dabe80
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
8 changes: 4 additions & 4 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -686,10 +686,10 @@ group("gn_all") {
if (!is_android) {
deps += [ "//chrome/test:load_library_perf_tests" ]
}
deps += [
"//native_client/src/trusted/platform_qualify:vcpuid",
"//third_party/libjpeg_turbo:simd_asm",
]
if (enable_nacl) {
deps += [ "//native_client/src/trusted/platform_qualify:vcpuid" ]
}
deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
}
if (is_linux && current_toolchain == host_toolchain) {
deps += [ "//v8:v8_shell" ]
Expand Down
22 changes: 17 additions & 5 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
# git commit -a
# git cl upload

gclient_gn_args_file = 'src/build/config/gclient_args.gni'
gclient_gn_args = [
'checkout_nacl',
]


vars = {
# By default, we should check out everything needed to run on the main
Expand All @@ -34,6 +39,10 @@ vars = {
# purposes.
'checkout_configuration': 'default',

# Check out and download nacl by default. This can be disabled e.g. with
# custom_vars.
'checkout_nacl': True,

# By default, do not check out src-internal. This can be overridden e.g. with
# custom_vars.
'checkout_src_internal': False,
Expand Down Expand Up @@ -215,8 +224,10 @@ deps = {
'src/media/cdm/api':
Var('chromium_git') + '/chromium/cdm.git' + '@' + 'ea5df8e78fbd0a4c24cc3a1f3faefefcd1b45237',

'src/native_client':
Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'),
'src/native_client': {
'url': Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'),
'condition': 'checkout_nacl',
},

'src/third_party/SPIRV-Tools/src':
Var('chromium_git') + '/external/github.com/KhronosGroup/SPIRV-Tools.git' + '@' + '9166854ac93ef81b026e943ccd230fed6c8b8d3c',
Expand Down Expand Up @@ -353,7 +364,7 @@ deps = {
# GNU binutils assembler for x86-32.
'src/third_party/gnu_binutils': {
'url': Var('chromium_git') + '/native_client/deps/third_party/gnu_binutils.git' + '@' + 'f4003433b61b25666565690caf3d7a7a1a4ec436',
'condition': 'checkout_win',
'condition': 'checkout_nacl and checkout_win',
},

'src/third_party/gperf': {
Expand Down Expand Up @@ -470,7 +481,7 @@ deps = {
# GNU binutils assembler for x86-64.
'src/third_party/mingw-w64/mingw/bin': {
'url': Var('chromium_git') + '/native_client/deps/third_party/mingw-w64/mingw/bin.git' + '@' + '3cc8b140b883a9fe4986d12cfd46c16a093d3527',
'condition': 'checkout_win',
'condition': 'checkout_nacl and checkout_win',
},

# Graphics buffer allocator for Chrome OS.
Expand All @@ -493,7 +504,7 @@ deps = {
# Binaries for nacl sdk.
'src/third_party/nacl_sdk_binaries': {
'url': Var('chromium_git') + '/chromium/deps/nacl_sdk_binaries.git' + '@' + '759dfca03bdc774da7ecbf974f6e2b84f43699a5',
'condition': 'checkout_win',
'condition': 'checkout_nacl and checkout_win',
},

'src/third_party/netty-tcnative/src': {
Expand Down Expand Up @@ -714,6 +725,7 @@ hooks = [
# anywhere from 30 minutes to 4 hours depending on platform to build.
'name': 'nacltools',
'pattern': '.',
'condition': 'checkout_nacl',
'action': [
'python',
'src/build/download_nacl_toolchains.py',
Expand Down
1 change: 1 addition & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# mirror in DEPS. Without it, a lot is wiped and re-downloaded for each sync.
/android/bin
/android/binary_size/apks/**/*.apk
/config/gclient_args.gni
/Debug
/Debug_x64
/goma
Expand Down
6 changes: 4 additions & 2 deletions components/nacl/features.gni
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# found in the LICENSE file.

import("//build/config/chromecast_build.gni")
import("//build/config/gclient_args.gni")

declare_args() {
# Enables Native Client support.
# Temporarily disable nacl on arm64 linux to get rid of compilation errors.
# TODO: When mipsel-nacl-clang is available, drop the exclusion.
enable_nacl =
!is_ios && !is_android && !is_fuchsia && !is_chromecast &&
current_cpu != "mipsel" && current_cpu != "mips64el" &&
checkout_nacl && !is_ios && !is_android && !is_fuchsia &&
!is_chromecast && current_cpu != "mipsel" && current_cpu != "mips64el" &&
!(is_linux && target_cpu == "arm64") && !(is_win && host_os != "win")

# Non-SFI is not yet supported on mipsel
Expand All @@ -19,3 +20,4 @@ declare_args() {

assert(!(is_win && host_os != "win") || !enable_nacl,
"NaCl doesn't work in win cross builds, crbug.com/774186")
assert(!enable_nacl || checkout_nacl)

0 comments on commit 4dabe80

Please sign in to comment.