mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 03:47:44 -03:00
Remove ThinLTO Cache and rebase on upstream
c++17 adherance has been added upstream. Yay.
This commit is contained in:
parent
04d7823cd8
commit
f54fe2113b
1 changed files with 10 additions and 18 deletions
|
@ -608,15 +608,7 @@ config("compiler") {
|
||||||
# are still a few buildbots using it, so until those are turned off
|
# are still a few buildbots using it, so until those are turned off
|
||||||
# we need the !is_nacl clause and the (is_nacl && is_clang) clause, above.
|
# we need the !is_nacl clause and the (is_nacl && is_clang) clause, above.
|
||||||
cflags_c += [ "-std=c11" ]
|
cflags_c += [ "-std=c11" ]
|
||||||
if (is_ios) {
|
cflags_cc += [ "-std=c++17" ]
|
||||||
# TODO(thakis): Use C++17 on iOS once it works.
|
|
||||||
cflags_cc += [
|
|
||||||
"-std=c++14",
|
|
||||||
"-fno-trigraphs",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
cflags_cc += [ "-std=c++17" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_clang && current_os != "zos") {
|
if (is_clang && current_os != "zos") {
|
||||||
|
@ -630,7 +622,7 @@ config("compiler") {
|
||||||
# default allocator happens to return. Starting with C++17, operator new
|
# default allocator happens to return. Starting with C++17, operator new
|
||||||
# called on aligned types with N > __STDCPP_DEFAULT_NEW_ALIGNMENT__ will
|
# called on aligned types with N > __STDCPP_DEFAULT_NEW_ALIGNMENT__ will
|
||||||
# call a special overload that hands in the desired alignment, and that will
|
# call a special overload that hands in the desired alignment, and that will
|
||||||
# honor the alignas even for memory on the stack.
|
# honor the alignas even for memory on the heap.
|
||||||
# However, that requires that operator new overload to exist. At least on
|
# However, that requires that operator new overload to exist. At least on
|
||||||
# macOS and iOS, they are in libc++abi, and system libc++abi has them as of
|
# macOS and iOS, they are in libc++abi, and system libc++abi has them as of
|
||||||
# "macOS 10.12, iOS 10.0" (https://reviews.llvm.org/D112921#3128089).
|
# "macOS 10.12, iOS 10.0" (https://reviews.llvm.org/D112921#3128089).
|
||||||
|
@ -672,7 +664,7 @@ config("compiler") {
|
||||||
|
|
||||||
# Limit the size of the ThinLTO cache to the lesser of 10% of
|
# Limit the size of the ThinLTO cache to the lesser of 10% of
|
||||||
# available disk space, 40GB and 100000 files.
|
# available disk space, 40GB and 100000 files.
|
||||||
cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
|
# cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
|
||||||
|
|
||||||
# TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
|
# TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
|
||||||
# should be able to better manage binary size increases on its own.
|
# should be able to better manage binary size increases on its own.
|
||||||
|
@ -682,9 +674,9 @@ config("compiler") {
|
||||||
ldflags += [
|
ldflags += [
|
||||||
"/opt:lldltojobs=all",
|
"/opt:lldltojobs=all",
|
||||||
"-mllvm:-import-instr-limit=$import_instr_limit",
|
"-mllvm:-import-instr-limit=$import_instr_limit",
|
||||||
"/lldltocache:" +
|
# "/lldltocache:" +
|
||||||
rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
|
# rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
|
||||||
"/lldltocachepolicy:$cache_policy",
|
# "/lldltocachepolicy:$cache_policy",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
ldflags += [ "-flto=thin" ]
|
ldflags += [ "-flto=thin" ]
|
||||||
|
@ -704,11 +696,11 @@ config("compiler") {
|
||||||
rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
|
rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
|
||||||
} else {
|
} else {
|
||||||
ldflags +=
|
ldflags +=
|
||||||
[ "-Wl,--thinlto-cache-dir=" +
|
# [ "-Wl,--thinlto-cache-dir=" +
|
||||||
rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
|
# rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
|
# ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
|
||||||
|
|
||||||
if (is_chromeos_ash) {
|
if (is_chromeos_ash) {
|
||||||
# Not much performance difference was noted between the default (100)
|
# Not much performance difference was noted between the default (100)
|
||||||
|
@ -1924,7 +1916,7 @@ if (is_win) {
|
||||||
} else {
|
} else {
|
||||||
common_optimize_on_cflags = []
|
common_optimize_on_cflags = []
|
||||||
common_optimize_on_ldflags = []
|
common_optimize_on_ldflags = []
|
||||||
|
|
||||||
common_optimize_on_cflags += [
|
common_optimize_on_cflags += [
|
||||||
"-mllvm", "-extra-vectorizer-passes",
|
"-mllvm", "-extra-vectorizer-passes",
|
||||||
"-mllvm", "-enable-cond-stores-vec",
|
"-mllvm", "-enable-cond-stores-vec",
|
||||||
|
|
Loading…
Reference in a new issue