Bug 521435 Add lto wrappers for nm, ar, and ranlib draft
authorTom Ritter <tom@mozilla.com>
Tue, 27 Feb 2018 10:13:47 -0600
changeset 763021 355d512fcbb5e45a6fafe5e1c53ee4b87fef4356
parent 763020 63b54490d9ed251a2eda0e53ecb960eb7e1d15a0
child 763022 1b2e6b2148ef609108a2ec0d0da0e87d71c49045
push id101309
push userbmo:tom@mozilla.com
push dateMon, 05 Mar 2018 00:57:59 +0000
bugs521435
milestone60.0a1
Bug 521435 Add lto wrappers for nm, ar, and ranlib MozReview-Commit-ID: FgM82iw4eVu
build/unix/bin/ar
build/unix/bin/nm
build/unix/bin/ranlib
build/unix/mozconfig.linux
new file mode 100755
--- /dev/null
+++ b/build/unix/bin/ar
@@ -0,0 +1,4 @@
+#! /bin/sh
+command=$1
+shift
+/builds/worker/workspace/build/src/gcc/bin/ar $command --plugin /builds/worker/workspace/build/src/gcc/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/liblto_plugin.so $*
\ No newline at end of file
new file mode 100755
--- /dev/null
+++ b/build/unix/bin/nm
@@ -0,0 +1,4 @@
+#! /bin/sh
+command=$1
+shift
+/builds/worker/workspace/build/src/gcc/bin/nm $command --plugin /builds/worker/workspace/build/src/gcc/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/liblto_plugin.so $*
\ No newline at end of file
new file mode 100755
--- /dev/null
+++ b/build/unix/bin/ranlib
@@ -0,0 +1,4 @@
+#! /bin/sh
+command=$1
+shift
+/builds/worker/workspace/build/src/gcc/bin/ranlib $command --plugin /builds/worker/workspace/build/src/gcc/libexec/gcc/x86_64-pc-linux-gnu/6.4.0/liblto_plugin.so $*
\ No newline at end of file
old mode 100644
new mode 100755
--- a/build/unix/mozconfig.linux
+++ b/build/unix/mozconfig.linux
@@ -13,15 +13,15 @@ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
 # all yet.
 if [ -z "$no_tooltool" ]
 then
   CC="$TOOLTOOL_DIR/gcc/bin/gcc"
   CXX="$TOOLTOOL_DIR/gcc/bin/g++"
 
   # We want to make sure we use binutils and other binaries in the tooltool
   # package.
-  mk_add_options "export PATH=$TOOLTOOL_DIR/gcc/bin:$PATH"
+  mk_add_options "export PATH=$TOOLTOOL_DIR/build/unix/bin:$TOOLTOOL_DIR/gcc/bin:$PATH"
 else
   CC="/tools/gcc-4.7.3-0moz1/bin/gcc"
   CXX="/tools/gcc-4.7.3-0moz1/bin/g++"
 fi
 
 . "$topsrcdir/build/unix/mozconfig.stdcxx"