Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
3
Description
The environment variable CXXFLAGS (as well CFLAGS and CPPFLAGS) is intended to give the user a way to add custom compiler flags to the build at both configure-time and build-time.
For example, a user wishing to use the address-sanitizer feature for a development build could run configure like
./configure CXXFLAGS="-fsanitize=address"
or a user wishing to investigate a particular binary might want to rebuild that framework with additional debug information:
make -C src/ dynamic-reservation-framework CXXFLAGS="-g3 -O0"
Therefore, providing custom CXXFLAGS should not break the build. However, we currently add some essential flags (like '-std=c++11') into CXXFLAGS, and a user specifying custom CXXFLAGS has to replicate all of these before he can provide his own.
Instead, we should try to restrict CXXFLAGS to some harmless default (e.g. '-g -O2') and move essential flags into some other variable MESOS_CXXFLAGS that is always added to the mesos build.