[PATCH] D55172: [gn build] Fix cosmetic bug in write_cmake_config.py
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 2 14:29:33 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL348107: [gn build] Fix cosmetic bug in write_cmake_config.py (authored by nico, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55172?vs=176275&id=176300#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55172/new/
https://reviews.llvm.org/D55172
Files:
llvm/trunk/utils/gn/build/write_cmake_config.py
Index: llvm/trunk/utils/gn/build/write_cmake_config.py
===================================================================
--- llvm/trunk/utils/gn/build/write_cmake_config.py
+++ llvm/trunk/utils/gn/build/write_cmake_config.py
@@ -72,11 +72,11 @@
_, var = in_line.split(None, 1)
try:
var, val = var.split(None, 1)
+ in_line = '#define %s %s' % (var, val) # val ends in \n.
except:
- var, val = var.rstrip(), '\n'
- if values[var]:
- in_line = '#define %s %s' % (var, val)
- else:
+ var = var.rstrip()
+ in_line = '#define %s\n' % var
+ if not values[var]:
in_line = '/* #undef %s */\n' % var
unused_values.discard(var)
out_lines.append(in_line)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55172.176300.patch
Type: text/x-patch
Size: 849 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181202/7ff2b6df/attachment.bin>
More information about the llvm-commits
mailing list