summarylogtreecommitdiffstats
path: root/0014-Make-PGO-use-toolchain.patch
blob: 681b86d2fb38ded1975d6be654d98532cc30d3a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Thomas Deutschmann <whissi@gentoo.org>
Date: Mon, 6 Apr 2020 20:13:34 +0200
Subject: [PATCH] Make PGO use toolchain

Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
---
 build/unix/mozconfig.unix | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix
index f1e5a2edd9257f82210019ae4b9e68187a9545a7..b7f9c6bb8f9c01f1c6ab9c9c7bf7ed41e8f99fc3 100644
--- a/build/unix/mozconfig.unix
+++ b/build/unix/mozconfig.unix
@@ -4,6 +4,15 @@ if [ -n "$FORCE_GCC" ]; then
     CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
     CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
 
+    if [ -n "$MOZ_PGO" ]; then
+        if [ -z "$USE_ARTIFACT" ]; then
+            ac_add_options --enable-lto
+        fi
+        export AR="$topsrcdir/gcc/bin/gcc-ar"
+        export NM="$topsrcdir/gcc/bin/gcc-nm"
+        export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib"
+    fi
+
     # We want to make sure we use binutils and other binaries in the tooltool
     # package.
     mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH"