Bug 1406310 - Also ship clang-format in the clang-tidy build job r=glandium
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 06 Oct 2017 09:50:48 +0200
changeset 385796 1daa8a6f30dbf7e0e6803dbda20f4323527ab29b
parent 385795 0550763a800b92417797c40f0e978d9ab879e795
child 385797 04bbcb6b2f10a14d6560103f9e5c97bccf24541a
push id32668
push userarchaeopteryx@coole-files.de
push dateThu, 12 Oct 2017 21:56:02 +0000
treeherdermozilla-central@46a75c66bb51 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1406310
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1406310 - Also ship clang-format in the clang-tidy build job r=glandium MozReview-Commit-ID: 4C992sYlMo2
build/build-clang/build-clang.py
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -253,18 +253,19 @@ def get_tool(config, key):
 
 # This function is intended to be called on the final build directory when
 # building clang-tidy.  Its job is to remove all of the files which won't
 # be used for clang-tidy to reduce the download size.  Currently when this
 # function finishes its job, it will leave final_dir with a layout like this:
 #
 # clang/
 #   bin/
+#     clang-apply-replacements
+#     clang-format
 #     clang-tidy
-#     clang-apply-replacements
 #   include/
 #     * (nothing will be deleted here)
 #   lib/
 #     clang/
 #       4.0.0/
 #         include/
 #           * (nothing will be deleted here)
 #   share/
@@ -278,17 +279,17 @@ def prune_final_dir_for_clang_tidy(final
         if os.path.basename(f) not in dirs:
             raise Exception("Found unknown file %s in the final directory" % f)
         if not os.path.isdir(f):
             raise Exception("Expected %s to be a directory" % f)
 
     # In bin/, only keep clang-tidy and clang-apply-replacements. The last one
     # is used to auto-fix some of the issues detected by clang-tidy.
     re_clang_tidy = re.compile(
-        r"^clang-(tidy|apply-replacements)(\.exe)?$", re.I)
+        r"^clang-(apply-replacements|format|tidy)(\.exe)?$", re.I)
     for f in glob.glob("%s/bin/*" % final_dir):
         if re_clang_tidy.search(os.path.basename(f)) is None:
             delete(f)
 
     # Keep include/ intact.
 
     # In lib/, only keep lib/clang/N.M.O/include.
     re_ver_num = re.compile(r"^\d+\.\d+\.\d+$", re.I)