boklm pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
-
3a0f6937
by NoisyCoil at 2024-11-21T11:04:34+01:00
-
2def046d
by NoisyCoil at 2024-11-21T11:04:40+01:00
-
32a0ef3c
by NoisyCoil at 2024-11-21T11:04:42+01:00
-
860ce1a5
by NoisyCoil at 2024-11-21T11:04:43+01:00
7 changed files:
- Makefile
- projects/browser/RelativeLink/start-browser
- projects/firefox/build
- projects/firefox/config
- projects/firefox/mozconfig
- projects/release/build
- projects/release/config
Changes:
... | ... | @@ -36,6 +36,9 @@ torbrowser-release-linux-x86_64-asan: submodule-update |
36 | 36 | torbrowser-release-linux-i686: submodule-update
|
37 | 37 | $(rbm) build release --target release --target browser-linux-i686 --target torbrowser
|
38 | 38 | |
39 | +torbrowser-release-linux-aarch64: submodule-update
|
|
40 | + $(rbm) build release --target release --target browser-linux-aarch64 --target torbrowser
|
|
41 | + |
|
39 | 42 | torbrowser-release-windows-i686: submodule-update
|
40 | 43 | $(rbm) build release --target release --target browser-windows-i686 --target torbrowser
|
41 | 44 | |
... | ... | @@ -75,6 +78,9 @@ torbrowser-alpha-linux-x86_64: submodule-update |
75 | 78 | torbrowser-alpha-linux-x86_64-asan: submodule-update
|
76 | 79 | $(rbm) build release --target alpha --target browser-linux-x86_64-asan --target torbrowser
|
77 | 80 | |
81 | +torbrowser-alpha-linux-aarch64: submodule-update
|
|
82 | + $(rbm) build release --target alpha --target browser-linux-aarch64 --target torbrowser
|
|
83 | + |
|
78 | 84 | torbrowser-alpha-linux-i686: submodule-update
|
79 | 85 | $(rbm) build release --target alpha --target browser-linux-i686 --target torbrowser
|
80 | 86 | |
... | ... | @@ -117,6 +123,9 @@ torbrowser-nightly-linux-x86_64: submodule-update |
117 | 123 | torbrowser-nightly-linux-x86_64-asan: submodule-update
|
118 | 124 | $(rbm) build release --target nightly --target browser-linux-x86_64-asan --target torbrowser
|
119 | 125 | |
126 | +torbrowser-nightly-linux-aarch64: submodule-update
|
|
127 | + $(rbm) build release --target nightly --target browser-linux-aarch64 --target torbrowser
|
|
128 | + |
|
120 | 129 | torbrowser-nightly-linux-i686: submodule-update
|
121 | 130 | $(rbm) build release --target nightly --target browser-linux-i686 --target torbrowser
|
122 | 131 | |
... | ... | @@ -162,6 +171,9 @@ torbrowser-testbuild-linux-x86_64-asan: submodule-update |
162 | 171 | torbrowser-testbuild-linux-i686: submodule-update
|
163 | 172 | $(rbm) build release --target testbuild --target browser-linux-i686 --target torbrowser
|
164 | 173 | |
174 | +torbrowser-testbuild-linux-aarch64: submodule-update
|
|
175 | + $(rbm) build release --target testbuild --target browser-linux-aarch64 --target torbrowser
|
|
176 | + |
|
165 | 177 | torbrowser-testbuild-windows-x86_64: submodule-update
|
166 | 178 | $(rbm) build release --target testbuild --target browser-windows-x86_64 --target torbrowser
|
167 | 179 | |
... | ... | @@ -274,6 +286,9 @@ basebrowser-release-linux-x86_64-asan: submodule-update |
274 | 286 | basebrowser-release-linux-i686: submodule-update
|
275 | 287 | $(rbm) build release --target release --target browser-linux-i686 --target basebrowser
|
276 | 288 | |
289 | +basebrowser-release-linux-aarch64: submodule-update
|
|
290 | + $(rbm) build release --target release --target browser-linux-aarch64 --target basebrowser
|
|
291 | + |
|
277 | 292 | basebrowser-release-windows-i686: submodule-update
|
278 | 293 | $(rbm) build release --target release --target browser-windows-i686 --target basebrowser
|
279 | 294 | |
... | ... | @@ -316,6 +331,9 @@ basebrowser-alpha-linux-x86_64-asan: submodule-update |
316 | 331 | basebrowser-alpha-linux-i686: submodule-update
|
317 | 332 | $(rbm) build release --target alpha --target browser-linux-i686 --target basebrowser
|
318 | 333 | |
334 | +basebrowser-alpha-linux-aarch64: submodule-update
|
|
335 | + $(rbm) build release --target alpha --target browser-linux-aarch64 --target basebrowser
|
|
336 | + |
|
319 | 337 | basebrowser-alpha-windows-i686: submodule-update
|
320 | 338 | $(rbm) build release --target alpha --target browser-windows-i686 --target basebrowser
|
321 | 339 | |
... | ... | @@ -358,6 +376,9 @@ basebrowser-nightly-linux-x86_64-asan: submodule-update |
358 | 376 | basebrowser-nightly-linux-i686: submodule-update
|
359 | 377 | $(rbm) build release --target nightly --target browser-linux-i686 --target basebrowser
|
360 | 378 | |
379 | +basebrowser-nightly-linux-aarch64: submodule-update
|
|
380 | + $(rbm) build release --target nightly --target browser-linux-aarch64 --target basebrowser
|
|
381 | + |
|
361 | 382 | basebrowser-nightly-windows-i686: submodule-update
|
362 | 383 | $(rbm) build release --target nightly --target browser-windows-i686 --target basebrowser
|
363 | 384 | |
... | ... | @@ -400,6 +421,9 @@ basebrowser-testbuild-linux-x86_64-asan: submodule-update |
400 | 421 | basebrowser-testbuild-linux-i686: submodule-update
|
401 | 422 | $(rbm) build release --target testbuild --target browser-linux-i686 --target basebrowser
|
402 | 423 | |
424 | +basebrowser-testbuild-linux-aarch64: submodule-update
|
|
425 | + $(rbm) build release --target testbuild --target browser-linux-aarch64 --target basebrowser
|
|
426 | + |
|
403 | 427 | basebrowser-testbuild-windows-x86_64: submodule-update
|
404 | 428 | $(rbm) build release --target testbuild --target browser-windows-x86_64 --target basebrowser
|
405 | 429 | |
... | ... | @@ -440,6 +464,9 @@ mullvadbrowser-release-linux-x86_64: submodule-update |
440 | 464 | mullvadbrowser-release-linux-x86_64-asan: submodule-update
|
441 | 465 | $(rbm) build release --target release --target browser-linux-x86_64-asan --target mullvadbrowser
|
442 | 466 | |
467 | +mullvadbrowser-release-linux-aarch64: submodule-update
|
|
468 | + $(rbm) build release --target release --target browser-linux-aarch64 --target mullvadbrowser
|
|
469 | + |
|
443 | 470 | mullvadbrowser-release-windows-x86_64: submodule-update
|
444 | 471 | $(rbm) build release --target release --target browser-windows-x86_64 --target mullvadbrowser
|
445 | 472 | |
... | ... | @@ -461,6 +488,9 @@ mullvadbrowser-alpha-linux-x86_64: submodule-update |
461 | 488 | mullvadbrowser-alpha-linux-x86_64-asan: submodule-update
|
462 | 489 | $(rbm) build release --target alpha --target browser-linux-x86_64-asan --target mullvadbrowser
|
463 | 490 | |
491 | +mullvadbrowser-alpha-linux-aarch64: submodule-update
|
|
492 | + $(rbm) build release --target alpha --target browser-linux-aarch64 --target mullvadbrowser
|
|
493 | + |
|
464 | 494 | mullvadbrowser-alpha-windows-x86_64: submodule-update
|
465 | 495 | $(rbm) build release --target alpha --target browser-windows-x86_64 --target mullvadbrowser
|
466 | 496 | |
... | ... | @@ -482,6 +512,9 @@ mullvadbrowser-nightly-linux-x86_64: submodule-update |
482 | 512 | mullvadbrowser-nightly-linux-x86_64-asan: submodule-update
|
483 | 513 | $(rbm) build release --target nightly --target browser-linux-x86_64-asan --target mullvadbrowser
|
484 | 514 | |
515 | +mullvadbrowser-nightly-linux-aarch64: submodule-update
|
|
516 | + $(rbm) build release --target nightly --target browser-linux-aarch64 --target mullvadbrowser
|
|
517 | + |
|
485 | 518 | mullvadbrowser-nightly-windows-x86_64: submodule-update
|
486 | 519 | $(rbm) build release --target nightly --target browser-windows-x86_64 --target mullvadbrowser
|
487 | 520 | |
... | ... | @@ -503,6 +536,9 @@ mullvadbrowser-testbuild-linux-x86_64: submodule-update |
503 | 536 | mullvadbrowser-testbuild-linux-x86_64-asan: submodule-update
|
504 | 537 | $(rbm) build release --target testbuild --target browser-linux-x86_64-asan --target mullvadbrowser
|
505 | 538 | |
539 | +mullvadbrowser-testbuild-linux-aarch64: submodule-update
|
|
540 | + $(rbm) build release --target testbuild --target browser-linux-aarch64 --target mullvadbrowser
|
|
541 | + |
|
506 | 542 | mullvadbrowser-testbuild-windows-x86_64: submodule-update
|
507 | 543 | $(rbm) build release --target testbuild --target browser-windows-x86_64 --target mullvadbrowser
|
508 | 544 |
... | ... | @@ -87,10 +87,12 @@ if [ "`id -u`" -eq 0 ]; then |
87 | 87 | exit 1
|
88 | 88 | fi
|
89 | 89 | |
90 | +[% IF c('var/linux-i686') || c('var/linux-x86_64') -%]
|
|
90 | 91 | if test -r /proc/cpuinfo && ! grep -q '^flags\s*:.* sse2' /proc/cpuinfo; then
|
91 | 92 | complain "[% c('var/Project_Name') %] requires a CPU with SSE2 support. Exiting."
|
92 | 93 | exit 1
|
93 | 94 | fi
|
95 | +[% END -%]
|
|
94 | 96 | |
95 | 97 | print_usage () {
|
96 | 98 | printf "\n[% c('var/Project_Name') %] Script Options\n"
|
... | ... | @@ -20,16 +20,21 @@ mkdir -p [% out_dir %] |
20 | 20 | |
21 | 21 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/rust') %]
|
22 | 22 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/cbindgen') %]
|
23 | -tar -C /var/tmp/dist -xf [% c('input_files_by_name/nasm') %]
|
|
24 | 23 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/node') %]
|
25 | -export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bin:/var/tmp/dist/node/bin:$PATH"
|
|
24 | +[% IF ! c("var/linux-aarch64") -%]
|
|
25 | + tar -C /var/tmp/dist -xf [% c('input_files_by_name/nasm') %]
|
|
26 | + export PATH="/var/tmp/dist/nasm/bin:$PATH"
|
|
27 | +[% END -%]
|
|
28 | +export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/node/bin:$PATH"
|
|
26 | 29 | |
27 | 30 | [% IF c("var/linux") -%]
|
28 | 31 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/clang') %]
|
29 | 32 | tar -C /var/tmp/dist -xf [% c('input_files_by_name/python') %]
|
30 | 33 | export PATH="/var/tmp/dist/python/bin:$PATH"
|
31 | - tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
|
|
32 | - export PATH="/var/tmp/dist/binutils/bin:$PATH"
|
|
34 | + [% IF ! c("var/linux-cross") -%]
|
|
35 | + tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
|
|
36 | + export PATH="/var/tmp/dist/binutils/bin:$PATH"
|
|
37 | + [% END -%]
|
|
33 | 38 | # Use clang for everything on Linux now if we don't build with ASan.
|
34 | 39 | [% IF ! c("var/asan") -%]
|
35 | 40 | export PATH="/var/tmp/dist/clang/bin:$PATH"
|
... | ... | @@ -39,6 +44,8 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bi |
39 | 44 | # breakage in Rust code. It seems that environment variable is not passed
|
40 | 45 | # down properly in that case. Thus, we set it here in the build script.
|
41 | 46 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib/i386-linux-gnu/pkgconfig"
|
47 | + [% ELSIF c("var/linux-cross") -%]
|
|
48 | + export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib/[% c("var/crosstarget") %]/pkgconfig"
|
|
42 | 49 | [% END -%]
|
43 | 50 | [% END -%]
|
44 | 51 | |
... | ... | @@ -296,14 +303,21 @@ cp -L obj-*/dist/bin/geckodriver* $distdir |
296 | 303 | cd $distdir
|
297 | 304 | |
298 | 305 | [% IF c("var/linux") -%]
|
306 | + [% IF c("var/linux-cross") -%]
|
|
307 | + CROSS_PREFIX=[% c("var/crosstarget") %]-
|
|
308 | + [% END -%]
|
|
309 | + |
|
310 | + OBJCOPY="${CROSS_PREFIX}objcopy"
|
|
311 | + STRIP="${CROSS_PREFIX}strip"
|
|
312 | + |
|
299 | 313 | mkdir -p $distdir/Debug/Browser
|
300 | 314 | # Strip and generate debuginfo for the firefox binary that we keep, all *.so
|
301 | 315 | # files, and the updater (see ticket #10126)
|
302 | 316 | for LIB in Browser/*.so "Browser/[% c('var/exe_name') %].real" [% IF c("var/updater_enabled") -%]Browser/updater[% END %]
|
303 | 317 | do
|
304 | - objcopy --only-keep-debug $LIB Debug/$LIB
|
|
305 | - strip $LIB
|
|
306 | - objcopy --add-gnu-debuglink=./Debug/$LIB $LIB
|
|
318 | + "$OBJCOPY" --only-keep-debug $LIB Debug/$LIB
|
|
319 | + "$STRIP" $LIB
|
|
320 | + "$OBJCOPY" --add-gnu-debuglink=./Debug/$LIB $LIB
|
|
307 | 321 | done
|
308 | 322 | [% END -%]
|
309 | 323 | |
... | ... | @@ -328,15 +342,19 @@ END; |
328 | 342 | %]
|
329 | 343 | |
330 | 344 | [% IF c("var/linux") -%]
|
331 | - /var/tmp/dist/gcc/bin/g++ $rootdir/abicheck.cc -o Browser/abicheck -std=c++17
|
|
345 | + /var/tmp/dist/gcc/bin/"${CROSS_PREFIX}g++" $rootdir/abicheck.cc -o Browser/abicheck -std=c++17
|
|
332 | 346 | [% IF !c("var/tor-browser") -%]
|
333 | 347 | libdest=Browser/libstdc++
|
334 | 348 | mkdir -p "$libdest"
|
349 | + libdir=[% c("var/libdir") %]
|
|
350 | + [% IF c("var/linux-cross") -%]
|
|
351 | + libdir="[% c("var/crosstarget") %]/$libdir"
|
|
352 | + [% END -%]
|
|
335 | 353 | # FIXME: tor-browser-build#40749
|
336 | - cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libstdc++.so.* "$libdest"
|
|
354 | + cp "/var/tmp/dist/gcc/$libdir/libstdc++.so."* "$libdest"
|
|
337 | 355 | [% IF c("var/asan") -%]
|
338 | - cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libasan.so.* "$libdest"
|
|
339 | - cp /var/tmp/dist/gcc/[% c("var/libdir") %]/libubsan.so.* "$libdest"
|
|
356 | + cp "/var/tmp/dist/gcc/$libdir/libasan.so."* "$libdest"
|
|
357 | + cp "/var/tmp/dist/gcc/$libdir/libubsan.so."* "$libdest"
|
|
340 | 358 | [% END -%]
|
341 | 359 | [% END -%]
|
342 | 360 | [% END -%]
|
... | ... | @@ -143,6 +143,23 @@ targets: |
143 | 143 | - libdrm-dev:i386
|
144 | 144 | libdir: lib32
|
145 | 145 | |
146 | + linux-aarch64:
|
|
147 | + var:
|
|
148 | + arch_deps:
|
|
149 | + - libgtk2.0-dev:arm64
|
|
150 | + - libgtk-3-dev:arm64
|
|
151 | + - libdbus-glib-1-dev:arm64
|
|
152 | + - libxt-dev:arm64
|
|
153 | + # To pass configure since ESR 31
|
|
154 | + - libpulse-dev:arm64
|
|
155 | + # To pass configure since ESR 52
|
|
156 | + - libx11-xcb-dev:arm64
|
|
157 | + # To pass configure since ESR 102
|
|
158 | + - libasound2-dev:arm64
|
|
159 | + # To support Wayland mode
|
|
160 | + - libdrm-dev:arm64
|
|
161 | + libdir: lib64
|
|
162 | + |
|
146 | 163 | macos:
|
147 | 164 | var:
|
148 | 165 | nightly_updates_publish_dir: '[% c("var/nightly_updates_publish_dir_prefix") %]nightly-macos'
|
... | ... | @@ -162,9 +179,10 @@ input_files: |
162 | 179 | - project: container-image
|
163 | 180 | - name: '[% c("var/compiler") %]'
|
164 | 181 | project: '[% c("var/compiler") %]'
|
182 | + # Cross-binutils are already included in the cross-compiler
|
|
165 | 183 | - project: binutils
|
166 | 184 | name: binutils
|
167 | - enable: '[% c("var/linux") %]'
|
|
185 | + enable: '[% c("var/linux") && ! c("var/linux-cross") %]'
|
|
168 | 186 | - filename: fix-info-plist.py
|
169 | 187 | enable: '[% c("var/macos") %]'
|
170 | 188 | - filename: nsis-uninstall.patch
|
... | ... | @@ -183,6 +201,7 @@ input_files: |
183 | 201 | name: node
|
184 | 202 | - project: nasm
|
185 | 203 | name: nasm
|
204 | + enable: '[% ! c("var/linux-aarch64") %]'
|
|
186 | 205 | - project: python
|
187 | 206 | name: python
|
188 | 207 | enable: '[% c("var/linux") %]'
|
... | ... | @@ -13,6 +13,10 @@ |
13 | 13 | |
14 | 14 | # set LDFLAGS for Full RELRO
|
15 | 15 | export LDFLAGS="-Wl,-z,relro -Wl,-z,now"
|
16 | + |
|
17 | + [% IF c("var/linux-cross") -%]
|
|
18 | + export LDFLAGS="-L/var/tmp/dist/gcc/[% c("var/crosstarget") %]/lib $LDFLAGS"
|
|
19 | + [% END -%]
|
|
16 | 20 | [% END -%]
|
17 | 21 | |
18 | 22 | [% IF c("var/windows") -%]
|
... | ... | @@ -37,6 +37,9 @@ mkdir -p "$destdir" |
37 | 37 | [% IF c("var/browser-linux-x86_64") -%]
|
38 | 38 | mv [% c('input_files_by_name/linux-x86_64') %]/* "$destdir"/
|
39 | 39 | [% END -%]
|
40 | +[% IF c("var/browser-linux-aarch64") -%]
|
|
41 | + mv [% c('input_files_by_name/linux-aarch64') %]/* "$destdir"/
|
|
42 | +[% END -%]
|
|
40 | 43 | [% IF c("var/linux-packages") -%]
|
41 | 44 | mv [% c('input_files_by_name/deb-packages') %]/* "$destdir"/
|
42 | 45 | mv [% c('input_files_by_name/rpm-packages') %]/* "$destdir"/
|
... | ... | @@ -12,6 +12,7 @@ targets: |
12 | 12 | browser-all:
|
13 | 13 | - browser-linux-x86_64
|
14 | 14 | - browser-linux-i686
|
15 | + - browser-linux-aarch64
|
|
15 | 16 | - browser-windows-i686
|
16 | 17 | - browser-windows-x86_64
|
17 | 18 | - browser-macos
|
... | ... | @@ -20,13 +21,16 @@ targets: |
20 | 21 | - browser-android-x86_64
|
21 | 22 | - browser-android-aarch64
|
22 | 23 | - browser-src
|
24 | + - browser-all-target
|
|
23 | 25 | browser-all-desktop:
|
24 | 26 | - browser-linux-x86_64
|
25 | 27 | - browser-linux-i686
|
28 | + - browser-linux-aarch64
|
|
26 | 29 | - browser-windows-i686
|
27 | 30 | - browser-windows-x86_64
|
28 | 31 | - browser-macos
|
29 | 32 | - browser-src
|
33 | + - browser-all-target
|
|
30 | 34 | browser-all-android:
|
31 | 35 | - browser-android-armv7
|
32 | 36 | - browser-android-x86
|
... | ... | @@ -56,6 +60,10 @@ targets: |
56 | 60 | var:
|
57 | 61 | browser-linux-i686: '[% c("var/browser_type") != "mullvadbrowser" %]'
|
58 | 62 | linux-packages: '[% c("var/mullvad-browser") || c("var/tor-browser-linux-packages") %]'
|
63 | + browser-linux-aarch64:
|
|
64 | + var:
|
|
65 | + browser-linux-aarch64: '[% ! c("var/browser-all-target") || c("var/testbuild") || c("var/nightly") %]'
|
|
66 | + linux-packages: 0
|
|
59 | 67 | browser-windows-i686:
|
60 | 68 | var:
|
61 | 69 | browser-windows-i686: '[% c("var/browser_type") != "mullvadbrowser" %]'
|
... | ... | @@ -77,6 +85,9 @@ targets: |
77 | 85 | browser-src-testbuild:
|
78 | 86 | var:
|
79 | 87 | browser-src: 1
|
88 | + browser-all-target:
|
|
89 | + var:
|
|
90 | + browser-all-target: 1
|
|
80 | 91 | |
81 | 92 | notarget:
|
82 | 93 | - torbrowser
|
... | ... | @@ -189,6 +200,13 @@ input_files: |
189 | 200 | - '[% c("var/build_target") %]'
|
190 | 201 | - '[% c("var/browser_type") %]-linux-i686'
|
191 | 202 | |
203 | + - name: linux-aarch64
|
|
204 | + project: browser
|
|
205 | + enable: '[% c("var/browser-linux-aarch64") %]'
|
|
206 | + target:
|
|
207 | + - '[% c("var/build_target") %]'
|
|
208 | + - '[% c("var/browser_type") %]-linux-aarch64'
|
|
209 | + |
|
192 | 210 | - name: deb-packages
|
193 | 211 | project: linux-packages
|
194 | 212 | enable: '[% c("var/linux-packages") %]'
|