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 user to define their own CFLAGS and CC #93

Open
LainLayer opened this issue Feb 27, 2024 · 0 comments
Open

Add option for user to define their own CFLAGS and CC #93

LainLayer opened this issue Feb 27, 2024 · 0 comments

Comments

@LainLayer
Copy link
Contributor

CFLAGS

I didn't want to make a PR since I don't know how you would prefer to implement this.
If you're fine with this in nob.c and handling it in every src/nob_*.c file then I'd be happy to make a PR.

#define CFLAGS "-O3", "-march=native"

I don't know however what flags msvc accepts, I do not own a windows device, and having a define sort of implies needing a set of default CFLAGS i.e -O0 -ggdb or something.

Another option is defining it in build/config.h but that sort of requires you to run nob once to generate the config.h if you don't know what should be in there.

Either way, this feature would be pretty useful since package managers like emerge and makepkg want to pass CFLAGS to build scripts.

CC

On windows, it is also possible to use clang, and if someone wants to cross-compile musializer, passing a cross-compilation gcc on linux would be useful

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

1 participant