Revert workarounds for ThinLTO linker builds.
Fixing Issue swiftshader:31 makes the workarounds obsolete and since
they disabled some link-time optimizations they should be reverted.
This reverts commit 628a8496e44ec8a096125cb0cdc3e63bb7dd8380.
This reverts commit 158dcfc13fe3e36217f1bf0d4ccbd8bd80f6d5f1.
This reverts commit ad675fa1d6617ff7fe5965845152ba71f33caf61.
Bug chromium:686980
Bug chromium:735508
Change-Id: I4c4e2466fdfcddd12854b87e5a62d6ec8c823a05
Reviewed-on: https://swiftshader-review.googlesource.com/10168
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libEGL/BUILD.gn b/src/OpenGL/libEGL/BUILD.gn
index 90d87ea..e6f76b7 100644
--- a/src/OpenGL/libEGL/BUILD.gn
+++ b/src/OpenGL/libEGL/BUILD.gn
@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import("//build/toolchain/toolchain.gni")
-
# Need a separate config to ensure the warnings are added to the end.
config("swiftshader_libEGL_private_config") {
defines = [ "EGL_EGLEXT_PROTOTYPES" ]
@@ -82,18 +80,6 @@
[ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ]
}
- if (use_thin_lto) {
- # https://crbug.com/686980
- # This target relies on the linker to be smart and garbage collect unused symbols.
- # It is not the case for LLD + ThinLTO, so we have to use this ugly workaround.
- cflags = [
- "-Xclang",
- "-fno-lto-unit",
- "-fno-whole-program-vtables",
- "-fno-sanitize=cfi",
- ]
- }
-
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
diff --git a/src/OpenGL/libGLESv2/BUILD.gn b/src/OpenGL/libGLESv2/BUILD.gn
index cc1c8cd..4d0b159 100644
--- a/src/OpenGL/libGLESv2/BUILD.gn
+++ b/src/OpenGL/libGLESv2/BUILD.gn
@@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import("//build/toolchain/toolchain.gni")
-
# Need a separate config to ensure the warnings are added to the end.
config("swiftshader_libGLESv2_private_config") {
defines = [
@@ -100,18 +98,6 @@
[ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ]
}
- if (use_thin_lto) {
- # https://crbug.com/686980
- # This target relies on the linker to be smart and garbage collect unused symbols.
- # It is not the case for LLD + ThinLTO, so we have to use this ugly workaround.
- cflags = [
- "-Xclang",
- "-fno-lto-unit",
- "-fno-whole-program-vtables",
- "-fno-sanitize=cfi",
- ]
- }
-
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",