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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From c193eba68325c07bbf13eb3995842545b7d23695 Mon Sep 17 00:00:00 2001
From:
Date: Thu, 13 Feb 2020 20:29:09 -0600
Subject: [PATCH] Fix pgo/lto builds
---
build/moz.configure/lto-pgo.configure | 4 ++--
security/sandbox/linux/moz.build | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/build/moz.configure/lto-pgo.configure b/build/moz.configure/lto-pgo.configure
index 394c1d8911..1f26a6e565 100644
--- a/build/moz.configure/lto-pgo.configure
+++ b/build/moz.configure/lto-pgo.configure
@@ -70,7 +70,7 @@ set_config('PGO_PROFILE_PATH', pgo_profile_path)
def pgo_flags(compiler, target, profdata):
if compiler.type == 'gcc':
return namespace(
- gen_cflags=['-fprofile-generate'],
+ gen_cflags=['-fprofile-generate', '-DMOZ_PROFILE_INSTRUMENTATION'],
gen_ldflags=['-fprofile-generate'],
use_cflags=['-fprofile-use', '-fprofile-correction',
'-Wcoverage-mismatch'],
@@ -91,7 +91,7 @@ def pgo_flags(compiler, target, profdata):
gen_ldflags = ['-fprofile-generate']
return namespace(
- gen_cflags=[prefix + '-fprofile-generate'],
+ gen_cflags=[prefix + '-fprofile-generate', '-DMOZ_PROFILE_INSTRUMENTATION'],
gen_ldflags=gen_ldflags,
use_cflags=[prefix + '-fprofile-use=%s' % profdata,
# Some error messages about mismatched profile data
diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
index aae85843e9..e300260fa0 100644
--- a/security/sandbox/linux/moz.build
+++ b/security/sandbox/linux/moz.build
@@ -100,9 +100,8 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
# gcc lto likes to put the top level asm in syscall.cc in a different partition
# from the function using it which breaks the build. Work around that by
# forcing there to be only one partition.
-for f in CONFIG['OS_CXXFLAGS']:
- if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang':
- LDFLAGS += ['--param', 'lto-partitions=1']
+if CONFIG['CC_TYPE'] != 'clang':
+ LDFLAGS += ['--param', 'lto-partitions=1']
DEFINES['NS_NO_XPCOM'] = True
DisableStlWrapping()
--
2.25.0
|