Export CC to the test shell environment#8343
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8343" |
35d302b to
9767ecd
Compare
343f9bc to
cf360c7
Compare
| if [ -z ${CC+x} ]; then CC=cc; fi | ||
|
|
||
| $CC -m${MODEL} -c -o ${C_FILE}${OBJ} $C_FILE | ||
| cc -m${MODEL} -c -o ${C_FILE}${OBJ} $C_FILE |
There was a problem hiding this comment.
So we managed to reach the state where CC refers to the C++ compiler:
Lines 588 to 596 in cce909b
Line 188 in cce909b
But in this case CC is used as people normally use it: the C compiler.
In this case it makes a difference whether a C or C++ compiler is used.
I would suggest we introduce a new environment variable (e.g. CPP) and let CC point to the system's C compiler.
FWIW in the build make scripts the C++ compiler is at least called HOST_CXX.
Useful for e.g. #8342
This performs what
d_do_testalready does today:dmd/test/tools/d_do_test.d
Lines 588 to 596 in cce909b
(though the win64 case isn't really used anymore)