[PATCH] D54930: [gn build] Add a script to check if source lists in BUILD.gn files and CMakeLists.txt files match.

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 23:46:51 PST 2018


phosek added inline comments.


================
Comment at: llvm/utils/gn/build/sync_source_lists_from_cmake.py:45
+        print(gn_file)
+        print('add:')
+        if cmake_cpp - gn_cpp:
----------------
Move this inside the `if` statement below.


================
Comment at: llvm/utils/gn/build/sync_source_lists_from_cmake.py:48
+            for s in cmake_cpp - gn_cpp:
+                print('    "%s",' % s)
+        if gn_cpp - cmake_cpp:
----------------
You could do just:
```
added = cmake_cpp - gn_cpp
if added:
  print('added:\n%s' % ',\n'.join(added))
```


================
Comment at: llvm/utils/gn/build/sync_source_lists_from_cmake.py:52
+            for s in gn_cpp - cmake_cpp:
+                print(s)
+        print()
----------------
ditto


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54930/new/

https://reviews.llvm.org/D54930





More information about the llvm-commits mailing list