Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 1003273007: LLVM_LTO support for make / ninja (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: ninja, make/mac: Add support for LLVM_LTO. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mac/gyptest-lto.py » ('j') | test/mac/gyptest-lto.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/xcode_emulation.py
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index 72bb53a40dbb9fb2ce9cc9d18059da084802b204..90ebc48894421387aed8af11dc7146bf97abf025 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -525,6 +525,14 @@ class XcodeSettings(object):
if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'):
cflags.append('-Wnewline-eof')
+ # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or
+ # llvm-gcc. It also requires a fairly recent libtool, and
+ # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the
+ # path to the libLTO.dylib that matches the used clang.
+ if self._Test('LLVM_LTO', 'YES', default='NO'):
+ cflags.append('-flto')
+
scottmg 2015/04/01 23:50:21 nit; extra \n
+
self._AppendPlatformVersionMinFlags(cflags)
# TODO:
« no previous file with comments | « no previous file | test/mac/gyptest-lto.py » ('j') | test/mac/gyptest-lto.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698