Bug 1457482 Correct elfhack's LTO detection to handle -flto=thin r=glandium
authorTom Ritter <tom@mozilla.com>
Fri, 01 Jun 2018 10:10:16 -0500
changeset 421540 36132fa62b44b4de90bf90ca9eba9412103bec9b
parent 421539 bfc39006be1ba53ee706f94425ac19f548cc5576
child 421541 8b89c933a7036cc8aa846b655dc55e619e15face
push id104056
push usernbeleuzu@mozilla.com
push dateWed, 06 Jun 2018 09:52:47 +0000
treeherdermozilla-inbound@072201279e41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1457482
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1457482 Correct elfhack's LTO detection to handle -flto=thin r=glandium MozReview-Commit-ID: LnDLrDN0W9O
build/unix/elfhack/moz.build
--- a/build/unix/elfhack/moz.build
+++ b/build/unix/elfhack/moz.build
@@ -9,19 +9,20 @@ DIRS += ['inject']
 
 if not CONFIG['CROSS_COMPILE']:
     SOURCES += [
         'dummy.c',
         'test-array.c',
         'test-ctors.c',
     ]
 
-    if '-flto' in CONFIG['OS_CFLAGS']:
-        SOURCES['test-array.c'].flags += ['-fno-lto']
-        SOURCES['test-ctors.c'].flags += ['-fno-lto']
+    for f in CONFIG['OS_CFLAGS']:
+        if f.startswith('-flto'):
+            SOURCES['test-array.c'].flags += ['-fno-lto']
+            SOURCES['test-ctors.c'].flags += ['-fno-lto']
 
 HOST_SOURCES += [
     'elf.cpp',
     'elfhack.cpp',
 ]
 
 HostProgram('elfhack')