[Scons-users] scons and clang++
Gary Oberbrunner
garyo at oberbrunner.com
Wed Jul 16 10:19:47 EDT 2014
Could be something in your os.environ that's making clang++ work outside of
SCons; SCons doesn't propagate the shell environment by default.
Does it work if you do
env['ENV'] = os.environ()
? If so, then you can pare that down to whatever variable is actually
making it work.
On Wed, Jul 16, 2014 at 9:55 AM, Florian Lindner <mailinglists at xgm.de>
wrote:
> Hello,
>
> I have a nicely working build script for g++. I want to modify it to be
> able
> to also compile using clang++.
>
> My build script: http://pastebin.com/BXCzgEvy
>
> There is only one place where I differentiate between g++ and clang:
>
> [...]
> elif env["compiler"] == 'g++':
> pass
> elif env["compiler"] == "clang++":
> env.Append(CCFLAGS = ["-stdlib=libc++"])
>
> While just "scons" with g++ as the default works, I get errors when using
> clang. I always to an rm -rf .scon* and scons -c before each run.
>
> % scons compiler=clang++
> scons: Reading SConscript files ...
>
> [...]
>
> Configuring build variables ...
> Checking for C++ header file boost/array.hpp... no
> ERROR: Header 'boost/array.hpp' (needed for Boost) not found or does not
> compile!
>
>
> Curious thing is that if I just put env["CXX"] = "clang++ -stdlib=libc++"
> somewhere it works (the compilation failed with a clang error about not
> finding <iostream> but scons seems to find all libraries.
>
> Thanks!
> Florian
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140716/d858dcfd/attachment.html>
More information about the Scons-users
mailing list