From 15a3bf82cbd67c2d73e9f6a46ec6a3e32d8229eb Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 9 Aug 2019 19:00:24 +0000 Subject: [PATCH] Add defined() guard for checkout_llvm build flag Adds a guard before uses of the checkout_llvm flag, defaulting it to false when unset. This prevents breakages when used in trees that hasn't defined that gn flag. Change-Id: I99c4c1a3db7fcc4823684ad2f358469abdf84780 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112501 Commit-Queue: Zach Anderson Reviewed-by: Siva Annamalai Reviewed-by: Zach Anderson --- BUILD.gn | 6 +++--- runtime/bin/BUILD.gn | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index c9f1531fc60..5fd2b638359 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -16,7 +16,7 @@ group("default") { deps = [ ":runtime", ] - if (checkout_llvm) { + if (defined(checkout_llvm) && checkout_llvm) { deps += [ ":llvm_codegen" ] @@ -126,7 +126,7 @@ group("analysis_server") { } group("check_llvm") { - if (checkout_llvm) { + if (defined(checkout_llvm) && checkout_llvm) { deps = [ "runtime/llvm_codegen/test", ] @@ -134,7 +134,7 @@ group("check_llvm") { } group("llvm_codegen") { - if (checkout_llvm) { + if (defined(checkout_llvm) && checkout_llvm) { deps = [ "runtime/llvm_codegen/codegen", "runtime/llvm_codegen/bit", diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index 34ce64721d5..dd9ea2cc6d5 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -924,7 +924,7 @@ executable("run_vm_tests") { "..:libdart_nosnapshot_with_precompiler", "//third_party/zlib", ] - if (checkout_llvm) { + if (defined(checkout_llvm) && checkout_llvm) { deps += [ "//runtime/llvm_codegen/bit:test" ] } include_dirs = [