Unverified Commit bdd3275e authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 40015: Use only 64bit fxc2

We use the somewhat surprising breakage due to
https://bugzilla.mozilla.org/show_bug.cgi?id=1619504 to clean up our
fxc2 build and usage.

Previously, we built both the 64bit and 32bit version of fxc2 and were
running them in a 64bit and 32bit Wine environment, respectively.
However, that's not needed because a) Wine is capable of running both
64bit and 32bit binaries and b) fxc2 is only used at build time to
generate shader files. As we are building both Windows flavors in a
64bit container we should easily be able to live with just a 64bit
variant.

We need, nevertheless, take care that we still bundle the correct
d3dcompiler_47.dll library for the respective architecture.
parent e2675854
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -9,12 +9,6 @@ mkdir -p [% dest_dir _ '/' _ c('filename') %]
  # Setting up fxc2
  tar -C /var/tmp/dist -xf [% c('input_files_by_name/fxc2') %]
  export PATH="/var/tmp/dist/fxc2/bin:$PATH"
  # fxc2 requires Wine.
  export WINEARCH=[% IF c("var/windows-x86_64") %]win64[% ELSE %]win32[% END %]
  export HOME=/var/tmp/home
  mkdir -p $HOME
  WINEROOT=$HOME/.wine/drive_c
  wine wineboot -i
  # Setting up stack protector support
  tar -C /var/tmp/dist -xf [% c('input_files_by_name/mingw-w64') %]
  cp /var/tmp/dist/mingw-w64/gcclibs/{libssp.a,libssp_nonshared.a} /var/tmp/dist/mingw-w64-clang/[% c("arch") %]-w64-mingw32/lib/
@@ -192,8 +186,12 @@ rm -f js/src/configure

[% IF c("var/windows") %]
  cp -a obj-*/dist/firefox/* $distdir/Browser/
  [% IF c("var/windows-i686") %]
    cp -a /var/tmp/dist/fxc2/bin/d3dcompiler_47_32.dll $distdir/Browser/d3dcompiler_47.dll
  [% ELSE %]
    cp -a /var/tmp/dist/fxc2/bin/d3dcompiler_47.dll $distdir/Browser
  [% END %]
[% END %]

# Make MAR-based update tools available for use during the bundle phase.
# Note that mar and mbsdiff are standalone tools, compiled for the build
+2 −5
Original line number Diff line number Diff line
@@ -102,11 +102,6 @@ targets:
    var:
      arch_deps:
        - wine
      pre_pkginst: |
        [% IF c("var/windows-i686") -%]
          # We need this to install wine32
          dpkg --add-architecture i386
        [% END -%]
      compiler: mingw-w64-clang

  windows-i686:
@@ -152,6 +147,8 @@ input_files:
  - project: fxc2
    name: fxc2
    enable: '[% c("var/windows") %]'
    target_prepend:
      - torbrowser-windows-x86_64
  - name: mingw-w64
    project: mingw-w64
    enable: '[% c("var/windows") %]'
+3 −10
Original line number Diff line number Diff line
@@ -8,19 +8,12 @@ mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.gz
cd /var/tmp/build/[% project %]-[% c("version") %]

[% IF c("var/windows-i686") -%]
  make x86
[% ELSE -%]
make x64
[% END -%]

mkdir -p $distdir/bin/
cp fxc2.exe $distdir/bin/
[% IF c("var/windows-i686") -%]
  cp dll/d3dcompiler_47_32.dll $distdir/bin/d3dcompiler_47.dll
[% ELSE -%]
cp dll/d3dcompiler_47_32.dll $distdir/bin/d3dcompiler_47_32.dll
cp dll/d3dcompiler_47.dll $distdir/bin/
[% END -%]

cd /var/tmp/dist

+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
version: '[% c("abbrev") %]'
git_url: https://github.com/mozilla/fxc2.git
git_hash: 5ace4c25b63cb5a83b58a3eae3d36256a6022cde
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'

var:
  container:
+2 −0
Original line number Diff line number Diff line
@@ -394,6 +394,7 @@ targets:
    arch: x86_64
    var:
      windows-x86_64: 1
      windows-i686: 0
      osname: windows-x86_64
      # HEASLR is 64 bit only (see bug 12968)
      flag_HEASLR: '-Wl,--high-entropy-va'
@@ -401,6 +402,7 @@ targets:
    arch: i686
    var:
      windows-i686: 1
      windows-x86_64: 0
      osname: windows-i686
  windows:
    var: