Skip to content

Commit

Permalink
Build static libEGL.lib in addition to DLL.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdm committed Jun 7, 2019
1 parent 10b5430 commit 45ee552
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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() {
Expand Down

0 comments on commit 45ee552

Please sign in to comment.