[Scons-users] HOWTO select a toolchain

William Blevins wblevins001 at gmail.com
Mon Jan 4 14:19:58 EST 2016


Stefan,

SCons does not automatically import environment variables. The SCons
DefaultEnvironment is minimalistic.

http://scons.org/new/faq.html#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line
.

V/R,
William

On Mon, Jan 4, 2016 at 7:16 PM, Stefan Seefeld <stefan at seefeld.name> wrote:

> Hello,
>
> I'm trying to test my build system against a couple of different
> compilers installed on my computer. How can I specify (at invocation
> time) which compiler to pick ?
>
> My case: I'm in a cygwin shell inside a Windows VM, and I want to build
> using the MSVC compiler, not the cygwin GCC.
> So I attempt to run `scons CC=cl CXX=cl` but that's ignored (I even
> tried `CC=cl CXX=cl scons` to make sure the two variables were read as
> environment variables, not scons command-line variables). What is the
> correct incantation for this use-case ?
> (To make it simpler: even on a normal Linux terminal, `scons
> CC=something CXX=something` doesn't seem to have any effect on the
> choice of compiler being used.)
>
> And a related question: The SCons man-page
> (http://www.scons.org/doc/HTML/scons-man.html) mentions "tool
> specifications". Are they available as "current toolchain" properties
> inside SConscripts ? I'd like to add my own flags based on which
> toolchain is selected, so having access to that classifier would be useful.
>
> Thanks,
>         Stefan
>
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160104/3c52af5c/attachment.html>


More information about the Scons-users mailing list