Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mozangle seems to be being built twice #28

Open
jrmuizel opened this issue Aug 16, 2019 · 6 comments
Open

mozangle seems to be being built twice #28

jrmuizel opened this issue Aug 16, 2019 · 6 comments

Comments

@jrmuizel
Copy link
Contributor

The first time we compile each file individually. The second time we pass all the files to a single cl instance. I don't yet understand why.

@jdm
Copy link
Member

jdm commented Aug 16, 2019

We build both a static library and a DLL in

mozangle/build.rs

Lines 99 to 121 in e344a1b

// Build DLL.
let mut cmd = build.get_compiler().to_command();
let out = env::var("OUT_DIR").unwrap();
let out = Path::new(&out);
cmd.arg(out.join("angle.lib"));
for lib in data.os_libs {
cmd.arg(&format!("{}.lib", lib));
}
for file in data.sources {
cmd.arg(fixup_path(file));
}
cmd.arg("/LD");
cmd.arg(&format!("/Fe{}", out.join("libEGL").display()));
cmd.arg("/link");
cmd.arg("/DEF:gfx/angle/checkout/src/libEGL/libEGL.def");
let status = cmd.status();
assert!(status.unwrap().success());
// Build lib.
build.compile("EGL");
.

@jrmuizel
Copy link
Contributor Author

Ah. Maybe we should only build one depending on the needs of the consumer? Also one of them doesn't build in parallel.

@jrmuizel
Copy link
Contributor Author

Also, is it necessary to build twice to produce both outputs?

@jdm
Copy link
Member

jdm commented Aug 16, 2019

I honestly don't know. And yes, I would be open to adding features to control generation of the DLL and static libraries.

@jdm
Copy link
Member

jdm commented Aug 16, 2019

If you can figure out a way to get the DLL to build in parallel, that would be helpful. Building shared libraries has been declared outside the scope of the cc crate, unfortunately.

@jrmuizel
Copy link
Contributor Author

It looks like this is causing the webrender CI to timeout which is preventing the github repo from being updated: servo/webrender#3753 (comment). @jdm is it possible for you to make this double building behaviour opt in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants