[PATCH] D55617: [gn build] Fix defines define on Windows
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 12 14:03:40 PST 2018
smeenai created this revision.
smeenai added reviewers: phosek, thakis.
On Windows, we won't go into the `host_os != "win"` block, so `defines`
won't have been defined, and we'll run into an undefined identifier
error when we try to later append to it. Unconditionally define it at
the start and append to it everywhere else.
Repository:
rL LLVM
https://reviews.llvm.org/D55617
Files:
llvm/utils/gn/build/BUILD.gn
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -3,9 +3,11 @@
import("//llvm/utils/gn/build/toolchain/compiler.gni")
config("compiler_defaults") {
+ defines = []
+
# FIXME: Don't define this globally here.
if (host_os != "win") {
- defines = [ "LLVM_ON_UNIX" ]
+ defines += [ "LLVM_ON_UNIX" ]
}
if (!llvm_enable_assertions) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55617.177912.patch
Type: text/x-patch
Size: 476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181212/cdae8957/attachment.bin>
More information about the llvm-commits
mailing list