Skip to content

Commit

Permalink
Disable layout-2013 feature by default (servo#34290)
Browse files Browse the repository at this point in the history
Most of the time layout-2013 is not needed and just
wastes build time. Disable the optional feature by
default and require users to specify the feature
at compile time if they wish to use the legacy layout.

In CI we enable the feature by default for Linux, since
that we need it for wpt tests with the legacy layout
and CI should ensure that the legacy code continues
to compile.

Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe authored Nov 21, 2024
1 parent a731b25 commit a6db3cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:

- name: Build (${{ inputs.profile }})
run: |
python3 ./mach build --use-crown --locked --${{ inputs.profile }}
python3 ./mach build --use-crown --locked --${{ inputs.profile }} --features "layout_2013"
cp -r target/cargo-timings target/cargo-timings-linux
- name: Smoketest
run: xvfb-run python3 ./mach smoketest --${{ inputs.profile }}
Expand Down
4 changes: 2 additions & 2 deletions components/servo/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,8 +1033,8 @@ fn get_layout_factory(legacy_layout: bool) -> Arc<dyn LayoutFactory> {
}
} else {
if legacy_layout {
warn!("Runtime option `legacy_layout` was enabled, but the `layout_2013` \
feature was not enabled at compile time. Falling back to layout 2020! ");
panic!("Runtime option `legacy_layout` was enabled, but the `layout_2013` \
feature was not enabled at compile time! ");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ports/servoshell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ProductName = "Servo"

[features]
debugmozjs = ["libservo/debugmozjs"]
default = ["layout_2013", "max_log_level", "webdriver", "webxr"]
default = ["max_log_level", "webdriver", "webxr"]
jitspew = ["libservo/jitspew"]
js_backtrace = ["libservo/js_backtrace"]
layout_2013 = ["libservo/layout_2013"]
Expand Down

0 comments on commit a6db3cb

Please sign in to comment.