# Maintainer: Ray Donnelly <mingw.android@gmail.com>

# My workings ..
#
# Setting up a virtualenv and installing setuptools and pip into it:
#   pushd /c/repo/mingw-w64-firefox/src
#   PATH=/mingw64/bin:$PATH /mingw64/bin/python2.7.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py /tmp/test
#   PATH=/mingw64/bin:$PATH PYTHONPATH="C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/setuptools-11.0-py2.py3-none-any.whl;C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl" PIP_FIND_LINKS=". C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support" PIP_USE_WHEEL=1 PIP_PRE=1 PIP_NO_INDEX=1 C:/msys64t/tmp/test/bin/python2.7.exe -c 'import sys, pip; sys.exit(pip.main(["install", "--ignore-installed"] + sys.argv[1:]))' setuptools pip
#
# Using msys2-python has a problem. It emits .cpp files containing msys2 paths which causes MinGW-w64 GCC to fall over.
#   seems harfbuzz have some conversion detection support that may be useful:
#   "checking how to convert x86_64-pc-mingw64 file names to toolchain format... func_convert_file_msys_to_w32"
#   but it'd need implementing in Python with subprocess I guess:
#   msys2-python -> mingw-w64-gcc             : cygpath -m
#   msys2-python -> msys2-mingw-w64-cross-gcc : noop
#   mingw-python -> mingw-w64-gcc             : noop
#   mingw-python -> msys2-mingw-w64-cross-gcc : cygpath -u
#   *            -> *                         : noop

# Testing:
#   cd /c/repo/mingw-w64-firefox/src
#   [[ -d /tmp/win32-python ]] && rm -rf /tmp/win32-python
#   mkdir /tmp/win32-python
#   [[ -d /tmp/mingw-python ]] && rm -rf /tmp/mingw-python
#   mkdir /tmp/mingw-python
#   /c/Python27/python.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py  /tmp/win32-python > /tmp/win32-python/log.txt
#   /mingw64/bin/python.exe $PWD/firefox-39.0/python/virtualenv/virtualenv.py /tmp/mingw-python > /tmp/mingw-python/log.txt
#
# "ImportError: No module named opcode" <- it's meant to be found in the original location?!
# Working:
# In fake distutils __init__.py, sys.path is
# ['',
#  'C:\\repo\\mingw-w64-firefox\\src\\firefox-39.0\\python\\virtualenv\\virtualenv_support\\setuptools-11.0-py2.py3-none-any.whl',
#  'C:\\repo\\mingw-w64-firefox\\src\\firefox-39.0\\python\\virtualenv\\virtualenv_support\\pip-6.0.6-py2.py3-none-any.whl',
#  'C:\\windows\\system32\\python27.zip',
#  'C:\\msys64t\\tmp\\win32-python\\DLLs',
#  'C:\\msys64t\\tmp\\win32-python\\lib',
#  'C:\\msys64t\\tmp\\win32-python\\lib\\plat-win',
#  'C:\\msys64t\\tmp\\win32-python\\lib\\lib-tk',
#  'C:\\msys64t\\tmp\\win32-python\\Scripts',
#  'C:\\Python27\\Lib',
#  'C:\\Python27\\DLLs',
#  'C:\\Python27\\Lib\\lib-tk',
#  'C:\\msys64t\\tmp\\win32-python',
#  'C:\\msys64t\\tmp\\win32-python\\lib\\site-packages']

# In fake distutils __init__.py, sys.path is
# ['',
#  'C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/setuptools-11.0-py2.py3-none-any.whl',
#  'C:/repo/mingw-w64-firefox/src/firefox-39.0/python/virtualenv/virtualenv_support/pip-6.0.6-py2.py3-none-any.whl',
#  'C:/msys64t/tmp/mingw-python/lib/python27.zip',
#  'C:/msys64t/tmp/mingw-python/lib/python2.7',
#  'C:/msys64t/tmp/mingw-python/lib/python2.7/plat-win32',
#  'C:/msys64t/tmp/mingw-python/lib/python2.7/lib-tk',
#  'C:/msys64t/tmp/mingw-python/lib/python2.7/lib-old',
#  'C:/msys64t/tmp/mingw-python/lib/python2.7/lib-dynload',
#  'C:/building/msys32/mingw64',
#  'C:/msys64t/mingw64/Lib',
#  'C:/msys64t/mingw64/DLLs',
#  'C:/msys64t/tmp/mingw-python/lib/python2.7/site-packages']

# Tweaks.
#_make="make.exe"
_make="mingw32-make.exe"
#_python="/usr/bin/python2.7.exe"
_python="${MINGW_PREFIX}/bin/python2.7.exe"
#_python="/c/Python27/python.exe"
#_python="/e/WinProgF/Python27/python.exe"
path_conv_for_make() {
  if [ "${_make}" = "mingw32-make.exe" ]; then
    echo $(cygpath -m "${1}")
  else
    echo $(cygpath -u "${1}")
  fi
}

_realname=firefox
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=42.0
pkgrel=1
pkgdesc='Mozilla Firefox (mingw-w64)'
groups=("${MINGW_PACKAGE_PREFIX}")
arch=('any')
options=('debug' '!strip')
url='https://www.mozilla.org/firefox/'
license=('MPL2')
makedepends=('unzip'
             'zip'
             "${MINGW_PACKAGE_PREFIX}-yasm"
             "${MINGW_PACKAGE_PREFIX}-python2")
source=("https://ftp.mozilla.org/pub/mozilla.org/${_realname}/releases/${pkgver}/source/${_realname}-${pkgver}.source.tar.xz"
        "https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/moztools-static.zip"
        "nsinstall.exe.manifest"
        "0001-Allow-MSYS2-shell.patch"
        "0002-Allow-MSYS2-make.patch"
        "0003-Use-PYTHON-env-var.patch"
        "0004-Allow-MSYS2-python.patch"
        "0005-Allow-mingw-w64-python.patch"
        "0006-Fix-pointer-casting.patch"
        "0007-Fix-duplicate-explicit-instantiation.patch"
        "0008-Fix-stray-back-slash-in-program.patch"
        "0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch"
        "0010-Dont-use-I64-numeric-suffix.patch"
        "0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch"
        "0013-MinGW-w64-Disable-TabletMode-stuff.patch"
        "0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch"
        "0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch"
        "0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch"
        "0017-MSYS2-Dont-use--static-or--static-libgcc.patch"
        "0018-MSYS2-Allow-make-install.patch"
        "0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch"
        "0020-gmp-clearkey-include-atomic-header.patch"
        "0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch"
        "debugging.patch"
        "mozconfig.x86_64"
        "mozconfig.i686"
        "config.sub"
        "config.guess")
noextract=("${_realname}-${pkgver}.source.tar.xz")
sha256sums=('994a346699298277b64ec0cab72660b8d3e5b879a2ac79207576f7e6c33da3ae'
            '1894bc68a0badd6e6f68f66abc4c6cd8e222791dd194f6b631ce536011ab6707'
            '838098b25a8044176b3139b4003594570c62a8d64f5470fbbd769f3bf44e0855'
            '944f828850ffb8bf1f5d1576f3936f49f45c074a081561962d0afbd82df0a366'
            'e3368aefa89c6fd11d3ed57e692bd161469b97fb5c966f99ffb7fb1579aae3e8'
            '6426f31d44a89fbcdc0c6a1b6d2abc3e74189c516216ec653c2dcffee6245320'
            'f0348d1d636644a3f1ed241a4ee0cd16b25b4277c4baf3ff1618a80a4ddc8bad'
            'cf71fe54468a31a0e732031d3b674b8ca67c9c9d48d0503bef4e60cf7978c9af'
            'cab6ec2ca1a3e3db717f40c41d6b0df5dc5178243e1d9120f91667ad575e7cb1'
            '3a04602928dde8825aaaf490b852884fed2d5bd51f73bfb70554a104d91f4b04'
            '536600e47e3a6d82594d79363e93d603060656f730c7e6d935038871c8b4e7ae'
            '9c5385270daeec1aa0ee59b6858f2480124e9b6997758531d1afa8341ab0ae08'
            '6a48d267b10bbd2b1e09f640c8cdf43ee4261f68f5f26583eee5d095651ac517'
            '088b96090d7c4e486d98078061c80269456abd04d8213c8e7cf85157bba4c032'
            '43cb6db288e43210916cfed3d2ac6ff134fea66fc96b2742df84e4f2eef0f470'
            'abeb36a361a0e050339fa73bcf4bea2593bbcf8158cc55acb85ead30d8bc6e18'
            'bce1f0cb890ad5073e6ed32becb47cb37c72abadefd21cf1c719ac225024fa95'
            'a89f72a42c3135bab192d8e211e0254d598491da6d40cc222579ce0de2c02e0a'
            '950bc77eafa406779ca868451d85b948870a2372b0571b45802701ec60c10535'
            '6cd5434010ea9c833024fca168074332ec773739fe79562049d749ba8666f392'
            '7249af996f51fdb13f8e604b7847824100fddc2d7c929633f7234042d7b06788'
            '3321e26101e2b8926613a689de9dc63675a89f260e09e6f42ded73d1354a156f'
            '48e87f4630bb98a72c7020eac9279b17f6215326cea7871abf912ae6d429b428'
            '9428e85b7e81e214f24da62a3e4a74247864abc3ec7f7580d921b7a82492b84f'
            '7f6c58450710585a73466ac3df2ca199b6f7b5f2aed27965c8e7c1ac826aea7b'
            'd60b56da6587a31a35b9c5f703e36e6106c1a788f43ee16cf05d7e47a6412631'
            '75d5d255a2a273b6e651f82eecfabf6cbcd8eaeae70e86b417384c8f4a58d8d3'
            '467e0886e3d4b06087e704dc9e22bbb8f93eb8c7b81aeae1ee0000d06aa4c45f')

prepare() {
  [ -d "${srcdir}"/${_realname}-${pkgver} ] && rm -rf ${_realname}-${pkgver}
  tar -xf "${srcdir}"/${_realname}-${pkgver}.source.tar.xz || true
  if [ -d "${srcdir}"/mozilla-beta ]; then
    _archivedir="mozilla-beta"
  elif [ -d "${srcdir}"/mozilla-release ]; then
    _archivedir="mozilla-release"
  elif [ -d "${srcdir}"/${_realname}-${pkgver} ]; then
    echo "Found sources"
  else
    echo "Can't find sources!"
    exit 1
  fi

  if [ -n "$_archivedir" ]; then
    # Getting a lot of "mv: cannot move .. Permission denied"; try a bit of sleeping. Yuck.
    (sleep 1 && mv "${srcdir}"/"${_archivedir}" "${srcdir}"/${_realname}-${pkgver}) || \
    (sleep 1 && mv "${srcdir}"/"${_archivedir}" "${srcdir}"/${_realname}-${pkgver})
  fi

  cd "${srcdir}"/${_realname}-${pkgver}
  # Mostly this patch is about msys2-python and mingw-w64-python not
  # working with virtualenv. Really it needs splitting into two, one
  # adding support for each of them. Most of the "is_win or True:"
  # and "is_win and False:" stuff relates to mingw-w64-python and is
  # to be replaced with proper detection and a variable "is_mingw".
  patch -p1 -i "${srcdir}"/0001-Allow-MSYS2-shell.patch
  if [ "${_make}" = "make" ]; then
    patch -p1 -i "${srcdir}"/0002-Allow-MSYS2-make.patch
  fi
  patch -p1 -i "${srcdir}"/0003-Use-PYTHON-env-var.patch
  if [ "${_python}" = "/usr/bin/python2.7.exe" ]; then
    patch -p1 -i "${srcdir}"/0004-Allow-MSYS2-python.patch
  fi
  patch -p1 -i "${srcdir}"/0005-Allow-mingw-w64-python.patch
  patch -p1 -i "${srcdir}"/0006-Fix-pointer-casting.patch
  patch -p1 -i "${srcdir}"/0007-Fix-duplicate-explicit-instantiation.patch
  patch -p1 -i "${srcdir}"/0008-Fix-stray-back-slash-in-program.patch
  patch -p1 -i "${srcdir}"/0009-MinGW-w64-Hack-out-__except-in-PlatformThread__SetName.patch
  patch -p1 -i "${srcdir}"/0010-Dont-use-I64-numeric-suffix.patch
  patch -p1 -i "${srcdir}"/0011-stagefreight-Dont-use-old-MinGW-w64-headers.patch
  patch -p1 -i "${srcdir}"/0013-MinGW-w64-Disable-TabletMode-stuff.patch
  patch -p1 -i "${srcdir}"/0014-MinGW-w64-cast-fixes-LPCWSTR-to-char16_t.patch
  patch -p1 -i "${srcdir}"/0015-nss-lib-dbm-Fix-incorrect-delete-__attribute__-if-non-gcc-or-gcc1.patch
  patch -p1 -i "${srcdir}"/0016-MinGW-w64-GMPLoader-Add-MOZ_SANDBOX-compile-guard-around-widePath-usage.patch
  patch -p1 -i "${srcdir}"/0017-MSYS2-Dont-use--static-or--static-libgcc.patch
  patch -p1 -i "${srcdir}"/0018-MSYS2-Allow-make-install.patch
  patch -p1 -i "${srcdir}"/0019-Bug-id-1163452-MSYS2-Dont-MOZ_ASSERT-when-stdout-is-same-as-stderr.patch
  patch -p1 -i "${srcdir}"/0020-gmp-clearkey-include-atomic-header.patch
  patch -p1 -i "${srcdir}"/0021-MinGW-w64-Dont-redefine-MFVideoFormat_VPn0.patch
  # patch -p1 -i "${srcdir}"/debugging.patch

  find . -name config.sub -exec cp "${srcdir}"/config.sub {} \;
  find . -name config.guess -exec cp "${srcdir}"/config.guess {} \;
  (autoconf-2.13 && cd js/src && autoconf-2.13)

  # Despite commit https://hg.mozilla.org/mozilla-central/rev/e149b8c85eb8 (hg log -p -r 98136 | less):
  # changeset:   98136:e149b8c85eb8
  # summary:     Bug 757252 - Kill nsinstall_win.c, use nsinstall.py on Windows instead. r=ted
  # .. we still requires an nsinstall executable for some of the build process (NSPR, more?):
  # firefox-41.0b5/nsprpub/configure.in:1177
  # case "$host" in
  # *-mingw*|*-msys*)
  #     NSINSTALL=nsinstall
  #     ;;
  # However, if we try to use it for everything via:
  # "${_make}" -f $PWD/client.mk build NSINSTALL=${srcdir}/moztools/bin/nsinstall.exe
  # .. we run into race conditions, some of which were fixed here:
  # https://hg.mozilla.org/mozilla-central/rev/e857761718d5
  # .. but the nsinstall.exe in moztools.zip (from 2006) doesn't include those fixes. Anyway,
  # since nsinstall_win.c has been removed to ease maintainence, we can get away with using
  # the buggy one, as nsinstall.py is used for the majority of the build process.
  cp "${srcdir}"/moztools/bin/nsinstall.exe .
  cp "${srcdir}"/nsinstall.exe.manifest .
}

build() {
  cd "${srcdir}"/${_realname}-${pkgver}
  if [ "${CARCH}" = "i686" ]; then
    _builddir=obj-i686-w64-mingw32
  else
    _builddir=obj-x86_64-w64-mingw32
  fi
  [ -d ${_builddir} ] && rm -rf "${_builddir}"
  mkdir ${_builddir}
  cp "${srcdir}"/mozconfig.${CARCH} ${_builddir}/.mozconfig
  if check_option "debug" "y"; then
    echo "ac_add_options --enable-debug-symbols"  >> ${_builddir}/.mozconfig
    echo "ac_add_options --disable-install-strip" >> ${_builddir}/.mozconfig
    echo "ac_add_options --disable-optimize"      >> ${_builddir}/.mozconfig
    # The next two lines are for older versions of Firefox but
    # I've not managed to build a debuggable xul.dll yet.
    echo "ac_add_options --enable-debugger-info-modules=yes" >> ${_builddir}/.mozconfig
    export export MOZ_DEBUG_SYMBOLS=1
  fi
  export PYTHON=$(path_conv_for_make "${_python}")
  echo $PYTHON
  export MOZCONFIG=${PWD}/${_builddir}/.mozconfig
  # See: https://bugzilla.mozilla.org/show_bug.cgi?id=950332
  echo "mk_add_options MOZ_OBJDIR=$(path_conv_for_make ${PWD}/${_builddir})" >> ${_builddir}/.mozconfig
  export MIDL="${MINGW_PREFIX}/bin/widl.exe -I ${MINGW_PREFIX}/${CARCH}-w64-mingw32/include"
  export MOZ_TOOLS=${MINGW_PREFIX}
  export MAKEFLAGS=-j9
  # For nsinstall.exe
  export PATH=${PWD}:"${PATH}"

  # .. make a shell script so we can easily recreate the build environment while
  # developing this PKGBUILD.
  set
  set |awk '
            BEGIN { _p = 1; }
            $0~/^[^ ]+ \(\)/ { _p = 0; }
            _p == 1
            $0 == "}" { _p = 1; }
            ' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
                          /^(UID|EUID)=/d;
                          /^(FUNCNAME|GROUPS|PPID|SHELLOPTS|BASHOPTS)=/d;' > ./env-${CARCH}.sh
  echo "export PATH PYTHON MOZCONFIG MIDL MOZ_TOOLS CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS" >> ./env-${CARCH}.sh

  "${_make}" -f $PWD/client.mk configure
  "${_make}" -f $PWD/client.mk build
}

# check() {
#   cd "${srcdir}"/${_realname}-${pkgver}
#   "${_make}" -f $PWD/client.mk check
# }

package() {
  cd "${srcdir}"/${_realname}-${pkgver}
  if [ "${CARCH}" = "i686" ]; then
    _builddir=obj-i686-w64-mingw32
  else
    _builddir=obj-x86_64-w64-mingw32
  fi
  # TBB uses:
  "${_make}" -k -C ${PWD}/${_builddir} package INNER_MAKE_PACKAGE=true
  # ArchLinux uses (but this fails on MSYS2):
  # "${_make}" -k -C ${PWD}/${_builddir} DESTDIR="${pkgdir}" INSTALL_SDK= install -k
}

# Trying to figure out why I'm not getting debugging info in xul.dll:
# (do_main in firefox-41.0.1/browser/app/nsBrowserApp.cpp is the last thing with debug info)
# Crash happens in firefox-41.0.1/js/src/jit/BaselineJIT.cpp .. in .. firefox-41.0.1/obj-i686-w64-mingw32/js/src/Unified_cpp_js_src3.cpp .. in .. libjs_static.a
# c++ -mwindows -o nsBrowserApp.o -c   -DFIREFOX_ICO='"../../dist/branding/firefox.ico"' -DDOCUMENT_ICO='"../../dist/branding/document.ico"' -DNEWWINDOW_ICO='"../../dist/branding/newwindow.ico"' -DNEWTAB_ICO='"../../dist/branding/newtab.ico"' -DPBMODE_ICO='"../../dist/branding/pbmode.ico"'  -DXPCOM_GLUE -DAPP_VERSION='41.0.1' -DMOZ_PHOENIX -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/browser/app -I. -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/build -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/toolkit/xre -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/xpcom/base -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/xpcom/build -I../../dist/include   -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/dist/include/nspr -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/dist/include/nss         -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/nsBrowserApp.o.pp -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -Wno-format -march=i686 -mtune=generic -O2 -pipe -ggdb -Og -ggdb -Og -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DDEBUG -DTRACING -g -fno-omit-frame-pointer      E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/browser/app/nsBrowserApp.cpp
# E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/_virtualenv/bin/python.exe E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/config/expandlibs_exec.py --uselist --  c++ -mwindows -o firefox.exe -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -Wno-format -march=i686 -mtune=generic -O2 -pipe -ggdb -Og -ggdb -Og -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DDEBUG -DTRACING -g -fno-omit-frame-pointer   nsBrowserApp.o ./module.res -mconsole -lpthread -pipe -Wl,--build-id -Wl,--enable-stdcall-fixup -Wl,--large-address-aware   -DELAYLOAD:mozglue.dll   ../../xpcom/glue/standalone/staticruntime/libxpcomglue_staticruntime.a ../../memory/fallible/libfallible.a  ../../mozglue/build/libmozglue.a  -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32 -lnetapi32 -ldelayimp
#
# /mingw32/bin/objdump -p ./js/src/Unified_cpp_js_src3.o | less
#  ./js/src/Unified_cpp_js_src3.o:     file format pe-i386
# Characteristics 0x104
#         line numbers stripped
#         32 bit words
#
# c++ -mwindows -o Unified_cpp_js_src3.o -c   -DFFI_BUILDING -D_CRT_RAND_S -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX='""' -DDLL_SUFFIX='".dll"' -DAB_CD= -DNO_NSPR_10_SUPPORT -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/js/src -I. -Ictypes/libffi/include -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/intl/icu/source/common -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/intl/icu/source/i18n -I../../dist/include   -IE:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/dist/include/nspr          -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DMOZILLA_CLIENT -include ../../js/src/js-confdefs.h -MD -MP -MF .deps/Unified_cpp_js_src3.o.pp -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -Wall -Wsign-compare -Wtype-limits -Wno-invalid-offsetof -Wcast-align -Wno-format -march=i686 -mtune=generic -O2 -pipe -ggdb -Og -ggdb -Og -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DDEBUG -DTRACING -g -fno-omit-frame-pointer      E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/js/src/Unified_cpp_js_src3.cpp
# E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/obj-i686-w64-mingw32/_virtualenv/bin/python.exe E:/m2/repo/mingw-w64-firefox/src/firefox-41.0.1/config/expandlibs_exec.py --extract -- ar crs libjs_static.a RegExp.o CTypes.o Library.o Parser.o ExecutableAllocatorWin.o jsarray.o jsatom.o jsmath.o jsutil.o pm_stub.o TraceLogging.o TraceLoggingGraph.o TraceLoggingTypes.o Unified_cpp_js_src0.o Unified_cpp_js_src1.o Unified_cpp_js_src10.o Unified_cpp_js_src11.o Unified_cpp_js_src12.o Unified_cpp_js_src2.o Unified_cpp_js_src3.o Unified_cpp_js_src4.o Unified_cpp_js_src5.o Unified_cpp_js_src6.o Unified_cpp_js_src7.o Unified_cpp_js_src8.o Unified_cpp_js_src9.o ../../config/external/ffi/libffi.a ../../config/external/nspr/libnspr.a ../../config/external/zlib/libzlib.a

