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 compiler/linker flags (OS-specific) #10

Open
codecat opened this issue Jul 26, 2020 · 0 comments
Open

Add compiler/linker flags (OS-specific) #10

codecat opened this issue Jul 26, 2020 · 0 comments

Comments

@codecat
Copy link
Owner

codecat commented Jul 26, 2020

We need a way to allow setting arbitrary compiler and linker flags, on an OS-specific basis.

For example, a problem arises if we have this command: (just an example, this isn't actual syntax)

$ qb --cflag "-O3"

Which will work okay on gcc/clang, but won't work on MSVC.

I think a lot of common flags can be added natively with the proper abstractions built-in (the -O3 example above already can be done with --optimize), but for the few cases that we do want to set flags, it could be nice to do so.

Perhaps this would best be done in the config file alone. Here's a possible thought:

[windows]
cflags = "/O2"

[linux]
cflags = "-O3"

But this raises some questions about what we can put exactly in these [windows] and [linux] blocks, which should probably be limited in scope to avoid confusion. Maybe we can even be more explicit in our intent: [compiler.windows].

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