Commit graph

38 commits

Author SHA1 Message Date
Oriol Brufau
1499e2a874
Remove some references to layout 2013 vs layout 2020 (#37007)
We no longer have both layout systems.

Testing: not needed (no behavior change)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-05-14 19:53:48 +00:00
Jonathan Schwender
80529ef358
Add medium profile for daily work scenario (#34035)
- The standard `dev` mode is often too slow for daily work on servo
- Increasing the optimization level to 2 improves the performance noticably.
- Build time for opt-level = 1 is slightly higher than 2 on my machine
- Reducing debug info to `line-tables-only` improves link and build times,
  while still keeping relevant info for backtraces.

Also extend .servobuild to allow setting custom cargo profiles instead
of just release and dev.

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
2024-11-21 11:28:15 +00:00
Jonathan Schwender
3381f2a704
Add OpenHarmony support to mach and CI (#32507)
* Add ohos to mach

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

* Add OpenHarmony build to CI

* Rename ohos sdk action

I decided to rename the upstream ohos sdk action to
setup-ohos-sdk, making it clearer that is a github
action repository.

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>

* Remove commented line

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>

---------

Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2024-06-17 11:27:23 +00:00
Mukilan Thiyagarajan
d7de206dbd
Preliminary Android build support (#31086)
* Android build

* Fixes
* More fixes
  - Still failing in the linking step
* More work on getting linking working

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: use mozjs with ndk r25c. loads servo.org

more android build fixes.

* fix ./mach run for android and make it follow logs

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* add experimental logic for compositor pause/resume

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* pass DPI from android to simpleservo

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* ci: add android workflow

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* switch to ANDROID_SDK_ROOT and ANDROID_NDK_ROOT vars

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade gradle to 4.10.1

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade to gradle 5.1.1

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade to gradle 8 and agp 8

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* make compositing work again with external present

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: improve mach support for non-NixOS and CI

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fix sampler compilation bug introduced in #30490

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* ci: add android build to main workflow

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* gradle: set MinSdk = targetSdk = 30

NDK requires we compile against the minSdk API level
which is 30 in our case.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* add instructions for android in README.md

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: move servosurface to servoview

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: uncomment the mediasession callbacks on MainActivity

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: fix crash on MainAtivity.onDestroy

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: drop VR, arm 5 and unused code

This commit drops:
* support for google, oculusvr
* support for arm5 architecture

and also removes
* fakeld scripts
* unused java code

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* cleanup shell.nix

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: add FIXMEs for gstreamer code

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: remove commented code and debug logs

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* cleanup ServoView.java

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* mach: comment call to download gstreamer deps for android

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* disable bluetooth for jniapi as blurdroid is broken

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fixup! README.md

* fixup! remove change in Cargo.toml

* fixup! move shell variables together

* fixup! cleanup jniapi/Cargo.toml comments

* delete commented gstreamer related android code

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* remove unused config variable in servbuild

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: more cleanup

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* force no_static_freetype only for android

* use actions to manage sdk, ndk and java

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* rename embedder event names to be more clear.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* link to startup crash issue

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fix lint issues

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade env_logger to 0.10 with duplicate exception

libservo and android_logger can use env_logger 0.10
but quickcheck is still stuck on 0.8 and has not seen
any activity in the last 2 years. This commit adds
a duplicate exception until the quickcheck dependency
can be upgraded (or replaced)

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: fix comments

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* disable jemalloc on android

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fixup! replace linux with android in cfg

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-01-22 13:00:15 +00:00
Martin Robinson
bbc35b682f
Remove thinlto servobuild.config option (#30830)
Rust uses a version of ThinLTO by default now [1]. This can be tweaked
by adjusting rust compiler flags, which is probably a better way of
controlling this than a custom servo configuration considering:

1. We want to remove the custom servo configuration eventually.
2. The -Z option that this configuration currently uses is unsupported
   by stable rust.

1. https://blog.rust-lang.org/inside-rust/2020/06/29/lto-improvements.html
2023-12-06 11:06:36 +00:00
Delan Azabani
a3d2f0c586
Enable debug assertions for all builds other than official releases (#30509)
* Run main and try jobs with debug assertions

* use single quotes in workflow expressions

* set force-debug-assertions in main.yml

* set force-debug-assertions as part of decision job

* fix typo in MachCommands.build

* fix more hardcoded profile names

* fix tidy

* split cargo_profile_option on windows

* Fix running servoshell and unit tests through a symlink

* rename steps to make them less confusing

* fix more hardcoded cargo profile options

* fix missing inputs in linux-wpt and mac-wpt

* make filename an inherent method of Resource

* rework release-with-debug-assertions profile to production profile

* rework resource logic to eliminate std_test_override

* set production flag in nightly release builds

* clean up servobuild.example and windows.yml

* oops forgot to check in embedder_traits/build.rs

* fix mach test-unit behaviour through symlink

* unit tests only need current_dir and ancestors

* fix macOS package smoketest breakage

* expect css/css-color/currentcolor-003 to crash under layout 2013

* fix more references to {force,release-with}-debug-assertions

* fix local build failures under --profile production
2023-10-26 08:22:14 +00:00
Martin Robinson
16445983ec
Remove gold config option and use lld on Linux (#30100)
There are a few motivations for this change:

 1. lld is demonstrably faster than gold, but is really only stable on
    Linux at the moment. There's a good chance that it will be ready for
    all platforms soon though.
 2. Most people do not have gold installed on MacOS and Windows. You'd
    have to do this manually through homebrew. I think it's a safe
    assumption that this probably won't be slowing things down much on
    those platforms.
 3. We need to remove all configuration of the build that happens while
    running `./mach build` if we ever hope to make `cargo build`
    equivalent to the mach build. This unlocks static configuration of
    the rustflags. One of the big blockers for proper `cargo build`
    support.
2023-08-15 13:53:05 +00:00
Martin Robinson
fef332f385
Make rustup a requirement and switch to rust-toolchain.toml (#30056)
This change makes rustup a requirement for building Servo with `./mach`
and switches to the newer `rust-toolchain.toml` format. The goal here is
to make mach builds more similar to non-mach builds.

- The new format allows listing the required components, removing some of
  the complexity from our mach scripts.
- This means we must raise the required version of rustup to 1.23. The
  current version is 1.26.
- We no longer wrap every call to cargo and rustc in "rustup run" calls
  as both cargo and rustc will take care of installing and using all
  necessary components specified in `rust-toolchain.toml` when run
  inside the project directory.
2023-08-01 14:44:57 +00:00
Mukilan Thiyagarajan
8a46a4ee05 Use layout 2020 by default
Signed-off-by: Mukilan Thiyagarajan <me@mukilan.in>
2023-06-08 23:13:53 +05:30
Simon Sapin
1a8c5fed6f Add .servobuild configuration for the choice of media stack 2020-07-06 17:34:17 +02:00
Simon Sapin
d670b4420a Add layout-2020 option to the .servobuild file
… and `--with-layout-2013` command-line option to disable it.
2019-12-16 15:36:18 +01:00
Simon Sapin
c156bf2dd9 Add a .servobuild option for --with-debug-assertions 2019-11-26 16:36:24 +01:00
Josh Matthews
06bca43aee script: Optionally store backtraces when throwing DOM exceptions. 2018-10-01 16:04:56 +02:00
Simon Sapin
e790ee976e servobuild: remove obsolete comment 2018-01-16 14:39:30 +01:00
Simon Sapin
9ec53344f5 servobuild: comment some more on the default value 2018-01-16 14:39:01 +01:00
Simon Sapin
fe0d2866f1 Restore the ability to disable incremental compilation
It became the default in debug mode in the last Rust/Cargo update.
2018-01-14 01:38:37 +01:00
Simon Sapin
365a139716 Use rustup.rs instead of custom bootstrap
Fixes #11361, closes #18874
2018-01-10 18:05:44 +01:00
Simon Sapin
3264453284 Stop using "alternate" rustc builds.
With https://github.com/rust-lang/rust/pull/45810,
normal Nightly now has LLVM assertions disabled.
2017-11-14 09:08:11 +01:00
Anthony Ramine
d4933148d4 Update Rust to 1.22.0-nightly (a47c9f870 2017-10-11)
This allows us to start experimenting with -Z thinlto
2017-10-12 14:16:04 +02:00
Simon Sapin
bd8ec03740 Disable LLVM assertions by default, on supported platforms.
But keep them on linux-dev CI.
2017-02-16 08:38:14 +01:00
Anthony Ramine
57fd45a5c2 Allow disabling LLVM assertions in rustc (fixes #15548) 2017-02-15 14:55:02 +01:00
Simon Sapin
e273ecce4c Option configuration to enable incremental compilation.
https://internals.rust-lang.org/t/incremental-compilation-beta/4721
2017-02-05 14:45:00 +01:00
Simon Sapin
16d8c35be4 Add config to do desktop notifications by running an abitrary command. 2017-01-13 20:47:54 +01:00
Vladimir Vukicevic
a82be9ffb4 Support build.rustflags in .servobuild 2016-11-21 09:25:31 -05:00
Lars Bergstrom
02c7e06d54 Remove the gonk port 2016-05-27 19:33:43 -05:00
Mitchell Hentges
619212abf3 Reduce 'android-18' duplication, as originally done by wenderen
Use android.platform (and $ANDROID_PLATFORM) for configuration, apply 'android-18' default
2016-05-20 22:23:28 +02:00
Simon Sapin
b2af8567fa Rename rust-snapshot-hash to rust-nightly-date
… and remove mentions of "snapshots".

We now use rust-lang.org nightly builds rather than our own snapshots.
2015-12-30 13:36:47 +00:00
Lars Bergstrom
5c5acc0249 Add CCACHE infra and turn it on in travis 2015-11-05 14:47:23 -06:00
Akos Kiss
9afa930728 Make the use of gold linker configurable
Currently, ld.gold is always used for linking if found on the
system. There are some cases however when one may want to opt out
from using it. This patch adds the boolean field `rustc-with-gold`
to the `[tools]` section of `.servobuild`, which if set false,
disables the use of ld.gold.
2015-09-08 17:10:46 +00:00
Kinder Sung
bdb2485807 Fix typos in servobuild.example 2015-08-23 12:21:43 +08:00
Sumith
0e657b2569 Entries in servobuild.example file
Entries in the servobuild.example file that are not defaults were
commented out, defaults were mentioned in comments
2015-06-13 03:34:54 +05:30
Jinank Jain
c98d55fe28 Add --dev option to mach build
Require either --dev or --release, unless a default build.mode is set
in .servobuild.  Fixes #5933.
2015-05-13 09:25:43 -07:00
Manish Goregaokar
cfdad335bd Add support for $CARGO_HOME in servobuild 2015-03-08 01:34:38 +05:30
Manish Goregaokar
5b3868089e Add ./mach build-gonk command 2015-02-21 09:42:47 +05:30
Matt Brubeck
53135b2566 Move snapshot dir inside the source dir by default
This avoids changing any directories outside the repo, which is better for
some automation scenarios.

The servobuild.example file has a "cache-dir" setting that restores the
previous default location of `~/.servo`, which is useful for developers
working with multiple clones on the same machine.
2015-01-28 10:33:04 -08:00
Fabrice Desré
8eb4844174 Issue #3804 : Allow enabling debug-mozjs from servobuild config 2014-11-06 22:47:02 -08:00
Matt Brubeck
b736256d53 Add Android build config to mach/servobuild 2014-10-03 14:29:54 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00