Bug 1162846 - Don't use str.find in moz.build. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 08 May 2015 14:36:43 +0900
changeset 274206 fbb4a7ee99905430079b3e9773626b7e38133884
parent 274205 3804df2cb8767956ca3f788589678aa012fd6ef2
child 274207 4eef4a28a52fcdaabf1c7c0ae7afc088a8c97012
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1162846
milestone40.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 1162846 - Don't use str.find in moz.build. r=mshal
ipc/chromium/moz.build
xpcom/reflect/xptcall/md/unix/moz.build
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
@@ -246,16 +246,16 @@ if os_bsd:
         ]
     if not CONFIG['MOZ_NATIVE_LIBEVENT']:
         SOURCES += [
             'src/third_party/libevent/kqueue.c',
         ]
         LOCAL_INCLUDES += ['src/third_party/libevent/bsd']
 
 ost = CONFIG['OS_TEST']
-if ost.find('86') == -1 and ost.find('arm') == -1 and ost.find('mips') == -1:
+if '86' not in ost and 'arm' not in ost and 'mips' not in ost:
     SOURCES += [
         'src/base/atomicops_internals_mutex.cc',
     ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
--- a/xpcom/reflect/xptcall/md/unix/moz.build
+++ b/xpcom/reflect/xptcall/md/unix/moz.build
@@ -28,45 +28,45 @@ if CONFIG['OS_ARCH'] == 'GNU':
 
 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD', 'OpenBSD') or \
    CONFIG['OS_ARCH'].startswith('GNU_'):
     if CONFIG['OS_TEST'] == 'x86_64':
         SOURCES += [
             'xptcinvoke_x86_64_unix.cpp',
             'xptcstubs_x86_64_linux.cpp',
         ]
-    elif CONFIG['OS_TEST'].find('86') != -1:
+    elif '86' in CONFIG['OS_TEST']:
         SOURCES += [
             'xptcinvoke_gcc_x86_unix.cpp',
             'xptcstubs_gcc_x86_unix.cpp'
         ]
 
 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
-    if CONFIG['OS_TEST'].find('ia64') != -1:
+    if 'ia64' in CONFIG['OS_TEST']:
         SOURCES += [
             'xptcinvoke_asm_ipf64.s',
             'xptcinvoke_ipf64.cpp',
             'xptcstubs_asm_ipf64.s',
             'xptcstubs_ipf64.cpp'
         ]
 
-if CONFIG['OS_ARCH'] == 'SunOS':
+if CONFIG['OS_ARCH'] == 'SunOS' and '86' in CONFIG['OS_TEST']:
     if CONFIG['OS_TEST'] == 'x86_64':
         if CONFIG['GNU_CC']:
             SOURCES += [
                 'xptcinvoke_x86_64_unix.cpp',
                 'xptcstubs_x86_64_linux.cpp'
             ]
         else:
             SOURCES += [
                 'xptcinvoke_x86_64_solaris.cpp',
                 'xptcstubs_asm_x86_64_solaris_SUNW.s',
                 'xptcstubs_x86_64_solaris.cpp',
             ]
-    elif CONFIG['OS_TEST'].find('86') != -1:
+    else:
         if CONFIG['GNU_CC']:
             SOURCES += [
                 'xptcinvoke_gcc_x86_unix.cpp',
                 'xptcstubs_gcc_x86_unix.cpp'
             ]
         else:
             SOURCES += [
                 'xptcinvoke_asm_x86_solaris_SUNW.s',
@@ -151,18 +151,18 @@ if CONFIG['OS_ARCH'] == 'Linux':
             'xptcstubs_aarch64.cpp',
             'xptcstubs_asm_aarch64.s',
         ]
     if CONFIG['OS_TEST'] == 'm68k':
         SOURCES += [
             'xptcinvoke_linux_m68k.cpp',
             'xptcstubs_linux_m68k.cpp',
         ]
-    if CONFIG['OS_TEST'].find('mips') != -1:
-        if CONFIG['OS_TEST'].find('mips64') != -1:
+    if 'mips' in CONFIG['OS_TEST']:
+        if 'mips64' in CONFIG['OS_TEST']:
             SOURCES += [
                 'xptcinvoke_asm_mips64.S',
                 'xptcinvoke_mips64.cpp',
                 'xptcstubs_asm_mips64.S',
                 'xptcstubs_mips64.cpp',
             ]
         else:
             SOURCES += [
@@ -229,17 +229,17 @@ if CONFIG['OS_TEST'] in ('macppc', 'bebo
 if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc':
     SOURCES += [
         'xptcinvoke_asm_ppc_openbsd.S',
         'xptcinvoke_ppc_openbsd.cpp',
         'xptcstubs_asm_ppc_openbsd.S',
         'xptcstubs_ppc_openbsd.cpp',
     ]
 
-if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'].find('sparc') != -1:
+if CONFIG['OS_ARCH'] == 'Linux' and 'sparc' in CONFIG['OS_TEST']:
     SOURCES += [
         'xptcinvoke_asm_sparc_linux_GCC3.s',
         'xptcinvoke_sparc_solaris.cpp',
         'xptcstubs_asm_sparc_solaris.s',
         'xptcstubs_sparc_solaris.cpp',
     ]
 
 if CONFIG['OS_ARCH'] == 'NetBSD' and CONFIG['OS_TEST'] == 'sparc':
@@ -261,17 +261,17 @@ if CONFIG['OS_ARCH'] == 'OpenBSD' and CO
 if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD') and CONFIG['OS_TEST'] == 'sparc64':
     SOURCES += [
         'xptcinvoke_asm_sparc64_openbsd.s',
         'xptcinvoke_sparc64_openbsd.cpp',
         'xptcstubs_asm_sparc64_openbsd.s',
         'xptcstubs_sparc64_openbsd.cpp',
     ]
 
-if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1:
+if CONFIG['OS_ARCH'] == 'SunOS' and '86' not in CONFIG['OS_TEST']:
     GENERATED_FILES = [
         'xptcstubsdef_asm.solx86',
     ]
     if CONFIG['HAVE_64BIT_BUILD']:
         SOURCES += [
             'xptcinvoke_sparcv9_solaris.cpp',
             'xptcstubs_sparcv9_solaris.cpp',
         ]