From 10b543044e54b6b252765c31eaf23457268f5718 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 6 Jun 2019 16:50:08 -0400 Subject: [PATCH 1/3] Enable sse2 arch flag for libEGL. --- build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.rs b/build.rs index 7b022e34b..2fc6161ae 100644 --- a/build.rs +++ b/build.rs @@ -27,6 +27,12 @@ fn build_egl(target: &str) { build.include(fixup_path(file)); } + if target.contains("x86_64") || target.contains("i686") { + build + .flag_if_supported("-msse2") // GNU + .flag_if_supported("-arch:SSE2"); // MSVC + } + let mut cmd = build.get_compiler().to_command(); let out = env::var("OUT_DIR").unwrap(); let out = Path::new(&out); From 45ee552b3efd81eaf05ad79fa3fe1146bed23e15 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 7 Jun 2019 10:38:40 -0400 Subject: [PATCH 2/3] Build static libEGL.lib in addition to DLL. --- build.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build.rs b/build.rs index 2fc6161ae..013afb23a 100644 --- a/build.rs +++ b/build.rs @@ -27,12 +27,17 @@ fn build_egl(target: &str) { build.include(fixup_path(file)); } + for file in data.sources { + build.file(fixup_path(file)); + } + if target.contains("x86_64") || target.contains("i686") { build .flag_if_supported("-msse2") // GNU .flag_if_supported("-arch:SSE2"); // MSVC } + // Build DLL. let mut cmd = build.get_compiler().to_command(); let out = env::var("OUT_DIR").unwrap(); let out = Path::new(&out); @@ -54,6 +59,9 @@ fn build_egl(target: &str) { cmd.arg("/DEF:gfx/angle/checkout/src/libEGL/libEGL.def"); let status = cmd.status(); assert!(status.unwrap().success()); + + // Build lib. + build.compile("EGL"); } fn build_angle() { From 29616d9401c4092d4c6eb76e8adbb42c9999b132 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 7 Jun 2019 11:36:29 -0400 Subject: [PATCH 3/3] Publish 0.2.2. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cfc6885b8..1d9ec15e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mozangle" -version = "0.2.1" +version = "0.2.2" authors = ["The ANGLE Project Authors", "The Servo Project Developers"] license = " BSD-3-Clause" description = "Mozilla’s fork of Google ANGLE, repackaged as a Rust crate "