Bug 1289847 - part 2 - work around Mac linking failures when Rust is enabled; r=mshal

Current stable versions of Rust use two Rust-specific personality
routines to perform exception handling, which empirically does not play
well with the Mac linker's optimizations for using compact unwind
formats. Nightly Rust has solved this issue, but for now, we'll have to
use -no_compact_unwind to disable the linker optimization.  The size
impact is negligible (0.02%) and will be going away once nightly Rust
becomes stable.
This commit is contained in:
Nathan Froyd 2016-08-03 04:24:33 -04:00
Родитель b9dd866253
Коммит fb331bdb6d
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -59,6 +59,11 @@ def Libxul(name):
if CONFIG['MOZ_NEEDS_LIBATOMIC']:
OS_LIBS += ['atomic']
# This option should go away in bug 1290972, but we need to wait until
# Rust 1.12 has been released.
if CONFIG['MOZ_RUST'] and CONFIG['OS_ARCH'] == 'Darwin':
LDFLAGS += ['-Wl,-no_compact_unwind']
Libxul('xul')
SDK_LIBRARY = True