[CDRIVER-2772] Encourage users to install a release buid Created: 27/Jul/18  Updated: 28/Oct/23  Resolved: 12/Sep/18

Status: Closed
Project: C Driver
Component/s: docs, libbson, libmongoc
Affects Version/s: None
Fix Version/s: 1.13.0

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We don't include "-DCMAKE_BUILD_TYPE=Release" in the commands in our main install guide; let's include it.



 Comments   
Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2772 add RelWithDebInfo change to NEWS
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d2802e2caeb7ee0ebe47b124daceed183bddbf22

Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2772 default build type to RelWithDebInfo
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0afc08d06842be283d6449883e07df9b26856a40

Comment by Andrew Morrow (Inactive) [ 30/Jul/18 ]

jesse - Yes, I think you are right, and I'm thinking of the C++ driver, where we have this in the top-level CMakeListst.txt:

if(NOT CMAKE_BUILD_TYPE)
    message(STATUS "No build type selected, default is Release")
    set(CMAKE_BUILD_TYPE "Release")
endif()

.

I think the C driver should do something similar (and we should probably standardize both on RelWithDebInfo).

Comment by A. Jesse Jiryu Davis [ 30/Jul/18 ]

I think the default is no build type. On my Mac, these are the gcc flags CMake passes for each build type:

  • no build type: -fPIC
  • Debug: -g -fPIC
  • Release: -O3 -DNDEBUG -fPIC
  • RelWithDebInfo: -O2 -g -DNDEBUG -fPIC
Comment by Andrew Morrow (Inactive) [ 29/Jul/18 ]

Isn't Release the default? Also, you might want to encourage RelWithDebInfo so that users can give symbolized stack traces, etc?

Generated at Wed Feb 07 21:16:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.