Bug 1460020: Filter out PGO flags from cargo's LDFLAGS. r=froydnj

This commit is contained in:
David Major 2018-05-11 10:37:55 -04:00
Родитель 5430972e3d
Коммит e02fd9579e
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -925,8 +925,9 @@ ifndef MOZ_TSAN
# Cargo needs the same linker flags as the C/C++ compiler,
# but not the final libraries. Filter those out because they
# cause problems on macOS 10.7; see bug 1365993 for details.
# Also, we don't want to pass PGO flags until cargo supports them.
target_cargo_env_vars := \
MOZ_CARGO_WRAP_LDFLAGS="$(filter-out -framework Cocoa -lobjc AudioToolbox ExceptionHandling,$(LDFLAGS))" \
MOZ_CARGO_WRAP_LDFLAGS="$(filter-out -framework Cocoa -lobjc AudioToolbox ExceptionHandling -fprofile-%,$(LDFLAGS))" \
MOZ_CARGO_WRAP_LD="$(CC)" \
$(cargo_linker_env_var)=$(topsrcdir)/build/cargo-linker
endif # MOZ_TSAN