We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ada01d1 commit 252c4dcCopy full SHA for 252c4dc
llvm/utils/gn/build/write_cmake_config.py
@@ -73,6 +73,11 @@ def repl(m):
73
in_line = var_re.sub(repl, in_line)
74
if in_line.startswith('#cmakedefine01 '):
75
_, var = in_line.split()
76
+ if values[var] == '0':
77
+ print('error: "%s=0" used with #cmakedefine01 %s' % (var, var))
78
+ print(" '0' evaluates as truthy with #cmakedefine01")
79
+ print(' use "%s=" instead' % var)
80
+ return 1
81
in_line = '#define %s %d\n' % (var, 1 if values[var] else 0)
82
unused_values.discard(var)
83
elif in_line.startswith('#cmakedefine '):
0 commit comments