Bug 1447904 - for clang-tidy toolchains set default cxx dialect cxx14. r=froydnj
☠☠ backed out by 78e9c8e6f699 ☠ ☠
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 28 Mar 2018 15:02:09 +0300
changeset 410478 0c253578b79107bc6b2bbd09a39aeca1f3d5170b
parent 410477 160077ddc286abc5bdb899354fe4c584763551e6
child 410479 26afc017659075166e63dedec600f4bb4cd66523
push id101504
push userrgurzau@mozilla.com
push dateWed, 28 Mar 2018 22:01:17 +0000
treeherdermozilla-inbound@e51ae123ece9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1447904
milestone61.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 1447904 - for clang-tidy toolchains set default cxx dialect cxx14. r=froydnj MozReview-Commit-ID: LrGETsz0W6q
build/build-clang/clang-tidy-cxx14.patch
build/build-clang/clang-tidy-linux64.json
build/build-clang/clang-tidy-macosx64.json
build/build-clang/clang-tidy-win32.json
build/build-clang/clang-tidy-win64.json
new file mode 100644
--- /dev/null
+++ b/build/build-clang/clang-tidy-cxx14.patch
@@ -0,0 +1,23 @@
+Backport cxx14 default dialect flag from clang 6.0.0 trunk to 5.0.1
+
+Index: lib/Frontend/CompilerInvocation.cpp
+===================================================================
+--- a/clang/tools/lib/Frontend/CompilerInvocation.cpp	(revision 320871)
++++ b/clang/tools/lib/Frontend/CompilerInvocation.cpp	(working copy)
+@@ -1690,11 +1690,11 @@
+       break;
+     case InputKind::CXX:
+     case InputKind::ObjCXX:
+-      // The PS4 uses C++11 as the default C++ standard.
+-      if (T.isPS4())
+-        LangStd = LangStandard::lang_gnucxx11;
+-      else
+-        LangStd = LangStandard::lang_gnucxx98;
++#if defined(CLANG_DEFAULT_STD_CXX)
++      LangStd = CLANG_DEFAULT_STD_CXX;
++#else
++      LangStd = LangStandard::lang_gnucxx14;
++#endif
+       break;
+     case InputKind::RenderScript:
+       LangStd = LangStandard::lang_c99;
--- a/build/build-clang/clang-tidy-linux64.json
+++ b/build/build-clang/clang-tidy-linux64.json
@@ -10,10 +10,13 @@
     "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_501/final",
     "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_501/final",
     "python_path": "/usr/bin/python2.7",
     "gcc_dir": "/builds/worker/workspace/build/src/gcc",
     "cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
     "cxx": "/builds/worker/workspace/build/src/gcc/bin/g++",
-    "as": "/builds/worker/workspace/build/src/gcc/bin/gcc"
+    "as": "/builds/worker/workspace/build/src/gcc/bin/gcc",
+    "patches": [
+      "clang-tidy-cxx14.patch"
+    ]
 }
--- a/build/build-clang/clang-tidy-macosx64.json
+++ b/build/build-clang/clang-tidy-macosx64.json
@@ -18,11 +18,12 @@
     "cxx": "/builds/worker/workspace/build/src/clang/bin/clang++",
     "as": "/builds/worker/workspace/build/src/clang/bin/clang",
     "ar": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ar",
     "ranlib": "/builds/worker/workspace/build/src/cctools/bin/x86_64-apple-darwin11-ranlib",
     "ld": "/builds/worker/workspace/build/src/clang/bin/clang",
     "patches": [
       "llvm-debug-frame-for-5.patch",
       "compiler-rt-cross-compile.patch",
-      "compiler-rt-no-codesign.patch"
+      "compiler-rt-no-codesign.patch",
+      "clang-tidy-cxx14.patch"
     ]
 }
--- a/build/build-clang/clang-tidy-win32.json
+++ b/build/build-clang/clang-tidy-win32.json
@@ -7,10 +7,13 @@
     "build_clang_tidy": true,
     "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final",
     "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final",
     "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "python_path": "c:/mozilla-build/python/python.exe",
     "cc": "cl.exe",
-    "cxx": "cl.exe"
+    "cxx": "cl.exe",
+    "patches": [
+      "clang-tidy-cxx14.patch"
+    ]
 }
--- a/build/build-clang/clang-tidy-win64.json
+++ b/build/build-clang/clang-tidy-win64.json
@@ -8,10 +8,13 @@
     "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_501/final",
     "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_501/final",
     "extra_repo": "https://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_501/final",
     "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_501/final",
     "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk",
     "python_path": "c:/mozilla-build/python/python.exe",
     "cc": "cl.exe",
     "cxx": "cl.exe",
-    "ml": "ml64.exe"
+    "ml": "ml64.exe",
+    "patches": [
+      "clang-tidy-cxx14.patch"
+    ]
 }