Skip to content

Commit e6b1cbd

Browse files
committed
chore: Cleaned up macos mozconfig for packaging, b=no-bug, c=configs
1 parent f07c1a5 commit e6b1cbd

File tree

1 file changed

+34
-32
lines changed

1 file changed

+34
-32
lines changed

configs/macos/mozconfig

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,40 @@ ac_add_options --enable-eme=widevine
1212
export MOZ_LTO=cross,thin
1313
ac_add_options --enable-lto=cross,thin
1414

15-
if test "$ZEN_RELEASE"; then
16-
if test "$ZEN_GA_DISABLE_PGO"; then
17-
export ZEN_DUMMY=1
18-
else
19-
export MOZ_PGO=1
20-
ac_add_options MOZ_PGO=1
21-
fi
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
20+
fi
21+
22+
if test "$SURFER_COMPAT" = "x86_64"; then
23+
ac_add_options --target=x86_64-apple-darwin
2224

23-
if test "$SURFER_COMPAT" = "x86_64"; then
24-
ac_add_options --target=x86_64-apple-darwin
25-
26-
ac_add_options --enable-wasm-avx
27-
ac_add_options --enable-optimize="-march=nehalem -mtune=haswell -O3 -w"
28-
29-
export CFLAGS="-O3 -march=nehalem"
30-
export CPPFLAGS="-O3 -march=nehalem"
31-
export CXXFLAGS="-O3 -march=nehalem"
32-
export LDFLAGS="-Wl,-O3 -march=nehalem"
33-
export RUSTFLAGS="-Ctarget-cpu=nehalem"
34-
else
35-
ac_add_options --enable-clang-plugin
36-
ac_add_options --target=aarch64-apple-darwin
37-
38-
ac_add_options --enable-optimize="-O3 -mcpu=apple-m1 -march=armv8.3-a+simd"
39-
40-
# As of Clang 13, the default is -mcpu=apple-m1 when using a aarch64-apple-macos target,
41-
# but we're using apple64-apple-darwin, which defaults to -mcpu=apple-a7, which disables
42-
# a bunch of # performance-enabling CPU features.
43-
export CFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
44-
export CPPFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
45-
export CXXFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
46-
export LDFLAGS="-Wl,-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
47-
export RUSTFLAGS="-C target-feature=+v8.3a -Ctarget-cpu=apple-m1"
25+
if test "$ZEN_RELEASE"; then
26+
ac_add_options --enable-wasm-avx
27+
ac_add_options --enable-optimize="-march=nehalem -mtune=haswell -O3 -w"
28+
29+
export CFLAGS="-O3 -march=nehalem"
30+
export CPPFLAGS="-O3 -march=nehalem"
31+
export CXXFLAGS="-O3 -march=nehalem"
32+
export LDFLAGS="-Wl,-O3 -march=nehalem"
33+
export RUSTFLAGS="-Ctarget-cpu=nehalem"
34+
fi
35+
else
36+
ac_add_options --enable-clang-plugin
37+
ac_add_options --target=aarch64-apple-darwin
38+
39+
if test "$ZEN_RELEASE"; then
40+
ac_add_options --enable-optimize="-O3 -mcpu=apple-m1 -march=armv8.3-a+simd"
41+
42+
# As of Clang 13, the default is -mcpu=apple-m1 when using a aarch64-apple-macos target,
43+
# but we're using apple64-apple-darwin, which defaults to -mcpu=apple-a7, which disables
44+
# a bunch of # performance-enabling CPU features.
45+
export CFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
46+
export CPPFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
47+
export CXXFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
48+
export LDFLAGS="-Wl,-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
49+
export RUSTFLAGS="-C target-feature=+v8.3a -Ctarget-cpu=apple-m1"
4850
fi
4951
fi

0 commit comments

Comments
 (0)