From 4ee20f5831913c67fead07682143c37280f60146 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Mon, 27 Nov 2017 13:27:20 -0800 Subject: [PATCH] Add Fuchsia clang and sdk to DEPS These use CIPD (from depot_tools) to download packages created by the Fuchsia team. The .ensure file is passed to `cipd` which currently include specificiations for the Fuchsia team's build of clang (which, because it's close to HEAD includes support for targeting Fuchsia), as well as the Fuchsia SDK. Both packages are specified as "latest" rather than pinning to a specific revision. At this early point in the process we don't have any good reason to pin, but that can be accomplished later by replacing that with a specific package's SHA1. Due to the (relatively new) 'condition': 'checkout_fuchsia', this DEPS step will only be run when .gclient includes 'fuchsia' in the target_os block at the top_level, e.g. $ cat .gclient solutions = [ { ... }, ] target_os = ['fuchsia'] Bug: crashpad:196, crashpad:209 Change-Id: Id6d444a1c4450ffde8ee6665ff9720ce454c5cdf Reviewed-on: https://chromium-review.googlesource.com/786092 Commit-Queue: Scott Graham Reviewed-by: Mark Mentovai --- .gitignore | 3 +++ DEPS | 12 ++++++++++++ third_party/fuchsia/README.crashpad | 4 ++++ third_party/fuchsia/toolchain.ensure | 19 +++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 third_party/fuchsia/README.crashpad create mode 100644 third_party/fuchsia/toolchain.ensure diff --git a/.gitignore b/.gitignore index 3311c2ef..41806962 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ .gdbinit /Makefile /out +/third_party/fuchsia/.cipd +/third_party/fuchsia/clang +/third_party/fuchsia/sdk /third_party/gtest/gtest /third_party/gyp/gyp /third_party/mini_chromium/mini_chromium diff --git a/DEPS b/DEPS index 2e40af5e..c37cde74 100644 --- a/DEPS +++ b/DEPS @@ -113,6 +113,18 @@ hooks = [ 'buildtools/linux64/gn.sha1', ], }, + { + 'name': 'fuchsia_clang', + 'pattern': '.', + 'condition': 'checkout_fuchsia', + 'action': [ + 'cipd', + 'ensure', + '-ensure-file', 'crashpad/third_party/fuchsia/toolchain.ensure', + '-root', 'crashpad/third_party/fuchsia', + '-log-level', 'info', + ], + }, { 'name': 'gyp', 'pattern': '\.gypi?$', diff --git a/third_party/fuchsia/README.crashpad b/third_party/fuchsia/README.crashpad new file mode 100644 index 00000000..fc4a514a --- /dev/null +++ b/third_party/fuchsia/README.crashpad @@ -0,0 +1,4 @@ +This directory is a placeholder for Fuchsia tools that will be downloaded by +CIPD (https://github.com/luci/luci-go/tree/master/cipd). The toolchain.ensure +files specifies which CIPD packages to retrieve, at which versions, and where +they're stored locally. The CIPD update happens as part of gclient runhooks. diff --git a/third_party/fuchsia/toolchain.ensure b/third_party/fuchsia/toolchain.ensure new file mode 100644 index 00000000..00f9b788 --- /dev/null +++ b/third_party/fuchsia/toolchain.ensure @@ -0,0 +1,19 @@ +# Copyright 2017 The Crashpad Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +@Subdir clang +fuchsia/clang/${os}-${arch} latest + +@Subdir sdk +fuchsia/sdk/${os=linux}-${arch} latest