From 34cb9cf1fe48de2badd039c54de9a0ec9472c8e1 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 12 Mar 2018 15:47:17 +0900 Subject: [PATCH] Use lld for linking on both Debug/Release builds This follows Chromium's config, otherwise we get linking error: /usr/bin/ld: shared_library/libmirclient.so.9: __cxa_finalize: invalid needed version 2 shared_library/libmirclient.so.9: error adding symbols: Bad value --- brightray/brightray.gyp | 1 - brightray/brightray.gypi | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/brightray/brightray.gyp b/brightray/brightray.gyp index dc5760db708d..b0f9652debc3 100644 --- a/brightray/brightray.gyp +++ b/brightray/brightray.gyp @@ -129,7 +129,6 @@ '<(libchromiumcontent_dir)/libpdf.a', '<(libchromiumcontent_dir)/libppapi_cpp_objects.a', '<(libchromiumcontent_dir)/libppapi_internal_module.a', - '<(libchromiumcontent_dir)/libjpeg.a', '<(libchromiumcontent_dir)/libpdfium.a', '<(libchromiumcontent_dir)/libfdrm.a', '<(libchromiumcontent_dir)/libformfiller.a', diff --git a/brightray/brightray.gypi b/brightray/brightray.gypi index 2f5109d00e63..596b9bd373ed 100644 --- a/brightray/brightray.gypi +++ b/brightray/brightray.gypi @@ -142,6 +142,11 @@ '-Wl,-z,noexecstack', ], }], # OS=="linux" + ['OS=="linux" and target_arch in ["ia32", "x64", "arm64"]', { + 'ldflags': [ + '-fuse-ld=lld', # Chromium Clang uses lld for linking + ], + }], # OS=="linux" and target_arch in ["ia32", "x64", "arm64"] ['OS=="mac"', { 'defines': [ # The usage of "webrtc/modules/desktop_capture/desktop_capture_options.h" @@ -293,7 +298,6 @@ ], 'ldflags': [ '-flto=thin', - '-fuse-ld=lld', # Chromium Clang uses lld for doing LTO '-Wl,--icf=all', '-Wl,--lto-O0', # this could be removed in future; see https://codereview.chromium.org/2939923004 '-Wl,-mllvm,-function-sections',