-
Notifications
You must be signed in to change notification settings - Fork 249
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
Merge user provided CPPFLAGS with build system CPPFLAGS #1261
Conversation
foreign_cc/private/make_env_vars.bzl
Outdated
@@ -82,6 +85,7 @@ _MAKE_FLAGS = { | |||
"AR_FLAGS": "cxx_linker_static", | |||
"ASFLAGS": "assemble", | |||
"CFLAGS": "cc", | |||
"CPPFLAGS": "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this @jsharpe? It is a bit of a hack that exploits that getattr(flags, _MAKE_FLAGS[flag], [])
below will default to an empty list since an attribute cannot have an empty key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed this in 799f91c, I think it is better to be more explicit here.
@allsey87 if you update this branch then it will auto merge once CI has run - I don't have permissions on your fork to update it myself. |
Another PR regarding flags being set in
env
. Currently there is no solution to setCPPFLAGS
viaconfigure_make
. If you set them in the environment, they will be clobbered by the build system flags. If you set them viaconfigure_options
orconfigure_prefix
(I saw someone doing that somewhere), then they clobber the build systemCPPFLAGS
meaning you cannot use dependencies (since this is how header files from dependencies are made during the build).