From d25b0242c6c578161abb72202d7a56daec7c2f9a Mon Sep 17 00:00:00 2001 From: Mark Mentovai Date: Wed, 29 Nov 2017 18:04:25 -0500 Subject: [PATCH] gn: Fix a couple of things after 9465fc72ad90 and 2bb56fafe3bd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I redid the Crashpad GN build a few weeks ago (https://chromium-review.googlesource.com/c/chromium/src/+/751403), I tried to order things according to the GN style guide (https://chromium.googlesource.com/chromium/src/tools/gn/+/HEAD/docs/style_guide.md). As for conditionals, I tried to stick to doing a set of conditionals after “sources” for just “sources”, and then another one at the bottom for everything else. It turns out that this was a good idea because it’s an error to say “deps += [something]” inside a conditional until you’ve already said “deps = [something_else]” first. (Maybe that’s why I did it.) 9465fc72ad90 regressed this. 2bb56fafe3bd also left behind a couple of straggler paths that were absolute to Chromium’s root but should have been made relative. This also fixes a comment (about something that won’t yet work outside of Chromium anyway, but still…) Bug: crashpad:79 Change-Id: I8a6f84bfad368cbcdae4fbff11f1d00e2af14b93 Reviewed-on: https://chromium-review.googlesource.com/798172 Commit-Queue: Mark Mentovai Reviewed-by: Scott Graham --- compat/BUILD.gn | 4 ++-- test/BUILD.gn | 7 +++++-- util/BUILD.gn | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/compat/BUILD.gn b/compat/BUILD.gn index 0903e795..a03653cf 100644 --- a/compat/BUILD.gn +++ b/compat/BUILD.gn @@ -74,9 +74,9 @@ static_library("compat") { deps = [] if (is_mac) { - deps += [ "//third_party/crashpad/crashpad/third_party/apple_cctools" ] + deps += [ "../third_party/apple_cctools" ] } if (is_win) { - deps += [ "//third_party/crashpad/crashpad/third_party/getopt" ] + deps += [ "../third_party/getopt" ] } } diff --git a/test/BUILD.gn b/test/BUILD.gn index 441393b8..3dcf2f22 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -47,8 +47,6 @@ static_library("test") { ] if (is_mac) { - libs = [ "bsm" ] - deps += [ "//third_party/crashpad/crashpad/handler" ] sources += [ "mac/dyld.cc", "mac/dyld.h", @@ -89,6 +87,11 @@ static_library("test") { "//base", "//testing/gtest", ] + + if (is_mac) { + libs = [ "bsm" ] + deps += [ "../handler" ] + } } source_set("test_test") { diff --git a/util/BUILD.gn b/util/BUILD.gn index 7f8e7ecc..c744ddc8 100644 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -297,7 +297,7 @@ static_library("util") { public_configs = [ "..:crashpad_config" ] - # Include files from here and generated files starting with "util". + # Include generated files starting with "util". include_dirs = [ "$root_gen_dir/third_party/crashpad/crashpad" ] public_deps = [