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

Add option for LTO #273

Open
devonhollowood opened this issue Mar 9, 2018 · 1 comment
Open

Add option for LTO #273

devonhollowood opened this issue Mar 9, 2018 · 1 comment
Labels
enhancement Something new the playground could do

Comments

@devonhollowood
Copy link

devonhollowood commented Mar 9, 2018

Sometimes it is interesting to see and discuss the generated assembly for code with LTO turned on. For example, this code:

extern crate itertools;
use itertools::Itertools;

pub fn foo(x: u32, y: u32) -> bool {
    vec![x, y].into_iter().dedup().count() == 1
}

gets compiled down to just x == y when compiled with --release and lto = true, which is pretty wild. But there's no way to share or discuss that easily online, since this site doesn't allow for LTO and godbolt's site doesn't allow for external crate imports. So, it would be nice if this site allowed the users to turn on LTO.

If the top bar is getting too crowded, maybe it makes sense to have a drop-down box where one can specify additional, less-used compiler options? I'm not sure how best to go about this from a UI standpoint but it would be nice to have.

@shepmaster
Copy link
Member

/cc @Chandlore and #272

@shepmaster shepmaster added the enhancement Something new the playground could do label Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something new the playground could do
Projects
None yet
Development

No branches or pull requests

2 participants