polly args
This commit is contained in:
parent
230ba31ba6
commit
f3e9be3f0f
18 changed files with 112 additions and 8296 deletions
4
args.gn
4
args.gn
|
@ -2,6 +2,10 @@ google_api_key = ""
|
|||
google_default_client_id = ""
|
||||
google_default_client_secret = ""
|
||||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-16"
|
||||
# clang_version = "16"
|
||||
# lld_path = "/usr/lib/llvm-16/bin/"
|
||||
# use_polly = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
|
|
|
@ -70,6 +70,9 @@ declare_args() {
|
|||
# This is initialized below, after use_gold might have been overridden.
|
||||
gold_path = ""
|
||||
|
||||
# Whether to enable LLVM's Polly optimizations. See https://polly.llvm.org/
|
||||
use_polly = false
|
||||
|
||||
# Enable fatal linker warnings. Building Chromium with certain versions
|
||||
# of binutils can cause linker warning.
|
||||
fatal_linker_warnings = true
|
||||
|
@ -2035,7 +2038,16 @@ if (is_win) {
|
|||
|
||||
common_optimize_on_ldflags += [
|
||||
]
|
||||
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-mllvm:-polly",
|
||||
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-mllvm:-polly-invariant-load-hoisting",
|
||||
"-mllvm:-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
# misleading symbols in stack traces.
|
||||
if (!is_debug && !is_component_build) {
|
||||
|
@ -2060,6 +2072,15 @@ if (is_win) {
|
|||
"-Wl,-O3",
|
||||
]
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-Wl,-mllvm,-polly",
|
||||
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-Wl,-mllvm,-polly-invariant-load-hoisting",
|
||||
"-Wl,-mllvm,-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
# TODO(jdduke) Re-enable on mips after resolving linking
|
||||
# issues with libc++ (crbug.com/456380).
|
||||
|
|
|
@ -70,6 +70,9 @@ declare_args() {
|
|||
# This is initialized below, after use_gold might have been overridden.
|
||||
gold_path = ""
|
||||
|
||||
# Whether to enable LLVM's Polly optimizations. See https://polly.llvm.org/
|
||||
use_polly = false
|
||||
|
||||
# Enable fatal linker warnings. Building Chromium with certain versions
|
||||
# of binutils can cause linker warning.
|
||||
fatal_linker_warnings = true
|
||||
|
@ -2002,6 +2005,15 @@ if (is_win) {
|
|||
}
|
||||
common_optimize_on_ldflags = []
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-mllvm:-polly",
|
||||
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-mllvm:-polly-invariant-load-hoisting",
|
||||
"-mllvm:-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
# misleading symbols in stack traces.
|
||||
if (!is_debug && !is_component_build) {
|
||||
|
@ -2016,6 +2028,15 @@ if (is_win) {
|
|||
common_optimize_on_cflags = [ "-O3", ]
|
||||
common_optimize_on_ldflags = [ "-Wl,-O3", ]
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-Wl,-mllvm,-polly",
|
||||
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-Wl,-mllvm,-polly-invariant-load-hoisting",
|
||||
"-Wl,-mllvm,-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
# TODO(jdduke) Re-enable on mips after resolving linking
|
||||
# issues with libc++ (crbug.com/456380).
|
||||
|
|
1
build.sh
1
build.sh
|
@ -22,7 +22,6 @@ displayHelp () {
|
|||
printf "${underline}${YEL}Usage: ${c0}build.sh # (where # is number of jobs)${c0}\n" &&
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--help) displayHelp; exit 0;;
|
||||
esac
|
||||
|
|
|
@ -54,6 +54,8 @@ export NINJA_SUMMARIZE_BUILD=1 &&
|
|||
|
||||
./depot_tools/autoninja -C ~/chromium/src/out/thorium chrome_public_apk thorium_shell_apk system_webview_apk -j$@ &&
|
||||
|
||||
mv ~/chromium/src/out/thorium/apks/ChromePublic.apk ~/chromium/src/out/thorium/apks/Thorium_Public.apk &&
|
||||
|
||||
cat logos/thorium_logo_ascii_art.txt &&
|
||||
|
||||
printf "${GRE}${bold}Build Completed. ${YEL}${bold}You can copy the .apks to your device or use ADB to install.\n" &&
|
||||
|
@ -68,6 +70,8 @@ export NINJA_SUMMARIZE_BUILD=1 &&
|
|||
|
||||
./depot_tools/autoninja -C ~/chromium/src/out/thorium chrome_public_apk thorium_shell_apk -j$@ &&
|
||||
|
||||
mv ~/chromium/src/out/thorium/apks/ChromePublic.apk ~/chromium/src/out/thorium/apks/Thorium_Public.apk &&
|
||||
|
||||
cat logos/thorium_logo_ascii_art.txt &&
|
||||
|
||||
printf "${GRE}${bold}Build Completed. ${YEL}${bold}You can copy the .apks to your device or use ADB to install.\n" &&
|
||||
|
|
|
@ -16,7 +16,7 @@ die() { yell "$*"; exit 111; }
|
|||
try() { "$@" || die "${RED}Failed $*"; }
|
||||
|
||||
printf "\n" &&
|
||||
printf "${YEL}Building .dmg of Thorium...\n" &&
|
||||
printf "${YEL}Building .dmg package of Thorium...\n" &&
|
||||
printf "${CYA}\n" &&
|
||||
|
||||
# Fix file attr
|
||||
|
|
10
build_mac.sh
10
build_mac.sh
|
@ -23,6 +23,9 @@ displayHelp () {
|
|||
printf "${c0}Use the --build-shell flag to also build the thorium_shell target.${c0}\n" &&
|
||||
printf "\n"
|
||||
}
|
||||
case $1 in
|
||||
--help) displayHelp; exit 0;;
|
||||
esac
|
||||
|
||||
# Build Thorium Shell in addition to the others.
|
||||
buildShell () {
|
||||
|
@ -39,12 +42,7 @@ buildShell () {
|
|||
|
||||
printf "${GRE}${bold}Build Completed. ${YEL}${bold}You can now run ./build_dmg.sh, and copy the Thorium Shell.app\n" &&
|
||||
tput sgr0
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--help) displayHelp; exit 0;;
|
||||
esac
|
||||
|
||||
}
|
||||
case $1 in
|
||||
--build-shell) buildShell; exit 0;;
|
||||
esac
|
||||
|
|
|
@ -22,7 +22,6 @@ displayHelp () {
|
|||
printf "${underline}${YEL}Usage: ${c0}build_win.sh # (where # is number of jobs)${c0}\n" &&
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--help) displayHelp; exit 0;;
|
||||
esac
|
||||
|
|
|
@ -970,12 +970,12 @@ config("compiler_cpu_abi") {
|
|||
cflags += [
|
||||
"-m64",
|
||||
"-O3",
|
||||
"-maes",
|
||||
"-march=x86-64-v3",
|
||||
"-mtune=generic",
|
||||
"-maes",
|
||||
"-ffp-contract=fast",
|
||||
]
|
||||
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", ]
|
||||
ldflags += [ "-m64", "-Wl,-O3", "-maes", "-Wl,-mllvm,-march=x86-64-v3", "-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", ]
|
||||
|
@ -2043,10 +2043,10 @@ if (is_win) {
|
|||
"-mllvm", "-enable-gvn-hoist",
|
||||
"/O2",
|
||||
"/clang:-O3",
|
||||
"/clang:-mavx",
|
||||
"/clang:-mavx2",
|
||||
"/clang:-maes",
|
||||
"/clang:-mpclmul",
|
||||
"/clang:-mavx",
|
||||
"/clang:-mavx2",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
|
||||
|
@ -2070,7 +2070,7 @@ if (is_win) {
|
|||
"-mllvm:-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-gvn-hoist",
|
||||
]
|
||||
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-mllvm:-polly",
|
||||
|
@ -2079,7 +2079,7 @@ if (is_win) {
|
|||
"-mllvm:-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
# misleading symbols in stack traces.
|
||||
if (!is_debug && !is_component_build) {
|
||||
|
@ -2139,7 +2139,7 @@ if (is_win) {
|
|||
"-Wl,-mllvm,-enable-gvn-hoist",
|
||||
"-Wl,-O3",
|
||||
]
|
||||
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-Wl,-mllvm,-polly",
|
||||
|
|
|
@ -132,8 +132,8 @@ config("compiler") {
|
|||
# "/fp:fast", enables FMA.
|
||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"/arch:AVX2",
|
||||
"-maes",
|
||||
"/arch:AVX2",
|
||||
"-Wno-unused-command-line-argument",
|
||||
]
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -70,6 +70,9 @@ declare_args() {
|
|||
# This is initialized below, after use_gold might have been overridden.
|
||||
gold_path = ""
|
||||
|
||||
# Whether to enable LLVM's Polly optimizations. See https://polly.llvm.org/
|
||||
use_polly = false
|
||||
|
||||
# Enable fatal linker warnings. Building Chromium with certain versions
|
||||
# of binutils can cause linker warning.
|
||||
fatal_linker_warnings = true
|
||||
|
@ -2028,6 +2031,7 @@ if (is_win) {
|
|||
"-mllvm", "-unroll-runtime-multi-exit",
|
||||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-gvn-hoist",
|
||||
"/O2",
|
||||
"/clang:-O3",
|
||||
"/clang:-msse3",
|
||||
|
@ -2046,8 +2050,18 @@ if (is_win) {
|
|||
"-mllvm:-unroll-runtime-multi-exit",
|
||||
"-mllvm:-aggressive-ext-opt",
|
||||
"-mllvm:-enable-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-gvn-hoist",
|
||||
]
|
||||
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-mllvm:-polly",
|
||||
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-mllvm:-polly-invariant-load-hoisting",
|
||||
"-mllvm:-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
# misleading symbols in stack traces.
|
||||
if (!is_debug && !is_component_build) {
|
||||
|
@ -2076,6 +2090,7 @@ if (is_win) {
|
|||
"-mllvm", "-unroll-runtime-multi-exit",
|
||||
"-mllvm", "-aggressive-ext-opt",
|
||||
"-mllvm", "-enable-interleaved-mem-accesses",
|
||||
"-mllvm", "-enable-gvn-hoist",
|
||||
"-O3",
|
||||
]
|
||||
|
||||
|
@ -2091,9 +2106,19 @@ if (is_win) {
|
|||
"-Wl,-mllvm,-unroll-runtime-multi-exit",
|
||||
"-Wl,-mllvm,-aggressive-ext-opt",
|
||||
"-Wl,-mllvm,-enable-interleaved-mem-accesses",
|
||||
"-Wl,-mllvm,-enable-gvn-hoist",
|
||||
"-Wl,-O3",
|
||||
]
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-Wl,-mllvm,-polly",
|
||||
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-Wl,-mllvm,-polly-invariant-load-hoisting",
|
||||
"-Wl,-mllvm,-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
# TODO(jdduke) Re-enable on mips after resolving linking
|
||||
# issues with libc++ (crbug.com/456380).
|
||||
|
|
|
@ -24,7 +24,6 @@ displayHelp () {
|
|||
printf "${bold}${YEL}from your home directory, and then re-clone depot_tools in \$HOME.${c0}\n" &&
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--help) displayHelp; exit 0;;
|
||||
esac
|
||||
|
|
|
@ -70,6 +70,9 @@ declare_args() {
|
|||
# This is initialized below, after use_gold might have been overridden.
|
||||
gold_path = ""
|
||||
|
||||
# Whether to enable LLVM's Polly optimizations. See https://polly.llvm.org/
|
||||
use_polly = false
|
||||
|
||||
# Enable fatal linker warnings. Building Chromium with certain versions
|
||||
# of binutils can cause linker warning.
|
||||
fatal_linker_warnings = true
|
||||
|
@ -2058,7 +2061,16 @@ if (is_win) {
|
|||
"-mllvm:-enable-masked-interleaved-mem-accesses",
|
||||
"-mllvm:-enable-gvn-hoist",
|
||||
]
|
||||
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-mllvm:-polly",
|
||||
"-mllvm:-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-mllvm:-polly-invariant-load-hoisting",
|
||||
"-mllvm:-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
# /OPT:ICF is not desirable in Debug builds, since code-folding can result in
|
||||
# misleading symbols in stack traces.
|
||||
if (!is_debug && !is_component_build) {
|
||||
|
@ -2119,6 +2131,15 @@ if (is_win) {
|
|||
"-Wl,-O3",
|
||||
]
|
||||
|
||||
if (use_polly == true) {
|
||||
common_optimize_on_ldflags += [
|
||||
"-Wl,-mllvm,-polly",
|
||||
"-Wl,-mllvm,-polly-detect-profitability-min-per-loop-insts=40",
|
||||
"-Wl,-mllvm,-polly-invariant-load-hoisting",
|
||||
"-Wl,-mllvm,-polly-vectorizer=stripmine",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
# TODO(jdduke) Re-enable on mips after resolving linking
|
||||
# issues with libc++ (crbug.com/456380).
|
||||
|
|
|
@ -22,7 +22,6 @@ displayHelp () {
|
|||
printf "${underline}${YEL}Usage: ${c0}thordeb.sh # (where # is number of jobs)\n" &&
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
--help) displayHelp; exit 0;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue