1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
+
1
5
# Setting the compiler based on the existence of clang bin directory
2
6
if test -d "$HOME/.mozbuild/clang/bin"; then
3
7
export CC="$HOME/.mozbuild/clang/bin/clang"
7
11
export CXX=clang++
8
12
fi
9
13
10
- if test "$SURFER_COMPAT" = "x86_64"; then
11
- ac_add_options --target=x86_64-pc-linux
12
- ac_add_options --enable-eme=widevine
13
-
14
- # Enable Profile Guided Optimization
15
- if test "$ZEN_GA_DISABLE_PGO"; then
16
- export ZEN_DUMMY=1
17
- else
18
- export MOZ_PGO=1
19
- ac_add_options MOZ_PGO=1
14
+ if test "$ZEN_RELEASE"; then
15
+ if test "$SURFER_COMPAT" = "x86_64"; then
16
+ ac_add_options --target=x86_64-pc-linux
17
+ ac_add_options --enable-eme=widevine
18
+
19
+ # Enable Profile Guided Optimization
20
+ if test "$ZEN_GA_DISABLE_PGO"; then
21
+ export ZEN_DUMMY=1
22
+ else
23
+ export MOZ_PGO=1
24
+ ac_add_options MOZ_PGO=1
25
+ fi
26
+
27
+ # Optimization flags for SURFER_COMPAT
28
+ ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
29
+
30
+ export LDFLAGS="$LDFLAGS -Wl,-O3"
31
+ export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
32
+ elif test "$SURFER_COMPAT" = "aarch64"; then
33
+ ac_add_options --target=aarch64-linux-gnu
34
+
35
+ ac_add_options --enable-optimize="-O3"
36
+
37
+ # override LTO settings
38
+ export MOZ_LTO=cross,thin
39
+ ac_add_options --enable-lto=cross,thin
40
+
41
+ export CFLAGS="$CFLAGS -O3"
42
+ export CPPFLAGS="$CPPFLAGS -O3"
43
+ export CXXFLAGS="$CXXFLAGS -O3"
44
+ export LDFLAGS="$LDFLAGS -Wl,-O3"
45
+ export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
20
46
fi
21
47
22
- # Optimization flags for SURFER_COMPAT
23
- ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
24
-
25
- export LDFLAGS="$LDFLAGS -Wl,-O3"
26
- export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
27
- elif test "$SURFER_COMPAT" = "aarch64"; then
28
- ac_add_options --target=aarch64-linux-gnu
29
-
30
- ac_add_options --enable-optimize="-O3"
31
-
32
- # override LTO settings
33
- export MOZ_LTO=cross,thin
34
- ac_add_options --enable-lto=cross,thin
35
-
36
- export CFLAGS="$CFLAGS -O3"
37
- export CPPFLAGS="$CPPFLAGS -O3"
38
- export CXXFLAGS="$CXXFLAGS -O3"
39
- export LDFLAGS="$LDFLAGS -Wl,-O3"
40
- export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
41
- fi
42
-
43
- export VERBOSE=1
44
- # Uncomment if you want to enable Polly optimizations
45
- #export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
46
-
47
- # Common options
48
- ac_add_options --enable-alsa
49
- ac_add_options --enable-pulseaudio
50
-
51
- if test "$ZEN_RELEASE"; then
52
48
# Disable DMD and ELF hacks, enable linker lld
53
49
ac_add_options --disable-dmd
54
50
ac_add_options --enable-linker=lld
@@ -60,3 +56,7 @@ if test "$ZEN_RELEASE"; then
60
56
ac_add_options --enable-strip
61
57
export STRIP_FLAGS="--strip-debug --strip-unneeded"
62
58
fi
59
+
60
+ # Common options
61
+ ac_add_options --enable-alsa
62
+ ac_add_options --enable-pulseaudio
0 commit comments