Commit 5d98fe24 authored by pcc's avatar pcc Committed by Commit bot

build: Remove build system support for gold plugin.

R=thakis@chromium.org
TBR=mseaborn@chromium.org
BUG=607968

Review-Url: https://codereview.chromium.org/2891513002
Cr-Commit-Position: refs/heads/master@{#472258}
parent edc6da39
...@@ -470,6 +470,8 @@ config("compiler") { ...@@ -470,6 +470,8 @@ config("compiler") {
# TODO(pcc): Make this conditional on is_official_build rather than on gn # TODO(pcc): Make this conditional on is_official_build rather than on gn
# flags for specific features. # flags for specific features.
if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) { if (!is_debug && (allow_posix_link_time_opt || is_cfi) && !is_nacl) {
assert(use_lld, "POSIX LTO requires LLD")
if (use_thin_lto) { if (use_thin_lto) {
cflags += [ "-flto=thin" ] cflags += [ "-flto=thin" ]
ldflags += [ "-flto=thin" ] ldflags += [ "-flto=thin" ]
...@@ -477,15 +479,11 @@ config("compiler") { ...@@ -477,15 +479,11 @@ config("compiler") {
# Limit the parallelism to avoid too agressive competition between # Limit the parallelism to avoid too agressive competition between
# linker jobs. This is still suboptimal to a potential dynamic # linker jobs. This is still suboptimal to a potential dynamic
# resource allocation scheme, but should be good enough. # resource allocation scheme, but should be good enough.
if (use_lld) { ldflags += [
ldflags += [ "-Wl,--thinlto-jobs=8",
"-Wl,--thinlto-jobs=8", "-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), ]
]
} else {
ldflags += [ "-Wl,-plugin-opt,jobs=8" ]
}
} else { } else {
# Note: ThinLTO does not currently have this feature implemented # Note: ThinLTO does not currently have this feature implemented
# For Full LTO, it provides a measurable runtime speedup of Chrome. # For Full LTO, it provides a measurable runtime speedup of Chrome.
...@@ -500,11 +498,7 @@ config("compiler") { ...@@ -500,11 +498,7 @@ config("compiler") {
# Apply a lower LTO optimization level as the default is too slow. # Apply a lower LTO optimization level as the default is too slow.
if (is_linux) { if (is_linux) {
if (use_lld) { ldflags += [ "-Wl,--lto-O1" ]
ldflags += [ "-Wl,--lto-O1" ]
} else {
ldflags += [ "-Wl,-plugin-opt,O1" ]
}
} else if (is_mac) { } else if (is_mac) {
ldflags += [ "-Wl,-mllvm,-O1" ] ldflags += [ "-Wl,-mllvm,-O1" ]
} }
...@@ -520,17 +514,10 @@ config("compiler") { ...@@ -520,17 +514,10 @@ config("compiler") {
# that is larger than the maximum call displacement, preventing the linker # that is larger than the maximum call displacement, preventing the linker
# from relocating calls (http://llvm.org/PR22999). # from relocating calls (http://llvm.org/PR22999).
if (is_linux) { if (is_linux) {
if (use_lld) { ldflags += [
ldflags += [ "-Wl,-mllvm,-function-sections",
"-Wl,-mllvm,-function-sections", "-Wl,-mllvm,-data-sections",
"-Wl,-mllvm,-data-sections", ]
]
} else {
ldflags += [
"-Wl,-plugin-opt,-function-sections",
"-Wl,-plugin-opt,-data-sections",
]
}
} }
} }
......
...@@ -565,11 +565,7 @@ if (is_linux && is_clang) { ...@@ -565,11 +565,7 @@ if (is_linux && is_clang) {
# See more details: # See more details:
# https://llvm.org/bugs/show_bug.cgi?id=30403 # https://llvm.org/bugs/show_bug.cgi?id=30403
if (use_thin_lto) { if (use_thin_lto) {
if (use_lld) { ldflags = [ "-Wl,--lto-O0" ]
ldflags = [ "-Wl,--lto-O0" ]
} else {
ldflags = [ "-Wl,-plugin-opt,O0" ]
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment