forked from OSchip/llvm-project
[gn build] Fix defines define on Windows
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. Differential Revision: https://reviews.llvm.org/D55617 llvm-svn: 348993
This commit is contained in:
parent
d001e0e0f4
commit
95f6875187
|
@ -3,9 +3,11 @@ import("//llvm/utils/gn/build/mac_sdk.gni")
|
||||||
import("//llvm/utils/gn/build/toolchain/compiler.gni")
|
import("//llvm/utils/gn/build/toolchain/compiler.gni")
|
||||||
|
|
||||||
config("compiler_defaults") {
|
config("compiler_defaults") {
|
||||||
|
defines = []
|
||||||
|
|
||||||
# FIXME: Don't define this globally here.
|
# FIXME: Don't define this globally here.
|
||||||
if (host_os != "win") {
|
if (host_os != "win") {
|
||||||
defines = [ "LLVM_ON_UNIX" ]
|
defines += [ "LLVM_ON_UNIX" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!llvm_enable_assertions) {
|
if (!llvm_enable_assertions) {
|
||||||
|
|
Loading…
Reference in New Issue