Backed out 6 changesets (bug 1451104) for causing build bustages on OS X Cross Compiled. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Sat, 21 Jul 2018 03:18:37 +0300
changeset 482729 dcfd01a3010b233490bafa693e51cd96f3ab5ce4
parent 482728 558782eeafe1ceb6bf672afe1bd0ef80e62b7cbb
child 482730 83e2419a36379d0b380f67647b6749ba9116021e
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1451104
milestone63.0a1
backs out8984f6868e572079cc991492124ba99747f0f681
ae7ccb8c938d180f5777d4be8885cd425b711966
52d37e70b6f191a00817b4c7c648b8d5a4d68c08
47405e33747c180dadbe99e4efcd879120c71c20
b4ebc9a500f40bdac529378e6cc9f9922076e5c4
b93c29157feb5f14b7964b7f83ca88560dc508aa
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
Backed out 6 changesets (bug 1451104) for causing build bustages on OS X Cross Compiled. CLOSED TREE Backed out changeset 8984f6868e57 (bug 1451104) Backed out changeset ae7ccb8c938d (bug 1451104) Backed out changeset 52d37e70b6f1 (bug 1451104) Backed out changeset 47405e33747c (bug 1451104) Backed out changeset b4ebc9a500f4 (bug 1451104) Backed out changeset b93c29157feb (bug 1451104)
CLOBBER
build/autoconf/clang-plugin.m4
build/build-clang/build-clang.py
build/unix/build-gcc/build-gcc.sh
taskcluster/ci/toolchain/linux.yml
taskcluster/ci/toolchain/macosx.yml
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 1451104 - deleting GCC 4.9 affects a lot of things, clobber to be safe
+Bug 1371485 - Moving gyp requires a clobber.
--- a/build/autoconf/clang-plugin.m4
+++ b/build/autoconf/clang-plugin.m4
@@ -31,21 +31,17 @@ if test -n "$ENABLE_CLANG_PLUGIN"; then
     AC_MSG_RESULT([$LLVMCONFIG])
 
     if test -z "$LLVMCONFIG"; then
         AC_MSG_ERROR([Cannot find an llvm-config binary for building a clang plugin])
     fi
     dnl For some reason the llvm-config downloaded from clang.llvm.org for clang3_8
     dnl produces a -isysroot flag for a sysroot which might not ship when passed
     dnl --cxxflags. We use sed to remove this argument so that builds work on OSX
-    dnl
-    dnl For a similar reason, we remove any -gcc-toolchain arguments, since the
-    dnl directories specified by such arguments might not exist on the current
-    dnl machine.
-    LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [[^ ]]*//' -e 's/-gcc-toolchain [[^ ]]*//'`
+    LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags | sed -e 's/-isysroot [[^ ]]*//'`
 
     LLVM_LDFLAGS=`$LLVMCONFIG --ldflags | tr '\n' ' '`
 
     if test "${HOST_OS_ARCH}" = "Darwin"; then
         dnl We need to make sure that we use the symbols coming from the clang
         dnl binary. In order to do this, we need to pass -flat_namespace and
         dnl -undefined suppress to the linker. This makes sure that we link the
         dnl symbols into the flat namespace provided by clang, and thus get
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -107,28 +107,17 @@ def delete(path):
     else:
         try:
             os.unlink(path)
         except Exception:
             pass
 
 
 def install_libgcc(gcc_dir, clang_dir):
-    gcc_bin_dir = os.path.join(gcc_dir, 'bin')
-
-    # Copy over gcc toolchain bits that clang looks for, to ensure that
-    # clang is using a consistent version of ld, since the system ld may
-    # be incompatible with the output clang produces.  But copy it to a
-    # target-specific directory so a cross-compiler to Mac doesn't pick
-    # up the (Linux-specific) ld with disastrous results.
-    x64_bin_dir = os.path.join(clang_dir, 'x86_64-unknown-linux-gnu', 'bin')
-    mkdir_p(x64_bin_dir)
-    shutil.copy2(os.path.join(gcc_bin_dir, 'ld'), x64_bin_dir)
-
-    out = subprocess.check_output([os.path.join(gcc_bin_dir, "gcc"),
+    out = subprocess.check_output([os.path.join(gcc_dir, "bin", "gcc"),
                                    '-print-libgcc-file-name'])
 
     libgcc_dir = os.path.dirname(out.rstrip())
     clang_lib_dir = os.path.join(clang_dir, "lib", "gcc",
                                  "x86_64-unknown-linux-gnu",
                                  os.path.basename(libgcc_dir))
     mkdir_p(clang_lib_dir)
     copy_tree(libgcc_dir, clang_lib_dir)
@@ -284,18 +273,17 @@ def get_tool(config, key):
 #           * (nothing will be deleted here)
 #   share/
 #     clang/
 #       clang-format-diff.py
 #       clang-tidy-diff.py
 #       run-clang-tidy.py
 def prune_final_dir_for_clang_tidy(final_dir):
     # Make sure we only have what we expect.
-    dirs = ("bin", "include", "lib", "libexec", "msbuild-bin", "share", "tools",
-            "x86_64-unknown-linux-gnu")
+    dirs = ("bin", "include", "lib", "libexec", "msbuild-bin", "share", "tools")
     for f in glob.glob("%s/*" % final_dir):
         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.
@@ -532,25 +520,19 @@ if __name__ == "__main__":
         extra_cxxflags = ["-stdlib=libc++"]
         extra_cflags2 = []
         extra_cxxflags2 = ["-stdlib=libc++"]
         extra_asmflags = []
         extra_ldflags = []
     elif is_linux():
         extra_cflags = ["-static-libgcc"]
         extra_cxxflags = ["-static-libgcc", "-static-libstdc++"]
-        # When building stage2 and stage3, we want the newly-built clang to pick
-        # up whatever headers were installed from the gcc we used to build stage1,
-        # always, rather than the system headers.  Providing -gcc-toolchain
-        # encourages clang to do that.
-        extra_cflags2 = ["-fPIC",
-                         '-gcc-toolchain', stage1_inst_dir]
+        extra_cflags2 = ["-fPIC"]
         # Silence clang's warnings about arguments not being used in compilation.
-        extra_cxxflags2 = ["-fPIC", '-Qunused-arguments', "-static-libstdc++",
-                           '-gcc-toolchain', stage1_inst_dir]
+        extra_cxxflags2 = ["-fPIC", '-Qunused-arguments', "-static-libstdc++"]
         extra_asmflags = []
         extra_ldflags = []
 
         if 'LD_LIBRARY_PATH' in os.environ:
             os.environ['LD_LIBRARY_PATH'] = ('%s/lib64/:%s' %
                                              (gcc_dir, os.environ['LD_LIBRARY_PATH']))
         else:
             os.environ['LD_LIBRARY_PATH'] = '%s/lib64/' % gcc_dir
--- a/build/unix/build-gcc/build-gcc.sh
+++ b/build/unix/build-gcc/build-gcc.sh
@@ -36,39 +36,32 @@ build_binutils() {
   # if binutils_configure_flags is not set at all, give it the default value
   if [ -z "${binutils_configure_flags+xxx}" ];
   then
     # gold is disabled because we don't use it on automation, and also we ran into
     # some issues with it using this script in build-clang.py.
     #
     # --enable-targets builds extra target support in ld.
     # Enabling aarch64 support brings in arm support, so we don't need to specify that too.
-    #
-    # It is important to have the binutils --target and the gcc --target match,
-    # so binutils will install binaries in a place that gcc will look for them.
-    binutils_configure_flags="--enable-targets=aarch64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu --disable-gold --enable-plugins --disable-nls --with-sysroot=/"
+    binutils_configure_flags="--enable-targets=aarch64-unknown-linux-gnu --disable-gold --enable-plugins --disable-nls --with-sysroot=/"
   fi
 
   mkdir $root_dir/binutils-objdir
   pushd $root_dir/binutils-objdir
   ../binutils-$binutils_version/configure --prefix=${prefix-/tools/gcc}/ $binutils_configure_flags
   make $make_flags
   make install $make_flags DESTDIR=$root_dir
   export PATH=$root_dir/${prefix-/tools/gcc}/bin:$PATH
   popd
 }
 
 build_gcc() {
-  # Be explicit about --build and --target so header and library install
-  # directories are consistent.
-  local target="${1:-x86_64-unknown-linux-gnu}"
-
   mkdir $root_dir/gcc-objdir
   pushd $root_dir/gcc-objdir
-  ../gcc-$gcc_version/configure --prefix=${prefix-/tools/gcc} --build=x86_64-unknown-linux-gnu --target="${target}" --enable-languages=c,c++  --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --with-sysroot=/
+  ../gcc-$gcc_version/configure --prefix=${prefix-/tools/gcc} --enable-languages=c,c++  --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --with-sysroot=/
   make $make_flags
   make $make_flags install DESTDIR=$root_dir
 
   cd $root_dir/tools
   ln -s gcc gcc/bin/cc
 
   tar caf $root_dir/gcc.tar.xz gcc/
   popd
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -20,17 +20,17 @@ linux64-clang-3.9:
         using: toolchain-script
         script: build-clang-3.9-linux.sh
         resources:
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-3.9-linux64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-clang-5:
     description: "Clang 5 toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(clang5)
         tier: 1
@@ -41,17 +41,17 @@ linux64-clang-5:
         using: toolchain-script
         script: build-clang-5-linux.sh
         resources:
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-5-linux64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-clang-6:
     description: "Clang 6 toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(clang6)
         tier: 1
@@ -63,17 +63,17 @@ linux64-clang-6:
         script: build-clang-6-linux.sh
         resources:
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-6-linux64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang
         toolchain-artifact: public/build/clang.tar.xz
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-clang-7:
     description: "Clang 7 toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(clang7)
         tier: 1
@@ -84,17 +84,17 @@ linux64-clang-7:
         using: toolchain-script
         script: build-clang-7-linux.sh
         resources:
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-7-pre-linux64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-clang-6-macosx-cross:
     description: "Clang 6 toolchain build with MacOS Compiler RT libs"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(clang6-macosx-cross)
         tier: 1
@@ -111,17 +111,17 @@ linux64-clang-6-macosx-cross:
             - 'build/build-clang/clang-6-macosx64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang-macosx-cross
         toolchain-artifact: public/build/clang.tar.xz
         tooltool-downloads: internal
     toolchains:
         - linux64-cctools-port
         - linux64-clang-6
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-clang-tidy:
     description: "Clang-tidy build"
     index:
         product: static-analysis
         job-name: linux64-clang-tidy
     treeherder:
         kind: build
@@ -139,17 +139,43 @@ linux64-clang-tidy:
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-tidy-linux64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang-tidy.tar.xz
     run-on-projects:
         - trunk
         - try
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
+
+linux64-gcc-4.9:
+    description: "GCC 4.9 toolchain build"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TL(gcc4.9)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 3600
+    run:
+        using: toolchain-script
+        script: build-gcc-4.9-linux.sh
+        resources:
+            - 'build/unix/build-gcc/build-gcc.sh'
+        toolchain-artifact: public/build/gcc.tar.xz
+    fetches:
+        fetch:
+            - binutils-2.25.1
+            - cloog-0.18.1
+            - gcc-4.9.4
+            - gmp-5.1.3
+            - isl-0.12.2
+            - mpc-0.8.2
+            - mpfr-3.1.5
 
 linux64-gcc-6:
     description: "GCC 6 toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(gcc6)
         tier: 1
@@ -235,17 +261,17 @@ linux64-llvm-dsymutil:
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 1800
     run:
         using: toolchain-script
         script: build-llvm-dsymutil.sh
         toolchain-artifact: public/build/llvm-dsymutil.tar.xz
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-binutils:
     description: "Binutils toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(binutil)
         tier: 1
@@ -568,17 +594,17 @@ linux64-gn:
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
             - 'taskcluster/scripts/misc/build-gn-common.sh'
         toolchain-artifact: public/build/gn.tar.xz
     run-on-projects:
         - trunk
         - try
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-tup:
     description: "tup toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(tup)
         tier: 2
@@ -590,17 +616,17 @@ linux64-tup:
         script: build-tup-linux.sh
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/tup.tar.xz
     run-on-projects:
         - trunk
         - try
     toolchains:
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 linux64-upx:
     description: "UPX build for MinGW32 Cross Compile"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TMW(upx)
         tier: 2
--- a/taskcluster/ci/toolchain/macosx.yml
+++ b/taskcluster/ci/toolchain/macosx.yml
@@ -28,17 +28,17 @@ macosx64-clang:
         resources:
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-6-macosx64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
     toolchains:
         - linux64-cctools-port
         - linux64-clang-6
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 macosx64-clang-tidy:
     description: "Clang-tidy build"
     index:
         product: static-analysis
         job-name: macosx64-clang-tidy
     treeherder:
         kind: build
@@ -58,17 +58,17 @@ macosx64-clang-tidy:
             - 'build/clang-plugin/**'
             - 'build/build-clang/build-clang.py'
             - 'build/build-clang/clang-tidy-macosx64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang-tidy.tar.xz
     toolchains:
         - linux64-cctools-port
         - linux64-clang-6
-        - linux64-gcc-6
+        - linux64-gcc-4.9
 
 macosx64-cctools-port:
     description: "cctools-port toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TM(cctools)
         tier: 1