Commit ad675fa1 by Ivan Krasin

Also fix libGLESv2.

BUG=chromium:686980 Change-Id: I5f22f57288246c262a0fdb0ca1b0b321e4a58c1b Reviewed-on: https://swiftshader-review.googlesource.com/9310Tested-by: 's avatarIvan Krasin <krasin@chromium.org> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 158dcfc1
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//build/toolchain/toolchain.gni")
# Need a separate config to ensure the warnings are added to the end. # Need a separate config to ensure the warnings are added to the end.
config("swiftshader_libGLESv2_private_config") { config("swiftshader_libGLESv2_private_config") {
defines = [ defines = [
...@@ -102,6 +104,18 @@ shared_library("swiftshader_libGLESv2") { ...@@ -102,6 +104,18 @@ shared_library("swiftshader_libGLESv2") {
[ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ] [ "-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:chromium_code" ]
configs += [ configs += [
"//build/config/compiler:no_chromium_code", "//build/config/compiler:no_chromium_code",
......
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