Bug 1259848 - Various fixes for finding gcc in the correct location for spidermonkey TC builds and hazard shell builds, r=terrence
authorSteve Fink <sfink@mozilla.com>
Tue, 22 Mar 2016 14:04:45 -0700
changeset 316058 73a8f24d6ecab1e11decb6ca99f1367f5f4d502e
parent 316057 719ded1e521d9a8a42e9c42c0c0eaf5c709d706f
child 316059 85d6982a515a08799cd86d78ea59905392131754
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1259848
milestone48.0a1
Bug 1259848 - Various fixes for finding gcc in the correct location for spidermonkey TC builds and hazard shell builds, r=terrence MozReview-Commit-ID: CIMSylw6JDr
js/src/devtools/automation/autospider.sh
js/src/devtools/rootAnalysis/run_complete
testing/taskcluster/scripts/builder/build-sm.sh
--- a/js/src/devtools/automation/autospider.sh
+++ b/js/src/devtools/automation/autospider.sh
@@ -112,17 +112,17 @@ elif [ "$OSTYPE" = "linux-gnu" ]; then
     *)
       if [ "$UNAME_M" = "x86_64" ]; then
         USE_64BIT=true
       fi
       ;;
     esac
   fi
 
-  if [ "$UNAME_M" != "arm" ] && [ -n "$AUTOMATION" ]; then
+  if [ -n "$AUTOMATION" ]; then
     export CC=$GCCDIR/bin/gcc
     export CXX=$GCCDIR/bin/g++
     if $USE_64BIT; then
       export LD_LIBRARY_PATH=$GCCDIR/lib64
     else
       export LD_LIBRARY_PATH=$GCCDIR/lib
     fi
   fi
--- a/js/src/devtools/rootAnalysis/run_complete
+++ b/js/src/devtools/rootAnalysis/run_complete
@@ -245,16 +245,21 @@ sub run_build
             if ($ann_file ne "" && -e $ann_file);
         print CONFIG join(" ", @extra) . "\n";
         close(CONFIG);
 
 	# Tell the wrapper where to find the config
 	$ENV{"XGILL_CONFIG"} = Cwd::abs_path($config_file);
 
         # update the PATH so that the build will see the wrappers.
+        if (exists $ENV{CC}) {
+            $ENV{PATH} = dirname($ENV{CC}) . ":$ENV{PATH}";
+            delete $ENV{CC};
+            delete $ENV{CXX};
+        }
         $ENV{"PATH"} = "$wrap_dir:" . $ENV{"PATH"};
 
         # do the build, cleaning if necessary.
         chdir $build_dir;
         clean_project() if ($do_clean);
         my $exit_status = build_project();
 
         # signal the manager that it's over.
--- a/testing/taskcluster/scripts/builder/build-sm.sh
+++ b/testing/taskcluster/scripts/builder/build-sm.sh
@@ -45,22 +45,27 @@ esac
 BROWSER_PLATFORM=$PLATFORM_OS$BITS
 TOOLTOOL_MANIFEST="$SRCDIR/browser/config/tooltool-manifests/$BROWSER_PLATFORM/releng.manifest"
 
 tc-vcs checkout $WORK/tooltool $TOOLTOOL_REPO $TOOLTOOL_REPO $TOOLTOOL_REV
 (cd $WORK && python tooltool/tooltool.py --url $TOOLTOOL_SERVER -m $TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c $TOOLTOOL_CACHE})
 
 # Point to the appropriate compiler, assuming taskcluster will one day run on non-Linux OSes.
 case "$PLATFORM_OS" in
-    linux) export PATH="$WORK/gcc/bin":$PATH ;;
-    macosx) export PATH="$WORK/clang/bin":$PATH ;;
+    linux)
+        export PATH="$WORK/gcc/bin":$PATH
+        export GCCDIR="$WORK/gcc"
+        ;;
+    macosx)
+        export PATH="$WORK/clang/bin":$PATH
+        ;;
 esac
 
 # Run the script
-$SRCDIR/js/src/devtools/automation/autospider.sh $SPIDERMONKEY_VARIANT
+AUTOMATION=1 $SRCDIR/js/src/devtools/automation/autospider.sh $SPIDERMONKEY_VARIANT
 BUILD_STATUS=$?
 
 # Ensure upload dir exists
 mkdir -p $UPLOAD_DIR
 
 # Copy artifacts for upload by TaskCluster
 cp -rL $SRCDIR/obj-spider/dist/bin/{js,jsapi-tests,js-gdb.py} $UPLOAD_DIR