[SERVER-8465] SCons should honor CC and CXX from the environment Created: 07/Feb/13  Updated: 11/Jul/16  Resolved: 03/May/13

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 2.4.0-rc0
Fix Version/s: 2.5.0

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-8466 The --clang build flag should be elim... Closed
Participants:

 Description   

Many C++ utilities (static analysis tools, compiler wrappers, tag generators) expect to be set as the compiler, and then determine the base compiler to actually invoke by inspecting the well known CC and CXX environment variables.

Similarly, users attempting to build mongo often expect 'CC=/path/to/cc CXX=/path/to/cxx SCons mongod' to work. It is not immediately obvious that they should use the --cc and --cxx options instead.

We should conform with well established practice and honor CC and CXX from the environment, unless overridden by --cc and --cxx on the command line.

We should also ensure that CC and CXX variables that are set in the environment are tunneled through the Env and are available to child procs.



 Comments   
Comment by Andrew Morrow (Inactive) [ 03/May/13 ]

Resolved via new flags --cc-use-shell-environment and --cxx-use-shell-environment.

Comment by auto [ 02/May/13 ]

Author:

{u'date': u'2013-04-26T17:22:04Z', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-8465 Provide a way to tell scons to honor $CC and $CXX
Branch: master
https://github.com/mongodb/mongo/commit/e801393010fa3c432451ef5173b3347fa6c3bf1b

Generated at Thu Feb 08 03:17:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.