Skip to content

Commit

Permalink
chore: Update platform optimization flags for Linux, macOS, and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro-balades committed Jul 19, 2024
1 parent b3de40e commit 82bd1b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zen-browser/surfer",
"version": "1.0.14",
"version": "1.0.15",
"description": "Simplifying building firefox forks!",
"main": "index.js",
"bin": {
Expand Down
1 change: 1 addition & 0 deletions src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const applyConfig = async (os: string) => {

writeFileSync(resolve(ENGINE_DIR, 'mozconfig'), mergedConfig)

log.info(`Building config based on a ${dynamicConfig.get('buildMode')} mode`)
log.info(`Config for this \`${os}\` build:`)

mergedConfig.split('\n').map((ln) => {
Expand Down
4 changes: 2 additions & 2 deletions src/constants/mozconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ function getPlatformOptimiseFlags(): string {

switch ((process as any).surferPlatform) {
case 'linux': {
optimiseFlags = `ac_add_options --enable-optimize="-march=x86-64 -msse3 -mtune=haswell -O3 -w"`
optimiseFlags = `ac_add_options --enable-optimize="-march=x86-64-v3 -msse3 -mtune=haswell -O3 -w"`
break
}
case 'darwin': {
optimiseFlags = `ac_add_options --enable-optimize="-mcpu=apple-m1 -O3 -w"`
break
}
case 'win32': {
optimiseFlags = `ac_add_options --enable-optimize="-clang:-march=x86-64 -clang:-msse3 -clang:-mtune=haswell -clang:-O3 -w"`
optimiseFlags = `ac_add_options --enable-optimize="-clang:-march=x86-64-v3 -clang:-msse3 -clang:-mtune=haswell -clang:-O3 -w"`
break
}
}
Expand Down

0 comments on commit 82bd1b9

Please sign in to comment.