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 <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
Chris Bracken 2019-08-09 19:00:24 +00:00 committed by commit-bot@chromium.org
parent d5d00c847a
commit 15a3bf82cb
2 changed files with 4 additions and 4 deletions

View file

@ -16,7 +16,7 @@ group("default") {
deps = [ deps = [
":runtime", ":runtime",
] ]
if (checkout_llvm) { if (defined(checkout_llvm) && checkout_llvm) {
deps += [ deps += [
":llvm_codegen" ":llvm_codegen"
] ]
@ -126,7 +126,7 @@ group("analysis_server") {
} }
group("check_llvm") { group("check_llvm") {
if (checkout_llvm) { if (defined(checkout_llvm) && checkout_llvm) {
deps = [ deps = [
"runtime/llvm_codegen/test", "runtime/llvm_codegen/test",
] ]
@ -134,7 +134,7 @@ group("check_llvm") {
} }
group("llvm_codegen") { group("llvm_codegen") {
if (checkout_llvm) { if (defined(checkout_llvm) && checkout_llvm) {
deps = [ deps = [
"runtime/llvm_codegen/codegen", "runtime/llvm_codegen/codegen",
"runtime/llvm_codegen/bit", "runtime/llvm_codegen/bit",

View file

@ -924,7 +924,7 @@ executable("run_vm_tests") {
"..:libdart_nosnapshot_with_precompiler", "..:libdart_nosnapshot_with_precompiler",
"//third_party/zlib", "//third_party/zlib",
] ]
if (checkout_llvm) { if (defined(checkout_llvm) && checkout_llvm) {
deps += [ "//runtime/llvm_codegen/bit:test" ] deps += [ "//runtime/llvm_codegen/bit:test" ]
} }
include_dirs = [ include_dirs = [