webatintel / aquarium

BSD 3-Clause "New" or "Revised" License
23 stars 7 forks source link

How to support some gn args (like dawn_enable_d3d12) defined by Dawn or ANGLE? #171

Open gyagp opened 3 years ago

gyagp commented 3 years ago

Moved the discussion (https://github.com/webatintel/aquarium/pull/168) to this issue for better tracking the discussion.

@hujiajie Dawn provides GN args like dawn_enable_d3d12 to control if a certain backend will be compiled, and AGNLE has similar flexibility. Note these variables are meant to be customized by users since they are in the declare_args() block, so it sounds like an Aquarium bug if the following won't work:

gn gen out --args="dawn_enable_d3d12=false" ninja -C out I'm not worried about the readability / maintenance burden at the moment, but @gyagp has a different opinion. Thoughts? @Jiawei-Shao @shaoboyan

@gyagp The benefit of this can be binary size, which is not a big concern of Aquarium. But the price is readability, maintenance and testability. I don't think we ever tested all these combinations, and I don't think we will have bandwidth to do this in near future. ANGLE and Dawn have many other GN args we don't need to bring into Aquarium.

gyagp commented 3 years ago

After offline discussion, the decision is to leave the support as is. We should fix any build issues if any of these args are used, but we don't pursue the smallest binary size with them.