-
Notifications
You must be signed in to change notification settings - Fork 449
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
Move all config handling into a single place – a config.h file, do not clutter the command line with these additional project-wide defines. #5102
Conversation
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.
Great!
…t clutter the command line with these additional project-wide defines. Signed-off-by: Anton Korobeynikov <[email protected]>
2398728
to
7c98550
Compare
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.
Seems good, though changes to config.h will probably trigger rebuilding most everything.
BUILD.bazel
Outdated
cmd = "sed -e 's|cmakedefine|define|g' \ | ||
-e 's|define HAVE_LIBGC 1|undef HAVE_LIBGC|g' \ | ||
-e 's|define HAVE_LIBBACKTRACE 1|undef HAVE_LIBBACKTRACE|g' \ | ||
-e 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' \ | ||
< $(SRCS) > $(OUTS)", | ||
-e 's|define HAVE_MM_MALLOC_H 1|undef HAVE_MM_MALLOC_H|g' \ |
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.
duplicating this line is not necessary (but not harmful, either).
|
||
#cmakedefine CONFIG_PKGDATADIR "@CONFIG_PKGDATADIR@" | ||
|
||
#cmakedefine CONFIG_PREFIX "@CONFIG_PREFIX@" |
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.
doesn't @CONFIG_PREFIX@
need to be substituted in the the sed command in BUILD.bazel above?
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.
In fact it is unused in the whole codebase, so it is the question if it is needed at all. I do not know what the value should be in Bazel case, so I decided to leave it as-is, so first usage will trigger an error for Bazel and one would need to determine the proper value.
Signed-off-by: Anton Korobeynikov <[email protected]>
Well, same as cmdline changes, there are no changes here. Though, we can limit inclusion of config and control this |
There are multiple reasons for this:
CONFIG_PKGDATADIR
/CONFIG_PREFIX
are paths and might contain special symbols that might be not so good on command line