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

How to use buck2 modes ? #779

Open
MarcoBonino opened this issue Sep 20, 2024 · 1 comment
Open

How to use buck2 modes ? #779

MarcoBonino opened this issue Sep 20, 2024 · 1 comment

Comments

@MarcoBonino
Copy link

Hello!

I have a small example here (buck2_example) where I try to use buck2 mode during build.
I run it using buck2 run @mode/opt //:main, but I'm getting this error:

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
[1]    10198 abort      buck2 run @mode/opt //:main

Could you help ?
For more context what I would like to achieve is to be able to invoke buck2 build with different compilers and compiler flags (and probably also different cpu architectures). Could you advice on the best practices for it ? From the official documentation is not quite described or at least I could not found it.

Thanks!

@steveklabnik
Copy link
Contributor

This is just a wild guess, but maybe this line shouldn't be here? https://github.com/MarcoBonino/buck2_example/blob/main/mode/opt#L2 isn't that like, recursively including itself? that would explain the stack overflow.

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