[tbb-commits] [Git][tpo/applications/tor-browser-build][maint-12.5] Bug 31546: Copy Firefox PDBs for Windows

richard (@richard) git at gitlab.torproject.org
Mon Jul 31 20:37:33 UTC 2023



richard pushed to branch maint-12.5 at The Tor Project / Applications / tor-browser-build


Commits:
3ba21986 by Pier Angelo Vendrame at 2023-07-31T20:37:13+00:00
Bug 31546: Copy Firefox PDBs for Windows

Also copy debug symbols after stripping on Linux 32-bit (we only copied
them in Linux 64-bit) and for all our browsers (previously we copied
them only for Tor Browser).

Include the headers directory with the symbols, because some of them
are generated during the build, but they are needed for debugging.

- - - - -


2 changed files:

- projects/browser/build
- projects/firefox/build


Changes:

=====================================
projects/browser/build
=====================================
@@ -397,13 +397,13 @@ SCRIPT_EOF
 [% IF c("var/updater_enabled") -%]
   cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/
 [% END -%]
-[% IF c("var/linux-x86_64") -%]
-  [% IF c("var/tor-browser") -%]
-    cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug.tar.xz "$OUTDIR"/[% c("var/project-name") %]-[% c("var/mar_osname") %]-debug.tar.xz
-  [% END -%]
-  [% IF !c("var/asan") -%]
-    cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver-linux64.tar.xz "$OUTDIR"/
+[% IF c("var/linux") -%]
+  cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug.tar.xz "$OUTDIR/[% c('var/project-name') %]-[% c('var/mar_osname') %]-debug.tar.xz"
+  [% IF c("var/linux-x86_64") && !c("var/asan") -%]
+    cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver.tar.xz "$OUTDIR/geckodriver-[% c('var/mar_osname') %].tar.xz"
   [% END -%]
+[% ELSIF c("var/windows") -%]
+  cp $rootdir/[% c('input_files_by_name/firefox') %]/browser-debug.zip "$OUTDIR/[% c('var/project-name') %]-[% c('var/mar_osname') %]-debug.zip"
 [% END -%]
 [%IF c("var/tor-browser") -%]
   tor_expert_bundle_src="[% c("input_files_by_name/tor-expert-bundle") %]"


=====================================
projects/firefox/build
=====================================
@@ -211,6 +211,10 @@ export LANG=C.UTF-8
     cp obj-*/testing/geckodriver/x86_64-unknown-linux-gnu/release/geckodriver $distdir
   [% END %]
   cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir/Browser/
+  mkdir -p $distdir/Debug
+  # Some include files are symlinks, so use -Lr, or the tarball will fail
+  # silently. Also, on Linux we populate the debug symbols by stripping later.
+  cp -Lr obj-*/dist/include $distdir/Debug/
   # Remove firefox-bin (we don't use it, see ticket #10126)
   rm -f "$distdir/Browser/[% c('var/exe_name') %]-bin"
   # TODO: There goes FIPS-140.. We could upload these somewhere unique and
@@ -232,6 +236,11 @@ RBM_TB_EOF
   [% ELSE %]
     cp -a /var/tmp/dist/fxc2/bin/d3dcompiler_47.dll $distdir/Browser
   [% END %]
+  mkdir -p $distdir/Debug/Browser
+  pushd obj-*
+  cp -Lr dist/include $distdir/Debug/
+  find . \( -path ./dist -o -path ./_tests \) -prune -o -name '*.pdb' -exec cp -l {} $distdir/Debug/Browser/ \;
+  popd
 [% END %]
 
 [% IF c("var/updater_enabled") -%]
@@ -279,8 +288,8 @@ RBM_TB_EOF
 
 cd $distdir
 
-[% IF c("var/linux-x86_64") %]
-  [% IF !c("var/asan") %]
+[% IF c("var/linux") -%]
+  [% IF c("var/linux-x86_64") && !c("var/asan") -%]
     # No need for an unstripped geckodriver
     strip geckodriver
   [% END %]
@@ -334,17 +343,22 @@ END;
         tar_args => '-czf ' _ dest_dir _ '/' _ c('filename') _ '/browser.tar.gz',
     }) %]
 
-[% IF c("var/linux-x86_64") %]
+[% IF c("var/linux") -%]
 [% c('tar', {
         tar_src => [ 'Debug' ],
         tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/browser-debug.tar.xz',
     }) %]
-  [% IF !c("var/asan") %]
+  [% IF c("var/linux-x86_64") && !c("var/asan") -%]
     [% c('tar', {
             tar_src => [ 'geckodriver' ],
             tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver-linux64.tar.xz',
         }) %]
   [% END %]
+[% ELSIF c("var/windows") -%]
+  [% c('zip', {
+      zip_src => [ 'Debug' ],
+      zip_args => dest_dir _ '/' _ c('filename') _ '/browser-debug.zip',
+    }) %]
 [% END %]
 
 [% IF c("var/updater_enabled") -%]



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3ba219864577205cdd3bb6603487a57685f22911

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3ba219864577205cdd3bb6603487a57685f22911
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230731/f44ee985/attachment-0001.htm>


More information about the tbb-commits mailing list