Closed
Bug 1697502
(sw-wr-perf-opt-flags)
Opened 4 years ago
Closed 4 years ago
Compile with swgl with -O2 instead of -Oz on Android
Categories
(Core :: Graphics: WebRender, enhancement)
Core
Graphics: WebRender
Tracking
()
RESOLVED
FIXED
88 Branch
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: jrmuizel)
References
(Blocks 3 open bugs)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
We need the compiled shared to be fast as possible.
Assignee | ||
Updated•4 years ago
|
Blocks: sw-wr-android
Assignee | ||
Comment 1•4 years ago
|
||
Glandium, any suggestions for how to best accomplish this?
One option is adding something like:
diff --git a/gfx/wr/swgl/build.rs b/gfx/wr/swgl/build.rs
index 5a2ed57f55c91..7c2b454a4147c 100644
--- a/gfx/wr/swgl/build.rs
+++ b/gfx/wr/swgl/build.rs
@@ -134,11 +134,14 @@ fn main() {
println!("cargo:rerun-if-changed=src/swgl_ext.h");
println!("cargo:rerun-if-changed=src/texture.h");
println!("cargo:rerun-if-changed=src/vector_type.h");
println!("cargo:rerun-if-changed=src/gl.cc");
- cc::Build::new()
- .cpp(true)
- .file("src/gl.cc")
+ let mut build = cc::Build::new();
+ build.cpp(true);
+ if build.get_compiler().args().contains(&std::ffi::OsString::from("-Oz")) {
+ build.flag("-O2");
+ }
+ build.file("src/gl.cc")
.flag("-std=c++17")
.flag("-UMOZILLA_CONFIG_H")
.flag("-fno-exceptions")
.flag("-fno-rtti")
Flags: needinfo?(mh+mozilla)
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Assignee: nobody → jmuizelaar
Status: NEW → ASSIGNED
Updated•4 years ago
|
Blocks: sw-wr-perf
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f87afcc0d272
Override -Oz with -O2 when building SWGL. r=lsalzman
Comment 4•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox88:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
Updated•4 years ago
|
Flags: needinfo?(mh+mozilla)
Updated•4 years ago
|
Alias: sw-wr-perf-opt-flags
You need to log in
before you can comment on or make changes to this bug.
Description
•