Unverified Commit 055e7514 authored by boklm's avatar boklm
Browse files

Bug 21998: add option for debug builds

parent a718f53f
...@@ -8,6 +8,9 @@ release: submodule-update ...@@ -8,6 +8,9 @@ release: submodule-update
release-linux-x86_64: submodule-update release-linux-x86_64: submodule-update
$(rbm) build release --target release --target torbrowser-linux-x86_64 $(rbm) build release --target release --target torbrowser-linux-x86_64
release-linux-x86_64-debug: submodule-update
$(rbm) build release --target release --target torbrowser-linux-x86_64-debug
release-linux-i686: submodule-update release-linux-i686: submodule-update
$(rbm) build release --target release --target torbrowser-linux-i686 $(rbm) build release --target release --target torbrowser-linux-i686
...@@ -26,6 +29,9 @@ alpha: submodule-update ...@@ -26,6 +29,9 @@ alpha: submodule-update
alpha-linux-x86_64: submodule-update alpha-linux-x86_64: submodule-update
$(rbm) build release --target alpha --target torbrowser-linux-x86_64 $(rbm) build release --target alpha --target torbrowser-linux-x86_64
alpha-linux-x86_64-debug: submodule-update
$(rbm) build release --target alpha --target torbrowser-linux-x86_64-debug
alpha-linux-i686: submodule-update alpha-linux-i686: submodule-update
$(rbm) build release --target alpha --target torbrowser-linux-i686 $(rbm) build release --target alpha --target torbrowser-linux-i686
...@@ -44,6 +50,9 @@ nightly: submodule-update ...@@ -44,6 +50,9 @@ nightly: submodule-update
nightly-linux-x86_64: submodule-update nightly-linux-x86_64: submodule-update
$(rbm) build release --target nightly --target torbrowser-linux-x86_64 $(rbm) build release --target nightly --target torbrowser-linux-x86_64
nightly-linux-x86_64-debug: submodule-update
$(rbm) build release --target nightly --target torbrowser-linux-x86_64-debug
nightly-linux-i686: submodule-update nightly-linux-i686: submodule-update
$(rbm) build release --target nightly --target torbrowser-linux-i686 $(rbm) build release --target nightly --target torbrowser-linux-i686
...@@ -80,6 +89,9 @@ testbuild: submodule-update ...@@ -80,6 +89,9 @@ testbuild: submodule-update
testbuild-linux-x86_64: submodule-update testbuild-linux-x86_64: submodule-update
$(rbm) build release --target testbuild --target torbrowser-linux-x86_64 $(rbm) build release --target testbuild --target torbrowser-linux-x86_64
testbuild-linux-x86_64-debug: submodule-update
$(rbm) build release --target testbuild --target torbrowser-linux-x86_64-debug
testbuild-linux-i686: submodule-update testbuild-linux-i686: submodule-update
$(rbm) build release --target testbuild --target torbrowser-linux-i686 $(rbm) build release --target testbuild --target torbrowser-linux-i686
......
...@@ -50,6 +50,10 @@ locale is created, without mar files. By default it is based on the ...@@ -50,6 +50,10 @@ locale is created, without mar files. By default it is based on the
alpha channel, but you can change that by editing rbm.conf.local. alpha channel, but you can change that by editing rbm.conf.local.
The resulting build can be found in directory testbuild. The resulting build can be found in directory testbuild.
{release,alpha,nightly,testbuild}-linux-x86_64-debug
----------------------------------------------------
Create a debug build for Linux x86_64 with debug features such as ASan.
fetch fetch
----- -----
Fetch new commits from all components. This is useful when you want to Fetch new commits from all components. This is useful when you want to
......
...@@ -49,6 +49,12 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz ...@@ -49,6 +49,12 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c("version") %] cd /var/tmp/build/[% project %]-[% c("version") %]
mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig
[% IF c("var/asan") -%]
mv -f .mozconfig-asan .mozconfig
# Without disabling LSan our build is blowing up:
# https://bugs.torproject.org/10599#comment:52
export ASAN_OPTIONS="detect_leaks=0"
[% END -%]
eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] $(cat browser/config/version.txt)) eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] $(cat browser/config/version.txt))
if [ -z $MOZ_BUILD_DATE ] if [ -z $MOZ_BUILD_DATE ]
......
...@@ -17,6 +17,10 @@ targets: ...@@ -17,6 +17,10 @@ targets:
torbrowser-linux-x86_64: torbrowser-linux-x86_64:
var: var:
torbrowser-linux-x86_64: 1 torbrowser-linux-x86_64: 1
torbrowser-linux-x86_64-debug:
var:
torbrowser-linux-x86_64: 1
debug-build: '-debug'
torbrowser-linux-i686: torbrowser-linux-i686:
var: var:
torbrowser-linux-i686: 1 torbrowser-linux-i686: 1
...@@ -77,7 +81,7 @@ input_files: ...@@ -77,7 +81,7 @@ input_files:
enable: '[% c("var/torbrowser-linux-x86_64") %]' enable: '[% c("var/torbrowser-linux-x86_64") %]'
target: target:
- '[% c("var/build_target") %]' - '[% c("var/build_target") %]'
- torbrowser-linux-x86_64 - 'torbrowser-linux-x86_64[% c("var/debug-build") %]'
- name: sandbox-linux-x86_64 - name: sandbox-linux-x86_64
project: sandbox project: sandbox
......
...@@ -272,6 +272,13 @@ LD_LIBRARY_PATH="${HOME}/TorBrowser/Tor/" ...@@ -272,6 +272,13 @@ LD_LIBRARY_PATH="${HOME}/TorBrowser/Tor/"
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
export SELFRANDO_write_layout_file= export SELFRANDO_write_layout_file=
[% IF c("var/asan") -%]
# We need to disable LSan which is enabled by default now. Otherwise we'll get
# a crash during shutdown: https://bugs.torproject.org/10599#comment:59
ASAN_OPTIONS="detect_leaks=0"
export ASAN_OPTIONS
[% END -%]
function setControlPortPasswd() { function setControlPortPasswd() {
local ctrlPasswd=$1 local ctrlPasswd=$1
......
...@@ -70,6 +70,10 @@ tar -C $TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %] -xf [% c('input_f ...@@ -70,6 +70,10 @@ tar -C $TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %] -xf [% c('input_f
[% IF c("var/linux") %] [% IF c("var/linux") %]
cp RelativeLink/* ${TB_STAGE_DIR}/Browser/ cp RelativeLink/* ${TB_STAGE_DIR}/Browser/
cp RelativeLink/start-tor-browser.desktop ${TB_STAGE_DIR}/ cp RelativeLink/start-tor-browser.desktop ${TB_STAGE_DIR}/
cat > ${TB_STAGE_DIR}/Browser/start-tor-browser << 'RBM_TB_EOF'
[% INCLUDE 'RelativeLink/start-tor-browser' -%]
RBM_TB_EOF
chmod +x ${TB_STAGE_DIR}/Browser/start-tor-browser
[% END %] [% END %]
tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/tor-browser.tar.gz tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/tor-browser.tar.gz
......
...@@ -69,7 +69,9 @@ input_files: ...@@ -69,7 +69,9 @@ input_files:
- URL: https://addons.cdn.mozilla.net/user-media/addons/722/noscript_security_suite-5.1.7-fx+sm.xpi - URL: https://addons.cdn.mozilla.net/user-media/addons/722/noscript_security_suite-5.1.7-fx+sm.xpi
name: noscript name: noscript
sha256sum: 617f73683acdca7df2a7d08843443d38929afbf40075e113ab3ccab0eef7cd6b sha256sum: 617f73683acdca7df2a7d08843443d38929afbf40075e113ab3ccab0eef7cd6b
- filename: RelativeLink - filename: 'RelativeLink/start-tor-browser.desktop'
enable: '[% c("var/linux") %]'
- filename: 'RelativeLink/execdesktop'
enable: '[% c("var/linux") %]' enable: '[% c("var/linux") %]'
- project: libdmg-hfsplus - project: libdmg-hfsplus
name: libdmg name: libdmg
......
...@@ -57,6 +57,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] ...@@ -57,6 +57,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
./autogen.sh ./autogen.sh
find -type f -print0 | xargs -0 [% c("var/touch") %] find -type f -print0 | xargs -0 [% c("var/touch") %]
./configure --disable-asciidoc --with-libevent-dir="$libeventdir" --with-openssl-dir="$openssldir" \ ./configure --disable-asciidoc --with-libevent-dir="$libeventdir" --with-openssl-dir="$openssldir" \
[% IF c("var/asan") %]--enable-fragile-hardening[% END %] \
[% IF c("var/windows") %]--with-zlib-dir="$zlibdir"[% END %] \ [% IF c("var/windows") %]--with-zlib-dir="$zlibdir"[% END %] \
[% IF c("var/osx") %]--enable-static-openssl[% END %] \ [% IF c("var/osx") %]--enable-static-openssl[% END %] \
--prefix="$distdir" [% c("var/configure_opt") %] --prefix="$distdir" [% c("var/configure_opt") %]
......
...@@ -130,6 +130,10 @@ targets: ...@@ -130,6 +130,10 @@ targets:
torbrowser-linux-x86_64: torbrowser-linux-x86_64:
- linux-x86_64 - linux-x86_64
- linux - linux
torbrowser-linux-x86_64-debug:
- linux-debug
- linux-x86_64
- linux
torbrowser-linux-i686: torbrowser-linux-i686:
- linux-i686 - linux-i686
- linux - linux
...@@ -171,6 +175,9 @@ targets: ...@@ -171,6 +175,9 @@ targets:
- libtool - libtool
- zip - zip
- unzip - unzip
linux-debug:
var:
asan: 1
torbrowser-windows-i686: torbrowser-windows-i686:
- windows-i686 - windows-i686
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment