Benno Evers created MESOS-9666:
----------------------------------

             Summary: Specifying custom CXXFLAGS breaks Mesos build
                 Key: MESOS-9666
                 URL: https://issues.apache.org/jira/browse/MESOS-9666
             Project: Mesos
          Issue Type: Bug
            Reporter: Benno Evers


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
{nocode}
./configure CXXFLAGS="-fsanitize=address"
{nocode}
or a user wishing to investigate a particular binary might want to rebuild that 
framework with additional debug information:
{nocode}
make -C src/ dynamic-reservation-framework CXXFLAGS="-g3 -O0"
{nocode}

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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to