xpcom/reflect/xptcall/src/md/unix/moz.build

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
michael@0 2 # vim: set filetype=python:
michael@0 3 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 6
michael@0 7 if CONFIG['OS_ARCH'] == 'Darwin':
michael@0 8 SOURCES += [
michael@0 9 'xptcinvoke_darwin.cpp',
michael@0 10 'xptcstubs_darwin.cpp',
michael@0 11 ]
michael@0 12 if CONFIG['OS_TEST'] == 'powerpc':
michael@0 13 SOURCES += [
michael@0 14 'xptcinvoke_asm_ppc_rhapsody.s',
michael@0 15 ]
michael@0 16 GENERATED_SOURCES += [
michael@0 17 'xptcstubs_asm_ppc_darwin.s',
michael@0 18 ]
michael@0 19 if '86' in CONFIG['OS_TEST'] and CONFIG['OS_TEST'] != 'x86_64':
michael@0 20 DEFINES['MOZ_NEED_LEADING_UNDERSCORE'] = True
michael@0 21
michael@0 22 if CONFIG['OS_ARCH'] in ('NetBSD', 'OpenBSD', 'GNU'):
michael@0 23 if CONFIG['CPU_ARCH'] == 'x86':
michael@0 24 SOURCES += [
michael@0 25 'xptcinvoke_gcc_x86_unix.cpp',
michael@0 26 'xptcstubs_gcc_x86_unix.cpp'
michael@0 27 ]
michael@0 28
michael@0 29 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD') or \
michael@0 30 CONFIG['OS_ARCH'].startswith('GNU_'):
michael@0 31 if CONFIG['OS_TEST'] == 'x86_64':
michael@0 32 SOURCES += [
michael@0 33 'xptcinvoke_x86_64_unix.cpp',
michael@0 34 'xptcstubs_x86_64_linux.cpp',
michael@0 35 ]
michael@0 36 elif CONFIG['OS_TEST'].find('86') != -1:
michael@0 37 SOURCES += [
michael@0 38 'xptcinvoke_gcc_x86_unix.cpp',
michael@0 39 'xptcstubs_gcc_x86_unix.cpp'
michael@0 40 ]
michael@0 41
michael@0 42 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
michael@0 43 if CONFIG['OS_TEST'].find('ia64') != -1:
michael@0 44 SOURCES += [
michael@0 45 'xptcinvoke_asm_ipf64.s',
michael@0 46 'xptcinvoke_ipf64.cpp',
michael@0 47 'xptcstubs_asm_ipf64.s',
michael@0 48 'xptcstubs_ipf64.cpp'
michael@0 49 ]
michael@0 50
michael@0 51 if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'x86_64':
michael@0 52 SOURCES += [
michael@0 53 'xptcinvoke_amd64_openbsd.cpp',
michael@0 54 'xptcstubs_amd64_openbsd.cpp'
michael@0 55 ]
michael@0 56
michael@0 57 if CONFIG['OS_ARCH'] == 'SunOS':
michael@0 58 if CONFIG['OS_TEST'] == 'x86_64':
michael@0 59 if CONFIG['GNU_CC']:
michael@0 60 SOURCES += [
michael@0 61 'xptcinvoke_x86_64_unix.cpp',
michael@0 62 'xptcstubs_x86_64_linux.cpp'
michael@0 63 ]
michael@0 64 else:
michael@0 65 SOURCES += [
michael@0 66 'xptcinvoke_x86_64_solaris.cpp',
michael@0 67 'xptcstubs_asm_x86_64_solaris_SUNW.s',
michael@0 68 'xptcstubs_x86_64_solaris.cpp',
michael@0 69 ]
michael@0 70 elif CONFIG['OS_TEST'].find('86') != -1:
michael@0 71 if CONFIG['GNU_CC']:
michael@0 72 SOURCES += [
michael@0 73 'xptcinvoke_gcc_x86_unix.cpp',
michael@0 74 'xptcstubs_gcc_x86_unix.cpp'
michael@0 75 ]
michael@0 76 else:
michael@0 77 SOURCES += [
michael@0 78 'xptcinvoke_asm_x86_solaris_SUNW.s',
michael@0 79 'xptcinvoke_x86_solaris.cpp',
michael@0 80 'xptcstubs_asm_x86_solaris_SUNW.s',
michael@0 81 'xptcstubs_x86_solaris.cpp'
michael@0 82 ]
michael@0 83
michael@0 84 if CONFIG['OS_TEST'] == 'alpha':
michael@0 85 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD', 'NetBSD'):
michael@0 86 SOURCES += [
michael@0 87 'xptcinvoke_linux_alpha.cpp',
michael@0 88 'xptcstubs_linux_alpha.cpp',
michael@0 89 ]
michael@0 90 elif CONFIG['OS_ARCH'] == 'OpenBSD':
michael@0 91 SOURCES += [
michael@0 92 'xptcinvoke_alpha_openbsd.cpp',
michael@0 93 'xptcstubs_alpha_openbsd.cpp',
michael@0 94 ]
michael@0 95
michael@0 96 if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['OS_TEST'] == 'sa110':
michael@0 97 if CONFIG['OS_ARCH'] == 'Linux':
michael@0 98 SOURCES += [
michael@0 99 'xptcinvoke_arm.cpp',
michael@0 100 'xptcstubs_arm.cpp'
michael@0 101 ]
michael@0 102 CXXFLAGS += ['-O2']
michael@0 103 elif CONFIG['OS_ARCH'] == 'NetBSD':
michael@0 104 SOURCES += [
michael@0 105 'xptcinvoke_arm_netbsd.cpp',
michael@0 106 'xptcstubs_arm_netbsd.cpp',
michael@0 107 ]
michael@0 108
michael@0 109 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['OS_ARCH'] == 'OpenBSD':
michael@0 110 SOURCES += [
michael@0 111 'xptcinvoke_arm_openbsd.cpp',
michael@0 112 'xptcstubs_arm_openbsd.cpp',
michael@0 113 ]
michael@0 114
michael@0 115 if CONFIG['OS_ARCH'] == 'HP-UX':
michael@0 116 if CONFIG['CC'] != 'gcc':
michael@0 117 if CONFIG['OS_TEST'] == 'ia64':
michael@0 118 SOURCES += [
michael@0 119 'xptcinvoke_asm_ipf32.s',
michael@0 120 'xptcinvoke_ipf32.cpp',
michael@0 121 'xptcstubs_asm_ipf32.s',
michael@0 122 'xptcstubs_ipf32.cpp',
michael@0 123 ]
michael@0 124 else:
michael@0 125 SOURCES += [
michael@0 126 'xptcinvoke_asm_pa32.s',
michael@0 127 'xptcinvoke_pa32.cpp',
michael@0 128 'xptcstubs_asm_pa32.s',
michael@0 129 'xptcstubs_pa32.cpp'
michael@0 130 ]
michael@0 131
michael@0 132 if CONFIG['OS_ARCH'] == 'Linux':
michael@0 133 if CONFIG['OS_TEST'] in ('hppa', 'hppa2.0', 'hppa1.1'):
michael@0 134 if CONFIG['GNU_CXX']:
michael@0 135 SOURCES += [
michael@0 136 'xptcinvoke_asm_parisc_linux.s',
michael@0 137 'xptcinvoke_pa32.cpp',
michael@0 138 'xptcstubs_asm_parisc_linux.s',
michael@0 139 'xptcstubs_pa32.cpp',
michael@0 140 ]
michael@0 141 elif CONFIG['COMPILE_ENVIRONMENT']:
michael@0 142 error('Unknown C++ compiler, xptcall assembly will probably be incorrect.')
michael@0 143
michael@0 144 if CONFIG['OS_ARCH'] == 'NetBSD':
michael@0 145 if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k',
michael@0 146 'next68k', 'sun3', 'sun3x', 'x68k'):
michael@0 147 SOURCES += [
michael@0 148 'xptcinvoke_netbsd_m68k.cpp',
michael@0 149 'xptcstubs_netbsd_m68k.cpp'
michael@0 150 ]
michael@0 151
michael@0 152 if CONFIG['OS_ARCH'] == 'Linux':
michael@0 153 if CONFIG['OS_TEST'] == 'aarch64':
michael@0 154 SOURCES += [
michael@0 155 'xptcinvoke_aarch64.cpp',
michael@0 156 'xptcinvoke_asm_aarch64.s',
michael@0 157 'xptcstubs_aarch64.cpp',
michael@0 158 'xptcstubs_asm_aarch64.s',
michael@0 159 ]
michael@0 160 if CONFIG['OS_TEST'] == 'm68k':
michael@0 161 SOURCES += [
michael@0 162 'xptcinvoke_linux_m68k.cpp',
michael@0 163 'xptcstubs_linux_m68k.cpp',
michael@0 164 ]
michael@0 165 if CONFIG['OS_TEST'].find('mips') != -1:
michael@0 166 if CONFIG['OS_TEST'].find('mips64') != -1:
michael@0 167 SOURCES += [
michael@0 168 'xptcinvoke_asm_mips64.S',
michael@0 169 'xptcinvoke_mips64.cpp',
michael@0 170 'xptcstubs_asm_mips64.S',
michael@0 171 'xptcstubs_mips64.cpp',
michael@0 172 ]
michael@0 173 else:
michael@0 174 SOURCES += [
michael@0 175 'xptcinvoke_asm_mips.S',
michael@0 176 'xptcinvoke_mips.cpp',
michael@0 177 'xptcstubs_asm_mips.S',
michael@0 178 'xptcstubs_mips.cpp',
michael@0 179 ]
michael@0 180
michael@0 181 if CONFIG['OS_ARCH'] == 'AIX':
michael@0 182 if CONFIG['HAVE_64BIT_OS']:
michael@0 183 SOURCES += [
michael@0 184 'xptcinvoke_asm_ppc_aix64.s',
michael@0 185 'xptcinvoke_ppc_aix64.cpp',
michael@0 186 'xptcstubs_ppc_aix64.cpp',
michael@0 187 ]
michael@0 188 GENERATED_SOURCES += [
michael@0 189 'xptcstubs_asm_ppc_aix64.s',
michael@0 190 ]
michael@0 191 else:
michael@0 192 SOURCES += [
michael@0 193 'xptcinvoke_ppc_aix.cpp',
michael@0 194 'xptcstubs_ppc_aix.cpp',
michael@0 195 ]
michael@0 196 if CONFIG['AIX_OBJMODEL'] == 'ibm':
michael@0 197 SOURCES += [
michael@0 198 'xptcinvoke_asm_ppc_ibmobj_aix.s',
michael@0 199 ]
michael@0 200 else:
michael@0 201 SOURCES += [
michael@0 202 'xptcinvoke_asm_ppc_aix.s',
michael@0 203 ]
michael@0 204 GENERATED_SOURCES += [
michael@0 205 'xptcstubs_asm_ppc_aix.s',
michael@0 206 ]
michael@0 207
michael@0 208 if CONFIG['OS_TEST'] == 'powerpc':
michael@0 209 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
michael@0 210 SOURCES += [
michael@0 211 'xptcinvoke_asm_ppc_linux.S',
michael@0 212 'xptcinvoke_ppc_linux.cpp',
michael@0 213 'xptcstubs_asm_ppc_linux.S',
michael@0 214 'xptcstubs_ppc_linux.cpp',
michael@0 215 ]
michael@0 216
michael@0 217 if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'):
michael@0 218 if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'):
michael@0 219 SOURCES += [
michael@0 220 'xptcinvoke_asm_ppc64_linux.S',
michael@0 221 'xptcinvoke_ppc64_linux.cpp',
michael@0 222 'xptcstubs_asm_ppc64_linux.S',
michael@0 223 'xptcstubs_ppc64_linux.cpp',
michael@0 224 ]
michael@0 225
michael@0 226 if CONFIG['OS_TEST'] in ('macppc', 'bebox', 'ofppc', 'prep', 'amigappc'):
michael@0 227 if CONFIG['OS_ARCH'] == 'NetBSD':
michael@0 228 SOURCES += [
michael@0 229 'xptcinvoke_asm_ppc_netbsd.s',
michael@0 230 'xptcinvoke_ppc_netbsd.cpp',
michael@0 231 'xptcstubs_asm_ppc_netbsd.s',
michael@0 232 'xptcstubs_ppc_netbsd.cpp',
michael@0 233 ]
michael@0 234
michael@0 235 if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc':
michael@0 236 SOURCES += [
michael@0 237 'xptcinvoke_asm_ppc_openbsd.S',
michael@0 238 'xptcinvoke_ppc_openbsd.cpp',
michael@0 239 'xptcstubs_asm_ppc_openbsd.S',
michael@0 240 'xptcstubs_ppc_openbsd.cpp',
michael@0 241 ]
michael@0 242
michael@0 243 if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'].find('sparc') != -1:
michael@0 244 SOURCES += [
michael@0 245 'xptcinvoke_asm_sparc_linux_GCC3.s',
michael@0 246 'xptcinvoke_sparc_solaris.cpp',
michael@0 247 'xptcstubs_asm_sparc_solaris.s',
michael@0 248 'xptcstubs_sparc_solaris.cpp',
michael@0 249 ]
michael@0 250
michael@0 251 if CONFIG['OS_ARCH'] == 'NetBSD' and CONFIG['OS_TEST'] == 'sparc':
michael@0 252 SOURCES += [
michael@0 253 'xptcinvoke_asm_sparc_netbsd.s',
michael@0 254 'xptcinvoke_sparc_netbsd.cpp',
michael@0 255 'xptcstubs_asm_sparc_netbsd.s',
michael@0 256 'xptcstubs_sparc_netbsd.cpp',
michael@0 257 ]
michael@0 258
michael@0 259 if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc':
michael@0 260 SOURCES += [
michael@0 261 'xptcinvoke_asm_sparc_openbsd.s',
michael@0 262 'xptcinvoke_sparc_openbsd.cpp',
michael@0 263 'xptcstubs_asm_sparc_openbsd.s',
michael@0 264 'xptcstubs_sparc_openbsd.cpp',
michael@0 265 ]
michael@0 266
michael@0 267 if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD') and CONFIG['OS_TEST'] == 'sparc64':
michael@0 268 SOURCES += [
michael@0 269 'xptcinvoke_asm_sparc64_openbsd.s',
michael@0 270 'xptcinvoke_sparc64_openbsd.cpp',
michael@0 271 'xptcstubs_asm_sparc64_openbsd.s',
michael@0 272 'xptcstubs_sparc64_openbsd.cpp',
michael@0 273 ]
michael@0 274
michael@0 275 if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1:
michael@0 276 GENERATED_FILES = [
michael@0 277 'xptcstubsdef_asm.solx86',
michael@0 278 ]
michael@0 279 if CONFIG['HAVE_64BIT_OS']:
michael@0 280 SOURCES += [
michael@0 281 'xptcinvoke_sparcv9_solaris.cpp',
michael@0 282 'xptcstubs_sparcv9_solaris.cpp',
michael@0 283 ]
michael@0 284 else:
michael@0 285 SOURCES += [
michael@0 286 'xptcinvoke_sparc_solaris.cpp',
michael@0 287 'xptcstubs_sparc_solaris.cpp',
michael@0 288 ]
michael@0 289 if CONFIG['GNU_CC']:
michael@0 290 SOURCES += [
michael@0 291 'xptcinvoke_asm_sparc_solaris_GCC3.s',
michael@0 292 'xptcstubs_asm_sparc_solaris.s',
michael@0 293 ]
michael@0 294 else:
michael@0 295 if CONFIG['HAVE_64BIT_OS']:
michael@0 296 SOURCES += [
michael@0 297 'xptcinvoke_asm_sparcv9_solaris_SUNW.s',
michael@0 298 'xptcstubs_asm_sparcv9_solaris.s',
michael@0 299 ]
michael@0 300 else:
michael@0 301 SOURCES += [
michael@0 302 'xptcinvoke_asm_sparc_solaris_SUNW.s',
michael@0 303 'xptcstubs_asm_sparc_solaris.s',
michael@0 304 ]
michael@0 305
michael@0 306 if CONFIG['OS_ARCH'] == 'Linux':
michael@0 307 if CONFIG['OS_TEST'] == 's390':
michael@0 308 SOURCES += [
michael@0 309 'xptcinvoke_linux_s390.cpp',
michael@0 310 'xptcstubs_linux_s390.cpp',
michael@0 311 ]
michael@0 312 CXXFLAGS += [
michael@0 313 '-fno-strict-aliasing',
michael@0 314 '-fno-inline',
michael@0 315 '-fomit-frame-pointer',
michael@0 316 '-mbackchain',
michael@0 317 ]
michael@0 318 elif CONFIG['OS_TEST'] == 's390x':
michael@0 319 SOURCES += [
michael@0 320 'xptcinvoke_linux_s390x.cpp',
michael@0 321 'xptcstubs_linux_s390x.cpp',
michael@0 322 ]
michael@0 323 CXXFLAGS += [
michael@0 324 '-fno-strict-aliasing',
michael@0 325 '-fno-inline',
michael@0 326 '-fomit-frame-pointer',
michael@0 327 '-mbackchain',
michael@0 328 ]
michael@0 329
michael@0 330 FINAL_LIBRARY = 'xpcom_core'
michael@0 331
michael@0 332 LOCAL_INCLUDES += [
michael@0 333 '../..',
michael@0 334 '../../../../xptinfo/src',
michael@0 335 ]
michael@0 336
michael@0 337 NO_PGO = True

mercurial