mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 03:47:44 -03:00
build.gn updates
This commit is contained in:
parent
644ea05b3b
commit
a228e6551c
12 changed files with 50 additions and 59 deletions
|
@ -12,6 +12,9 @@ arm_use_neon = false
|
|||
arm_optionally_use_neon = false
|
||||
arm_fpu = "vfpv3-d16"
|
||||
is_official_build = true
|
||||
is_high_end_android = false
|
||||
optimize_for_size = false
|
||||
optimize_for_speed = true
|
||||
is_debug = false
|
||||
debuggable_apks = false
|
||||
is_cfi = true
|
||||
|
|
|
@ -12,6 +12,9 @@ arm_use_neon = true
|
|||
arm_optionally_use_neon = false
|
||||
arm_fpu = "neon"
|
||||
is_official_build = true
|
||||
is_high_end_android = true
|
||||
optimize_for_size = false
|
||||
optimize_for_speed = true
|
||||
is_debug = false
|
||||
debuggable_apks = false
|
||||
is_cfi = true
|
||||
|
|
|
@ -978,10 +978,9 @@ config("compiler_cpu_abi") {
|
|||
"-O3",
|
||||
"-mavx",
|
||||
"-maes",
|
||||
"-mvaes",
|
||||
"-mpclmul",
|
||||
]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-mvaes", "-mpclmul", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-mpclmul", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
} else if (current_cpu == "x86") {
|
||||
cflags += [ "-m32" ]
|
||||
ldflags += [ "-m32", "-Wl,-O3", "-msse3", ]
|
||||
|
@ -2029,38 +2028,12 @@ if (is_win) {
|
|||
}
|
||||
|
||||
common_optimize_on_cflags += [
|
||||
"-mllvm", "-extra-vectorizer-passes",
|
||||
"-mllvm", "-enable-cond-stores-vec",
|
||||
"-mllvm", "-slp-vectorize-hor-store",
|
||||
"-mllvm", "-enable-loopinterchange",
|
||||
"-mllvm", "-enable-loop-distribute",
|
||||
"-mllvm", "-enable-unroll-and-jam",
|
||||
"-mllvm", "-enable-loop-flatten",
|
||||
"-mllvm", "-interleave-small-loop-scalar-reduction",
|
||||
"-mllvm", "-unroll-runtime-multi-exit",
|
||||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"/O2",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-maes",
|
||||
"/clang:-mvaes",
|
||||
"/clang:-mpclmul",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
|
||||
common_optimize_on_ldflags += [
|
||||
"-mllvm:-extra-vectorizer-passes",
|
||||
"-mllvm:-enable-cond-stores-vec",
|
||||
"-mllvm:-slp-vectorize-hor-store",
|
||||
"-mllvm:-enable-loopinterchange",
|
||||
"-mllvm:-enable-loop-distribute",
|
||||
"-mllvm:-enable-unroll-and-jam",
|
||||
"-mllvm:-enable-loop-flatten",
|
||||
"-mllvm:-interleave-small-loop-scalar-reduction",
|
||||
"-mllvm:-unroll-runtime-multi-exit",
|
||||
"-mllvm:-aggressive-ext-opt",
|
||||
"-mllvm:-enable-interleaved-mem-accesses",
|
||||
]
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
|
|
|
@ -135,12 +135,10 @@ config("compiler") {
|
|||
"/O2",
|
||||
"-mavx",
|
||||
"-maes",
|
||||
"-mvaes",
|
||||
"-mpclmul",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-maes",
|
||||
"/clang:-mvaes",
|
||||
"/clang:-mpclmul",
|
||||
"-Xclang", "-O3",
|
||||
"-Wno-unused-command-line-argument",
|
||||
|
@ -548,13 +546,13 @@ config("static_crt") {
|
|||
if (current_cpu == "x64") {
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# 5.2 = Windows Server 2003.
|
||||
subsystem_version_suffix = ",5.2"
|
||||
subsystem_version_suffix = ",5.02"
|
||||
} else if (current_cpu == "arm64") {
|
||||
# Windows ARM64 requires Windows 10.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
} else {
|
||||
# 5.1 = Windows XP.
|
||||
subsystem_version_suffix = ",5.1"
|
||||
subsystem_version_suffix = ",5.01"
|
||||
}
|
||||
|
||||
config("console") {
|
||||
|
|
|
@ -903,13 +903,12 @@ config("compiler") {
|
|||
# building with ThinLTO, no optimization is performed in the link step.
|
||||
config("thinlto_optimize_default") {
|
||||
if (!is_debug && use_thin_lto && is_a_target_toolchain) {
|
||||
lto_opt_level = 3
|
||||
|
||||
if (is_win) {
|
||||
lto_opt_level = 2
|
||||
ldflags = [ "/opt:lldlto=" + lto_opt_level ]
|
||||
ldflags += [ "-mllvm:-enable-pre=false", ]
|
||||
} else {
|
||||
lto_opt_level = 3
|
||||
ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
|
||||
}
|
||||
}
|
||||
|
@ -925,13 +924,16 @@ config("thinlto_optimize_default") {
|
|||
# use it on important targets such as the main browser executable or dll.
|
||||
config("thinlto_optimize_max") {
|
||||
if (!is_debug && use_thin_lto && is_a_target_toolchain) {
|
||||
if (thin_lto_enable_optimizations) {
|
||||
lto_opt_level = 3
|
||||
} else {
|
||||
lto_opt_level = 3
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
lto_opt_level = 2
|
||||
ldflags = [ "/opt:lldlto=" + lto_opt_level ]
|
||||
ldflags += [ "-mllvm:-enable-pre=false", ]
|
||||
} else {
|
||||
lto_opt_level = 3
|
||||
ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
|
||||
}
|
||||
}
|
||||
|
@ -943,7 +945,7 @@ config("thinlto_optimize_max") {
|
|||
# tweak code generation for a particular CPU do not belong here!
|
||||
# See "compiler_codegen", below.
|
||||
config("compiler_cpu_abi") {
|
||||
cflags = []
|
||||
cflags = [ "-O3", ]
|
||||
ldflags = []
|
||||
defines = []
|
||||
|
||||
|
@ -967,10 +969,10 @@ config("compiler_cpu_abi") {
|
|||
"-O3",
|
||||
"-march=x86-64-v3",
|
||||
"-mtune=generic",
|
||||
"-mvaes",
|
||||
"-maes",
|
||||
"-ffp-contract=fast",
|
||||
]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-Wl,-mllvm,-march=x86-64-v3", "-mvaes", "-Wl,-mllvm,-fp-contract=fast", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-Wl,-mllvm,-march=x86-64-v3", "-maes", "-Wl,-mllvm,-fp-contract=fast", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
} else if (current_cpu == "x86") {
|
||||
cflags += [ "-m32" ]
|
||||
ldflags += [ "-m32", "-Wl,-O3", "-msse3", ]
|
||||
|
@ -1992,8 +1994,8 @@ config("no_incompatible_pointer_warnings") {
|
|||
# Shared settings for both "optimize" and "optimize_max" configs.
|
||||
# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
|
||||
|
||||
common_optimize_on_cflags = []
|
||||
common_optimize_on_ldflags = []
|
||||
common_optimize_on_cflags = [ "-O3", ]
|
||||
common_optimize_on_ldflags = [ "-Wl,-O3", ]
|
||||
|
||||
if (is_win) {
|
||||
|
||||
|
@ -2035,6 +2037,14 @@ if (is_win) {
|
|||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-gvn-hoist",
|
||||
"/O2",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-mavx2",
|
||||
"/clang:-maes",
|
||||
"/clang:-mpclmul",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
|
||||
common_optimize_on_ldflags += [
|
||||
|
@ -2055,6 +2065,7 @@ if (is_win) {
|
|||
"-mllvm:-aggressive-ext-opt",
|
||||
"-mllvm:-enable-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-gvn-hoist",
|
||||
]
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
|
@ -2091,6 +2102,7 @@ if (is_win) {
|
|||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-gvn-hoist",
|
||||
"-O3",
|
||||
]
|
||||
|
||||
|
@ -2112,6 +2124,7 @@ if (is_win) {
|
|||
"-Wl,-mllvm,-aggressive-ext-opt",
|
||||
"-Wl,-mllvm,-enable-interleaved-mem-accesses",
|
||||
"-Wl,-mllvm,-enable-masked-interleaved-mem-accesses",
|
||||
"-Wl,-mllvm,-enable-gvn-hoist",
|
||||
"-Wl,-O3",
|
||||
]
|
||||
|
||||
|
@ -2304,7 +2317,7 @@ config("optimize_max") {
|
|||
if (is_win) {
|
||||
# Favor speed over size, /O2 must be before the common flags.
|
||||
# /O2 implies /Ot, /Oi, and /GF.
|
||||
cflags = [ "/O2" ] + common_optimize_on_cflags
|
||||
cflags = [ "/O2", "-Xclang", "-O3", ] + common_optimize_on_cflags
|
||||
} else if (optimize_for_fuzzing) {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
} else {
|
||||
|
@ -2337,7 +2350,7 @@ config("optimize_speed") {
|
|||
if (is_win) {
|
||||
# Favor speed over size, /O2 must be before the common flags.
|
||||
# /O2 implies /Ot, /Oi, and /GF.
|
||||
cflags = [ "/O2" ] + common_optimize_on_cflags
|
||||
cflags = [ "/O2", "-Xclang", "-O3", ] + common_optimize_on_cflags
|
||||
} else if (optimize_for_fuzzing) {
|
||||
cflags = [ "-O3" ] + common_optimize_on_cflags
|
||||
} else {
|
||||
|
|
|
@ -133,9 +133,7 @@ config("compiler") {
|
|||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"/arch:AVX2",
|
||||
"/fp:fast",
|
||||
"-maes",
|
||||
"-mvaes",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -538,13 +536,13 @@ config("static_crt") {
|
|||
if (current_cpu == "x64") {
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# 5.2 = Windows Server 2003.
|
||||
subsystem_version_suffix = ",5.2"
|
||||
subsystem_version_suffix = ",5.02"
|
||||
} else if (current_cpu == "arm64") {
|
||||
# Windows ARM64 requires Windows 10.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
} else {
|
||||
# 5.1 = Windows XP.
|
||||
subsystem_version_suffix = ",5.1"
|
||||
subsystem_version_suffix = ",5.01"
|
||||
}
|
||||
|
||||
config("console") {
|
||||
|
|
|
@ -542,13 +542,13 @@ config("static_crt") {
|
|||
if (current_cpu == "x64") {
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# 5.2 = Windows Server 2003.
|
||||
subsystem_version_suffix = ",5.2"
|
||||
subsystem_version_suffix = ",5.02"
|
||||
} else if (current_cpu == "arm64") {
|
||||
# Windows ARM64 requires Windows 10.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
} else {
|
||||
# 5.1 = Windows XP.
|
||||
subsystem_version_suffix = ",5.1"
|
||||
subsystem_version_suffix = ",5.01"
|
||||
}
|
||||
|
||||
config("console") {
|
||||
|
|
4
other/WIN7/TODO.txt
Normal file
4
other/WIN7/TODO.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Backport bookmarks bar, quiet notifications, and all flags patches.
|
||||
Add AVX2 fix.
|
||||
Use new logo for main and installer.
|
||||
Use
|
|
@ -542,13 +542,13 @@ config("static_crt") {
|
|||
if (current_cpu == "x64") {
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# 5.2 = Windows Server 2003.
|
||||
subsystem_version_suffix = ",5.2"
|
||||
subsystem_version_suffix = ",5.02"
|
||||
} else if (current_cpu == "arm64") {
|
||||
# Windows ARM64 requires Windows 10.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
} else {
|
||||
# 5.1 = Windows XP.
|
||||
subsystem_version_suffix = ",5.1"
|
||||
subsystem_version_suffix = ",5.01"
|
||||
}
|
||||
|
||||
config("console") {
|
||||
|
|
|
@ -962,10 +962,9 @@ config("compiler_cpu_abi") {
|
|||
"-O3",
|
||||
"-mavx",
|
||||
"-maes",
|
||||
"-mvaes",
|
||||
"-mpclmul",
|
||||
]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-mvaes", "-mpclmul", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-mavx", "-maes", "-mpclmul", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ]
|
||||
} else if (current_cpu == "x86") {
|
||||
cflags += [ "-m32" ]
|
||||
ldflags += [ "-m32", "-Wl,-O3", "-msse3", ]
|
||||
|
@ -2030,11 +2029,11 @@ if (is_win) {
|
|||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-gvn-hoist",
|
||||
"/O2",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-maes",
|
||||
"/clang:-mvaes",
|
||||
"/clang:-mpclmul",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
|
@ -2057,6 +2056,7 @@ if (is_win) {
|
|||
"-mllvm:-aggressive-ext-opt",
|
||||
"-mllvm:-enable-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-gvn-hoist",
|
||||
]
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
|
@ -2093,6 +2093,7 @@ if (is_win) {
|
|||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-gvn-hoist",
|
||||
"-O3",
|
||||
]
|
||||
|
||||
|
@ -2114,6 +2115,7 @@ if (is_win) {
|
|||
"-Wl,-mllvm,-aggressive-ext-opt",
|
||||
"-Wl,-mllvm,-enable-interleaved-mem-accesses",
|
||||
"-Wl,-mllvm,-enable-masked-interleaved-mem-accesses",
|
||||
"-Wl,-mllvm,-enable-gvn-hoist",
|
||||
"-Wl,-O3",
|
||||
]
|
||||
|
||||
|
|
|
@ -135,12 +135,10 @@ config("compiler") {
|
|||
"/O2",
|
||||
"-mavx",
|
||||
"-maes",
|
||||
"-mvaes",
|
||||
"-mpclmul",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-maes",
|
||||
"/clang:-mvaes",
|
||||
"/clang:-mpclmul",
|
||||
"-Xclang", "-O3",
|
||||
"-Wno-unused-command-line-argument",
|
||||
|
@ -549,13 +547,13 @@ config("static_crt") {
|
|||
if (current_cpu == "x64") {
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# 5.2 = Windows Server 2003.
|
||||
subsystem_version_suffix = ",5.2"
|
||||
subsystem_version_suffix = ",5.02"
|
||||
} else if (current_cpu == "arm64") {
|
||||
# Windows ARM64 requires Windows 10.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
} else {
|
||||
# 5.1 = Windows XP.
|
||||
subsystem_version_suffix = ",5.1"
|
||||
subsystem_version_suffix = ",5.01"
|
||||
}
|
||||
|
||||
config("console") {
|
||||
|
|
|
@ -734,7 +734,6 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs,
|
|||
'--extra-cflags=-O3',
|
||||
'--extra-cflags=-mavx',
|
||||
'--extra-cflags=-maes',
|
||||
'--extra-cflags=-mvaes',
|
||||
'--extra-cflags=-mpclmul',
|
||||
'--enable-decoder=theora,vp8',
|
||||
'--enable-parser=vp3,vp8',
|
||||
|
|
Loading…
Reference in a new issue